nRF5 SDK v15.2.0
Experimental: Console over Bluetooth Application
This example requires one of the following SoftDevices: S132, S140

Important: Before you run this example, make sure to program the SoftDevice.

The Command Line Interface over BLE (CLI BLE) Application is an example that showcases how BLE NUS (Nordic UART service) can be used as a transport for a console.

The example folder contains a Python script that uses the PC BLE driver and an additional board to connect to the example and forward any BLE NUS traffic to a network port. A standard terminal, such as PuTTY, can be used to connect to a network port and run the console.

Console over RTT is also enabled in this example. Both consoles can be opened and used independently.

Note
This application is not power optimized!
The application will stop advertising after 3 minutes and 30 seconds and go to System Off mode. Press Button 1 to restart advertising.

Testing

Perform the following steps to test the CLI BLE Application:

  1. Install pc-ble-driver-py:
    pip install pc-ble-driver-py
  2. Compile and program the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  3. Start the ble_serial.py script, for example:
    ble_serial.py --snr 680834186 --name Nordic_CLI --com COM115 --family NRF51
  4. Open a terminal, for example PuTTY. Set the Connection Type to Raw and the Destination Address to 127.0.0.1:8889.
  5. Observe that the BSP_INDICATE_CONNECTED state is indicated.
  6. Press Enter in the terminal. A console prompt is displayed.
  7. Use the Tab key to print the available commands.
  8. Use commands led on and led off to control LED 4.
  9. Mandatory terminal settings:
    lib_cli_putty_cfg1.PNG
    ,
    Extra settings for RTT terminal:
    lib_cli_putty_rtt_cfg_2.PNG

Documentation feedback | Developer Zone | Subscribe | Updated