Electronic – Bluetooth Module for RFCOMM Channel

bluetoothmicrocontrollerwireless

I need to find a Bluetooth 2.1 + EDR module that will allow a uC to communicate directly over an RFCOMM channel once it has been established.

The problem is I can only find modules which implement the full stack up to the Serial Port Profile (SPP), which is not supported by the device that will be pairing with the module.

Does anyone know of modules that can do this, what they are called, or what/where to search?

Edit: I know it's possible to just by the "raw" bluetooth controller, and then have the uC implement the full stack, and communicate using the HCI. But looking for a simpler solution. If this type of module doesn't exist I'm wondering if there are any Bluetooth stack implementations that would work well on the ARM Cortex-M3 family.

Best Answer

I've tested the Bluegiga bluetooth modules with iwrap ascii interface and they allow allow you to open "raw" rfcomm connections.

The most basic one is the WT12 which has the rfcomm features you need. WT11i is a longer range version and WT41 is a super long range version. WT32 has more advanced audio features such as A2DP.

You need to create an account on their techforum in order to get access to the latest iwrap user guide>(https://techforum.bluegiga.com/protectedstore/29110/8424/127/bluegiga_1698/193d9e1a2cdeccd840dd613f9f3262e5/iWRAP5_User_Guide.pdf)

The process is slightly different depending on weather you are opening an rfcomm channel from the module to the external device, or the external device is opening the connection to you.

As you probably know, when opening a new connection, the normal way for discovering what RFCOMM channel should be used, is to check in the SDP entries for a service and the RFCOMM channel for it.

However with iwrap you can skip the SDP discovery step if you know the RFCOMM channel to call. In order to open an rfcomm channel to another device the command you need to give is "CALL 00:07:80:80:52:27 1 RFCOMM". For further details check the documentation for the CALL command.

You can still do a manual SDP queries as well to discover the rfcomm channel of any service or even the l2cap channel for services which don't use rfcomm.

Communication over the rfcomm can be in "transparent" mode in which case every letter you send over UART will be transmitted over bluetooth. Alternatively you can use a simple binary packet format called mux frame. In either case you can configure gpio pins to toggle when you have a connection and when you don't and even use autocall to make the rfcomm connection open automatically when you boot up the module.

If you need the external device to call the module, the other device can call the rfcomm channels directly as well. There is an incoming rfcomm channel already initialized for the SPP profile which has the number 1. And don't get scared about the SPP part in the incoming call, the SPP for the module just means that the correct sdp entry is registered, but any external device capable of calling an rfcomm channel directly (like another iwrap module) can call the rfcomm directly without reading the sdp entries.

Edit: Oh, and if you are looking for a breakout board, here's one: http://www.inmojo.com/store/jeff-rowberg/item/wt12-bluetooth-breakout-board/ (though you really shouldn't be putting any pcb or metal infront of the antenna like in that design, the range will be affected according to Bluegiga RF layout guidelines, but not function so works for testing).