Skip to content

Guide to enable STDIO over bluetooth (using nimble)

Hendrik van Essen edited this page Jan 10, 2020 · 2 revisions

Beside USB-serial you can also access for example the device's shell via bluetooth. The following guide will explain how you enable this feature for your application on supported devices (e.g. nrf52dk)

  1. Enable the stdio-module by including USEMODULE += stdio_nimble in your application's Makefile
  2. (optional) UART can be disabled with CFLAGS += -DSTDIO_NIMBLE_DISABLE_UART, otherwise UART runs and can be used in parallel to the bluetooth connection
  3. To use automatic advertising of the device include USEMODULE += auto_nimble_advertise in your application's Makefile. It will take care to enable advertising on disconnect and disable on connect.
  4. Define the device name with CFLAGS += -DAUTO_NIMBLE_ADVERTISE_DEVICE_NAME='"name"'

You can download the matching android app (source) which was developed specifically for this module at the Google Playstore for your smartphone, but you can also use any other bluetooth developement app, like Nordics "nRF Connect"-App, available for Android and iOS.

Clone this wiki locally