mbed Bluetooth

16 Feb 2011

Hi mbed'ers

I have been looking around for a way to communicate with the mbed over Bluetooth. I have seen a few posts about using some pieces of hardware to do this ( like this... ) but would really like to be able to do it with a standard USB dongle.

I know that Peter Barrett done something like this here but looking at it i'm not sure how he done it or if this was Bluetooth or the USB hub that handled it.

Also the Robot racing and m3pi, big traks projects employ Bluetooth but no mention of how they done it. Can someone spill the beans or point me in the right direction???

Cheers Martin

16 Feb 2011

Hi Martin,

for the m3pi robotics I used the RN-42 Module from Roving Networks :

http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=506 http://www.sparkfun.com/products/10253

If has a Serial interface and be default will sit there waiting for device to connect to it (like a laptop or Smartphone). It also defaults to a Serial Port Profile, at 115,200 baud, so once you pair your laptop with it, you'll get a COM port, and hence a Bluetooth serial replacement.

Hope that helps!

Cheers, Chris

16 Feb 2011

Hi Chris, Yep I had found that module already which would do the job. I just thought that there might be a way to plug a cheap everyday dongle into the mbed and set up a SPP profile and Bluetooth stack on the mbed in software. Knew it wouldn't be easy however...

19 Feb 2011
19 Feb 2011

Hi Vis, Yeah I did have a look at this page. I didn't really understand the code written in the library (not being a software engineer code is not my strongest suit) - that is to say that I couldn't see which actual bit of it had anything to do with Bluetooth, hence I came to the conclusion that this allowed a USB hub to be connected to the mbed and the Bluetooth dongle then plugged into this hub. This is not really what I was thinking (I was thinking of a dongle plugged directly into mbed) and I didn't see anything about a SPP profile in this implementation allowing serial data to be sent over Bluetooth. That all said it is a very impressive bit for work and gets 10/10 for 'cool factor'

Actually looking at it again there is mention of a BTDevice class so maybe I'll look at it again when I get some time...

19 Feb 2011

In Peter Barrett's project the USB hub is optional. You can plug a bluetooth dongle directly into GND, VU, D-, D+, using a breakout jack or development board helps expose these pins.

http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=556 http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=608

Not sure of the SPP profile though... I would be interested in that too.

15 Mar 2011

The BT stack is only partially implemented. BlueUSB as is deals only with hubs, mass storage, HID (rudimentary) and BT dongles. The BT stack provides the HCI and L2CAP layer. The testapp is maily geared towards the Wiimote. An RFCOMM layer is as yet not present. RFCOMM is not a core layer but required by many higher layers, I guess someone has to implement it. Specification can be found on the BT SIG and on google code is an rfcomm.c example. It's unlikely though that it fits snugly onto BlueUSB.

Ad