Re: Nitrogen - Bluetooth RFCOMM sample

Johan Hedberg

Hi Lawrence,

On 21 Feb 2019, at 20.50, Lawrence King <> wrote:
I am trying to get my Nitrogen board to act as a 'classic' RFCOMM device, then build my own parser to handle the serial commands and responses from the host. I couldn't find a sample for RFCOMM in the zephyr/samples/bluetooth directory (no mention of SPP either). At a high level I know I need start the Bluetooth services, initiate pairing, pair, and then transfer bytes back and forth. I looked through the APIs but I am a beginner at Bluetooth and the necessary sequences didn't jump out at me.

Is there a sample RFCOMM program I can use? Or a pointer to a list of the appropriate APIs and sequence to call them? Thanks
As far as I know, the Nitrogen only has a single-mode (LE-only) Bluetooth radio, whereas RFCOMM (and SPP) is a BR/EDR (Bluetooth Classic) protocol, so you won’t be able to use it on this board. In general, BR/EDR support in Zephyr (RFCOMM included) is on a fairly experimental level, mainly due to lack of boards with dual-mode (LE + BR/EDR) Bluetooth controllers.

Your options for getting data over an LE connection are to either use the Generic Attribute Profile (GATT) or then an L2CAP Connection-oriented Channel.


Join to automatically receive all group messages.