5 years, 6 months ago.

IP over Blutheooth

Is it possible to run IP (6LowPan) over Bluetooth with mbed? I'm using a NRF51DK board, nordic semiconductors have an IoT sdk that supports IP over Bluetooth, can this be used with mbed? I would really appreciate an answer since we are using mbed in our engineering thiesis and are struggling with the radio part.

Daniel

1 Answer

5 years, 6 months ago.

IoT sdk on an nRF51 isn't known to be very stable. IP requires support for packet fragmentation and re-assembly for an MTU of up to 1500bytes; that's a very large part of the spare memory on the nRF51. IoT SDK on the nRF51 is experimental. Nordic wishes to relocate its IoT efforts to the nRF52.

We'll shortly be moving towards supporting nRF52; and then stitching an IP stack on top of L2CAP would be feasible.

In the absence of proper IP over BLE, it is still possible to simulate the socket API over a GATT pipe service.

Thank you for your answer.

Is there any documentation on how to to simulate the socket API over a GATT pipe service?

posted by Daniel Nordahl 29 Mar 2016

Daniel, please refer to https://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/file/ff83f0020480/ble/services/UARTService.h for a trivial implementation of a BLE pipe. You'll need to plug in your own APIs like socket::write() and socket::read() on top of UARTService.

UARTService is a poor choice for a name; think of it as a bidirectional-pipe.

posted by Rohit Grover 29 Mar 2016

Thanks for the reference, this would be useful when setting up a serial connection between devices. But still, would this be possible to use towards the existing IP stack in mBed? Our goal is to run some IP traffic over BLE (i.e. UDP, TCP or similar) so that we can realize IoT nodes directly in the devices. Appreciated if you could elaborate on how to implement such a "glue" layer using this reference.

posted by Daniel Nordahl 30 Mar 2016