9 years, 3 months ago.

BluetoothSerial: bluetooth.connect(); hangs?

Hi,

I'm facing some problem with the Seeed Bluetooth Shield. I believe it should work with mbed, I think with the library 'BluetoothSerial'. I do use pins with TX and RX functionality. But I'm not sure it uses software for serial communication or the on-chip uart.

The order of commands: BluetoothSerial bluetooth(P2_0, P2_1); bluetooth.setup(); bluetooth.slave("btslave8seeed"); bluetooth.connect();

However it hangs at 'bluetooth.connect();'. The smart phone doesn't see it using Bluetooth. I have spent a lot of time trying to get it working.

I guess the shield will not be initialized properly. With an oscilloscope I see some pulses on the TX line, although it doesn't appear to be a real serial signal, they look more like spikes.

I tried it on a ST Nucleo F401RE and Seeeduino Arch-Pro.

For the ST Nucleo F401RE, I used BluetoothSerial bluetooth(PA_2, PA_3); BluetoothSerial(PinName tx, PinName rx);

For the Seeeduino Arch-Pro, I used BluetoothSerial bluetooth(P2_0, P2_1); BluetoothSerial(PinName tx, PinName rx);

I set jumpers on the bluetooth shield accordingly.

Anyone know what to try? Any help is very welcome.

Best regards, Jack.

Question relating to:

library for Bluetooth Shield from Seeed Studio bluetooth

1 Answer

9 years, 3 months ago.

Hi,

Please look here http://developer.mbed.org/teams/ST/code/Seeed_BlueBot_demo

You can find a lot of informations in the video.

Accepted Answer

Hi, thank you very much for helping me. I got a second Bluetooth Shield (113030002 / SLD63030P), which was the same model as the first one, different from the video. The image in the webshop was the same as in the video. This one shows up as HMSoft, and I need to use PIN 1234, to connect to it. Doesn't it need to show as 'btslave8seeed' instead of HMSoft? The call to bluetooth.connect(); still hangs. When I remove the TX and RX jumpers, I still can connect to it as above. I can't send or receive characters. But at least it seems the first shield was a broken one. I can't yet figure out the problem, there's not too much information on the issue. It appears if the serial communication does not work, as removing the jumper show the same behavior. Regards, Jack.

An update, the first shield I bought was a dead one, so nothing could work. The blue LED on it did not flash. The second one works, but only with the Serial class. I can send and receive character at 9600 Baud. The blue LED flashes before connection and is steady on once connected.

Update: I'm not yet able to change the device name to something different than HMSoft. I used "AT+NAMEJust a name\r\n" and many thing I found on the web. I did not have a connection to the BT Shield when I tried this. Did somebody succeed doing that? BTW, I'm just spending a little bit of free time that I have available with mbed as a hobby, mostly at night time when my 2 year old son sleeps, so no need to get it fixed soon :-) Any help is appreciated! Thank you very much, and regards, Jack.

posted by Jack Berkhout 22 Jan 2015