Go Down

Topic: Seeed Bluetooth Shield Usage (Read 1 time) previous topic - next topic



Arduino noob here.

I am using an Arduino Duemilanove with Seeed's bluetooth shield.  I have been able to connect to a PC correctly using the slave example that I got off of Seeed's wiki (http://www.seeedstudio.com/wiki/Bluetooth_Shield) , but I have some questions about how to use the BT connection.

1.) Does the shield have to pair to the PC every time it is powered on? i.e. go through the:
"The slave bluetooth is inquirable!




Or does the connection only occur once upon initial pairing with a device (in my case, PC)?

2.) Meanings of the LED blinking?
I am pretty sure the alternating red + green led blinkings mean the shield is looking for a device to pair to.
When a connection is established, does the green light blink twice per second (flash flash, pause for rest of second)?  That is what I have been getting.
The wiki page doesn't explain this very thoroughly and any information about shield's status LEDs would be very helpful.

I just ask these questions because, like I said, I ran the slave program and paired to the PC (entered the PIN and all drivers/such installed correctly), but can't tell if it is actually connected and talking or not.

Any insight/tips would be greatly appreciated.



I have experience with a different device but I believe they work the same:
- green/red alternating indicates that the device is inquirable.
- green blinking twice a second indicates idle state.
- green blinking once every two seconds indicates connected state.

The initial pairing requires the device to be inquirable, which as far as I know can only be set through a command from the Arduino (not a pin going high or low). So you need to load a sketch that does that (and then performs the pairing).

After a successful pairing, however, the device will remember the address of the master. When restarted, unless the Arduino is running a sketch that sends INQ or CONN commands once more, it will stay idle and not reconnect. Actually, this behavior depends on two further commands: one instructs the device to reconnect to the last master on startup, the other to permit the last master to reconnect, so the master (let's say a PC) can initiate the pairing from its side.

The device's behavior thus very much depends on which sketch the Arduino is running and on the parameters set by the last sketch.


Thanks for the reply.  This is making more and mores sense.  Does the idle state mean that the slave (Arduino) is connected to the master (PC) through the COM port or just that the two are connected?  I have been having issues knowing if the COM port is open/closed with the program I am using for this project (LabView).


When the BT device is idle it is not connected to the master. If the configuration allows the last paired device to connect, however, when you open a serial terminal from the master PC over bluetooth, it transparently establish the connection to the Arduino slave (it may take a few seconds). Then you should see the green LED blink once every two seconds, instead of twice a second as in idle state. When connected, every character written in the PC terminal program is sent to the Arduino, and every response from the Arduino is written to the PC terminal program.

This behavior is controlled by the STOAUT configuration parameter. It should be true (1) by default.

As far as I know, the connection is maintained only as long as the terminal program keeps it open. If you close LabView, or just disconnect it, the BT device returns idle.

Go Up