Control of a Bluetooth Bee via Bluetooth

Hi,

I’m trying to use the Bluetooth Chat example app (available in the Android SDK platform sample code directories) to control (via bluetooth from an Android phone) a few of a DFRobot Bluetooth Bee’s (v2.0) digital output pins. When I try to start either a secure or an insecure connection, Chat shows the Bee as being paired, but the call to .connect() always fails with an IOException ‘Service Discovery Failed’. The Bee is mated to an RB-Spa-145 ‘XBee Explorer USB’ that provides a USB interface to my pc. The tiny switch upon the Bee is set to ‘AT Mode’. Can anyone suggest what I may be doing wrong?

After reading this poorly written datasheet: robotshop.com/media/files/pd … el0023.pdf
I’m starting to get the creepy feeling that I’m going to have to attach the pair to a third (Arduino) board which would accept serial data (sent via bluetooth from the Android phone and then through the Bee) That appears to be all that DFRobot’s current Bee version can do under bluetooth control. Then either employ the Arduino to control its own DO bits (or perhaps have the Arduino control the Bee’s bits via serial link). If possible, I’d just assume do without the Arduino and supply power to the Spa-145 myself.

I can control the Bee’s bits just fine via USB (emulating a serial port) with Windows Hyperterminal.

If possible, I’d also like to dispense with the Explorer board (USB interface) too, if the Bee can be configured to respond only to Bluetooth commands on each power-up. I’d supply power to the lone Bee manually.

Is there another XBee compatible bluetooth device out there with a more complete set of bluetooth control commands (or perhaps one that has the same command set for control by either bluetooth or USB/serial)?

Thanks, Ted

Welcome Ted to our forums!

I haven’t used the AT mode to change the output pins on the Bee (only to change the baud rate), but I don’t think there’s a way to send AT commands to a Bee over wireless, only through the wired UART port. So, when the bee is in AT mode, the serial port is not available.

Using the Bee to send commands to the Arduino to control it’s I/O pins is one option, but you might prefer something like this:

This is Bluetooth receiver with ATmega168 embedded. The bluetooth is connected to the ATmega168 via a software serial, and it’s the ATmega’s pins that are broken out into Xbee format. I’m not sure what Xbee pins you need to use: the 3.3V, TX, RX, Reset, DTR, and GND pins seem to all be compatible.

Hope this helps.