Bluetooth: External radio coexistence using 3-wire interface

This sample demonstrates how to use Bluetooth® external radio coexistence.


The sample supports the following development kit:

Hardware platforms


Board name

Build target

nRF52840 DK





The application sets up an advertiser and implements a rudimentary PTA to test the coexistence. Enter g to grant or d to deny requests from Bluetooth. Since this is a basic implementation, the decision to grant or deny does not consider priority or direction of the requests.

  • When requests from Bluetooth are granted, packets are transmitted.

  • When requests from Bluetooth are denied, no packets are transmitted.

  • Number of packets transmitted is tracked by counting the RADIO->READY event.

  • The total number of transmitted packets is printed every second.

The application generates a grant signal on the pin selected by coex-pta-grant-gpios. Connect this pin to the pin defined by the grant-gpios property in the DTS using a jumper.

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

The application senses request signal on the pin selected by coex-pta-req-gpios. Connect this pin to the pin defined by the req-gpios property in the DTS using a jumper.

  • On nrf52840dk_nrf52840, the default pins are P0.28 and P0.03.

These two properties are defined in the DTS:

The board’s /zephyr,user node must have coex-pta-grant-gpios and coex-pta-req-gpios properties set. You can use this sample’s board overlay as an example.

Building and running

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

To build the sample with Visual Studio Code, follow the steps listed on the How to build an application page in the nRF Connect for VS Code extension documentation. See Building and programming an application for other building and programming scenarios and Testing and debugging an application for general information about testing and debugging in the nRF Connect SDK.


To test this sample, complete the following steps:

  1. Connect pin coex-pta-grant-gpios to pin grant-gpios on your development kit.

  2. Connect pin coex-pta-req-gpios to pin req-gpios on your development kit.

  3. Build and program the development kit.

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

  5. Observe the number of packets transmitted.

  6. Enter d to deny packet transmission.

  7. Enter g to grant packet transmission.


This sample uses the following sdk-nrfxlib libraries:

It also uses drivers from the nrfx libraries.

It uses the following Zephyr libraries: