Bluetooth: External radio coexistence using one-wire interface

This sample demonstrates how to use the 1-wire coexistence feature described in Bluetooth® external radio coexistence.

Overview

The application sets up an advertiser and configures the 1-wire coexistence feature. The user can enter g to grant or d to deny Bluetooth radio activity.

  • When Bluetooth radio activity is granted, packets will be transmitted.

  • When Bluetooth radio activity is denied, no packets will be transmitted.

  • The number of packets transmitted is tracked by counting RADIO->READY event.

  • The total number of transmitted packets will be printed every second.

The application generates a grant signal on the pin selected by coex-pta-grant-gpios. This pin has to be connected to the pin defined by the grant-gpios property in the DTS using a jumper cable.

  • On nrf52840dk_nrf52840, the default pins are P0.26 and P0.02.

The board’s /zephyr,user node must have the coex-pta-grant-gpios property set in the device tree. This sample’s board overlay can be used as an example.

Requirements

The sample supports the following development kit:

Hardware platforms

PCA

Board name

Build target

nRF52840 DK

PCA10056

nrf52840dk_nrf52840

nrf52840dk_nrf52840

Building and running

This sample can be found under samples/bluetooth/radio_coex_1wire in the nRF Connect SDK folder structure.

See Building and programming an application for information about how to build and program the application.

Testing

  1. Build and program the development kit.

  2. Connect to the kit with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.

  3. Watch the number of packets transmitted.

  4. Enter d to deny packet transmission.

  5. Observe that packet transmissions have stopped.

  6. Enter g to grant packet transmission.

  7. Observe that packet packet transmissions have re-started.

Dependencies

This sample uses the following sdk-nrfxlib libraries:

The sample also uses drivers from nrfx libraries.

The sample uses the following Zephyr libraries: