Arduino Uno + Seeedstudio Bluetooth shield issue

Hi,

I have a problem setting up bluetooth communication between my samsung galaxy S2 and seeedstudio bluetooth shield mounted on an arduino Uno. I closely followed the tutorial to connect my module with my cellphone. I’m able to send data using SPP app from my “arduino uno + BT module” to my android phone using the Android IDE 1.0 terminal. On the other hand when I send data from my android phone to the BT module I receive strange characters like if the baudrate was incorrectly set.
I double checked everything but I can hardly find any clue about what’s going on. I strictly followed the tutorial and did not edit the Slave mode sample code (the one with NewSoftSerial lib dependancies) which I uploaded to my board.

When I connect my phone to the module here is what I see on the terminal:
The slave bluetooth is inquirable!
„•¡jUˆªJš4)ÿ„¡§gS¡(z­ÿ„•¡jUŠªJ¢4)ÿ

instead of the expected :
The slave bluetooth is inquirable!
+BTSTATE:3
CONNECT:OK
+BTSTATE:4

Does anybody have the same issue ? Can somebody help me please ?

Thanks

Cedric

Dear customer,

As you said, it might the baud rate not correct.
So at serial tools or other something where you can get message from your cell phone that you should change the baud rate.
Because they can transmission with each other without print the char correctly.

Best regards,
Yuri

I had the same issue and saw those same characters when my serial port monitor (Arduino IDE) was set to 9600 Baud and the Bluetooth shield was set to 38400 Baud.
After I changed the serial port monitor to 38400 everything appeared correctly.
Now I do not have a galaxy phone but there may be a way to change the baud rate of the bluetooth on the phone OR if you can find what the phone’s baud rate is set the Bluetooth shield baud rate with the blueToothSerial.begin(38400); function.

Good luck

Thanks both of you for your answer.

In the first time I don’t want to spend that much time in trying to modify the baudrate on android phone side. I really want to be sure that I can’t do anything with my bluetooth shield before moving to android dev.

I tried to modify the baudrate of my serial monitor (Android IDE) to 38400 bps but it just crashes the IDE (I’m under Ubuntu 11.10, maybe it’s a known issue ?). I’m currently trying to modify the baudrate on the bluetooth shield.

Does anyone has any advice ?

Thanks

Hi,

Just to be sure the problem wasn’t on the android phone side, I established a connexion between my laptop and the bluetooth shield.
I mapped on /dev/rfcomm0 device my remote serial bluetooth shield and used minicom to transmit and receive data to/from /dev/ttyACM0 (attached to the serial port of my arduino UNO board). I configured both serial connections to 9600/8N1 without flow control. I still have the same problem, I can send data from my Arduino+bluetoothshield to my laptop but I can’t receive anything but dumb characters data on Arduino side.

Maybe there is some kind of hardware failure in my shield ? Does anyone from seedstudio have any idea ?

Cedric

Hey Cedric,

Have you seen this thread at all? viewtopic.php?f=4&t=2944

It may be of help, there’s pictures of an arduino uno with jumper wires etc. How is your hardware setup? Can you upload a pic? I’m using Arduino uno + seeduino BT shield, can send data from my arduino to my android, but nothing returns the other way! I’m stuck also and wondering if it’s faulty hardware or incompatible and we weren’t told…

Dear All,

I have already test with Arduino Uno Rev3 with Arduino 1.0 IDE with the libraries on WIKI.
It is work correctly.
So if you attach your photo here let us see how you connect with the board.
It would be more helpful.

Best regards,

Yuri

Hi,

Yesterday I managed to make it work.
Your shield only support 9600 bps and 19200 bps with my Arduino R2. I had to change the baudrate on the shield side to 9600 bps (and then 19200 bps) to be able to cleanly receive characters. With any other higher baudrate, the problem is back.

Yuriq, can you test one more time with an Arduino R2 this time, maybe there is some kind of problem with the previous arduino revision ?

Cedric

How did you manage to change the baud rate on the shield side? was it using the command \r\n+STBD=9600\r\n ?

I’ve tried using this command but it doesn’t appear to have worked. When I send commands to the bluetooth serial, I don’t receive any response…

Yes I precisely used this command but it’s a little bit more tricky.
As you probably know the default baudrate is set to 38400. This is the reason why in the “Slave” sample code we initialize the baudrate of the software serial to 38400 using the following line :

blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400

Here is what I did and what you may try :
Start from a clean “Slave” sample code and in the setupBlueToothConnection function add the following line :

blueToothSerial.print("\r\n+STBD=9600\r\n");

after this one (the order is probably irrelevant here but this is what I did)

blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode

Then compile your code and upload it to your arduino, as a result you might see one led quickly blink 2 times per second. If not, just switch off and on your arduino. Go back to Arduino IDE and edit the following line :

blueToothSerial.begin(38400); // <-- Located in the setupBlueToothConnection function

this way :

blueToothSerial.begin(9600); // <-- Located in the setupBlueToothConnection function

Then recompile and reupload to your arduino board and follow the tutorial given in the wiki to establish a connection with a PC in slave mode.

Good luck !!!

The baud rate has been able to successfully change but still no luck in communication.

I tried blueToothSerial.begin(9600) and blueToothSerial.begin(19200) after using blueToothSerial.print("\r\n+STBD=9600\r\n") to change the baud rate. Both connected, I saw this text on my phone in the ‘Bluetooth SPP’ app after resetting arduino:

+STWMOD=0

+STNA=ArduinoBTSLave

+STOAUT=1

+STAUTO=0

+INQ=1

Then I can type text from my computer to my android but not visa versa. When I type text in the Bluetooth SPP app and click ‘Send’, nothing happens. I’ve tried using Amarino too, no luck.

I don’t understand!

Attached is a picture of my Arduino Uno Rv2 with the bluetooth shield attached. Rx pin is on BT_RX6 and Tx is on BT_TX7
Arduino.jpg

i’m struggeling with some similar issues as well.

i don’t quite understand if i need to run this “setup” procedure just once and then the settings (baud rate, pin, mode, auto connection,…) are stored and i can use bluetooth module with the amarino library, or do i need to copy this settings inside setup method inside amarino library?

also i’m not quite sure if i need to change the serial.begin(38400) to 57600 after i use the command \r\n+STBD=57600\r\n (to have it working in the new baud rate)

thnx for any help.

You will need to include that code in the setup() function as it needs to run every time the Arduino is restarted.

I was not given sufficient help with this shield (which frustrated me!). Turns out the shield was faulty (or not compatible with my board), so I purchased a tiny and cheap BT module off ebay (Arduino Bluetooth Module Slave Wireless Serial Board), it was very easy to setup and use.