This BLE-Thread switched multiprotocol example requires you to run the following example:
This example application is based on the ble_app_uart example available in nRF5 SDK. It has been modified to support switching between two connection modes, BLE and Thread:
ble_app_uart
, utilizing Nordic's BLE UART Service.simple_coap_server
example board. After transmission of the CoAP message, the device switches back to the BLE mode.The mode is switched from BLE to Thread in the following situations:
led
is received through the Bluetooth connection.The mode is switched from Thread to BLE in these situations:
LED assignments:
Button assignments:
You can find the source code and the makefile in the following folder: <InstallFolder>\examples\multiprotocol\ble_thread\ble_thread_swi_mtd_coap_cli
simple_coap_server
example to one of the boards and switch it on. LED 1 will start blinking (attaching to a Thread network) and, after a few seconds, it will turn solid (attached to a Thread network or Thread network created): ble_thread_switched_mtd_coap_client
should be solid. led
and tap SEND. LED 2 on the ble_thread_switched_mtd_coap_client
board will switch on for a few seconds. The BLE connection will be disconnected and the node will start Thread attachment procedure (LED 2 switched on). When the Thread attachment procedure is finished, the node will send a CoAP message to toggle LED on the simple_coap_server
board. When the message is received, the simple_coap_server
board will toggle LED 4. Then, the ble_thread_switched_mtd_coap_client
node will disconnect from the Thread network (LED 2 switched off) and start BLE advertising (LED 1 blinking).ble_thread_switched_mtd_coap_client
node starts advertising again, you can repeat the procedure starting from point 5.