2
votes

I am new to Arduino and I have 2 issues when I tried the BluetoothShieldDemo.

  1. I can only send data from bluetooth module(through serial monitor) to phone but I cannot send from phone to bluetooth module(to display it in serial monitor). I used oscilloscope to check there is signal in the Arduino board RX pin but no data display in the serial monitor. I suspect it is an IO issue so I changed the IO from digital pin 6 and 7 to digital pin 2 and 3, then digital pin 4 and 5. But it is still not working. Then I change the code to use hardware serial (Serial1) and it is working now. I just wonder why it is not working with the SoftwareSerial.

  2. Although I can send and receive data, I cannot change the bluetooth name. The bluetooth module has no response when the below commands are sent. Is it the bluetooth module is in some kind of locked mode? Or the command is different from manufacturer? The bluetooth module that I got has a single CSR 31A2 chip on it. But the other shield that I saw on the web has 2 chips and it is with CSR BC417.

Codes:

blueToothSerial.print("\r\n+STWMOD=0\r\n"); 
blueToothSerial.print("\r\n+STNA=BluetoothSlave\r\n"); 
blueToothSerial.print("\r\n+STOAUT=1\r\n"); 
blueToothSerial.print("\r\n+STAUTO=0\r\n"); 
delay(2000); 
blueToothSerial.print("\r\n+INQ=1\r\n"); 

Thanks in advance!

1

1 Answers

0
votes

1- When using SoftwareSerial, how are you declaring the pins (Input/Output)?, Are you pulling serial data right (giving it enough time between data transmission, but reading at the right time)?

2- Find the datasheet of your module and see what commands does it support.