Skip to content

Raw BLE

This example shows how to use low level BLE nodes to communicate with a BLE (server) device. It implements Duetware's lwM2M commands simply because it is considered that the majority of users have at least one TapNLink Primer kit or a Tapioca in their possession, but the elementary nodes used are not related to the Duetware environment in any way. They can therefore be adapted to different BLE devices without the IoTize lwM2M implementation.

BLE devices

Hardware

You need any BLE device to see the result of the SCAN command. To go further and launch certain lwM2M commands, you will need a TapNLink (or Tapioca) module. Indeed, a filter is defined to select the only TapNLink BLE service and communicate through its characteristics.

Dashboard components

The SCAN process is statred by clicking on the SCAN button. It will fill a table with the list of the found BLE devices. Then a select component allows to specify one of the elements of the table, and the Connect button will launch a serie of lwM2M commands in order to read the model of the Tap, its serial Number and its firmware version.

Dataflow graph

Dataflow

We can consider the different areas in the graph:

  1. UID definitions (nodes #16, #17, #25) to specify the BLE service and its characteristics.

  2. SCAN launch: the button (#2) starts the scan process through the BLE Start Scan node (#1).

  3. The result of the SCAN process is filled in a JSON file and linked to the variable at node #285. The select graphical component is also updated with this list.

  4. The Connect button start the connection and start the service if available.

  5. The lwM2M commands are prepared into the variable CmdToSend (#134)

  6. then sent through the node Write BLE characteristic (#13),

  7. The answer from the Tap is read thanks to the Listen BLE characteristic node

  8. and the answers are then dispatched and displayed into the right graphical components (#262, #263 and #264)

Back to top