Using Bluetooth external radio coexistence

This guide describes how to add support for Bluetooth® coexistence to your application in nRF Connect SDK.

The coexistence feature can be used to reduce radio interference when multiple devices are located close to each other. This feature puts the Bluetooth stack under the control of a Packet Traffic Arbitrator (PTA) through either a three-wire interface or a one-wire interface. The feature can only be used with the SoftDevice Controller, and only on nRF52 Series devices.

The implementation is based on Bluetooth External Radio Coexistence which is integrated into nrfxlib’s MPSL library.

3-Wire coexistence protocol

Resources

The bluetooth 3-wire coexistence implementation requires exclusive access to NRF_TIMER1, in addition to the GPIO, GPIOTE and PPI resources listed in Bluetooth External Radio Coexistence.

Enabling 3-wire coexistence and MPSL

Make sure that the following KConfig options are enabled:

Configuring 3-wire coexistence

For more information about devicetree overlays, see Use devicetree overlays. A sample devicetree overlay is available at samples/bluetooth/radio_coex_3wire/boards/nrf52840dk_nrf52840.overlay. The elements are described in the bindings: dts/bindings/radio_coex/sdc-radio-coex-three-wire.yaml.

Priorities and scanner mode can be configured or updated at run time.

Role-based priorities

You can use a different priority for a session when requesting it, based on the session’s role: advertiser, scanner, or being connected as central or as peripheral. To do so, use the HCI VS command SDC_HCI_OPCODE_CMD_VS_COEX_PRIORITY_CONFIG. Its parameters are described in sdc_hci_cmd_vs_coex_priority_config_t.

Scanner request mode

You can configure how the scanner requests coexistence sessions: either it requests a session as soon as it has received a valid access address, or it only requests a session before transmitting. To do so, use the HCI VS command SDC_HCI_OPCODE_CMD_VS_COEX_SCAN_MODE_CONFIG. Its parameters are described in sdc_hci_cmd_vs_coex_scan_mode_config_t.

Sample application

A sample application for 3-wire coexistence can be found at samples/bluetooth/radio_coex_3wire.

1-Wire coexistence protocol

Resources

The bluetooth 1-wire coexistence implementation requires access to the GPIO, GPIOTE and PPI resources listed in Bluetooth External Radio Coexistence.

Enabling 1-wire coexistence and MPSL

Make sure that the following KConfig options are enabled:

Configuring 1-wire coexistence

Configuration is set using the devicetree (DTS). For more information about devicetree overlays, see Use devicetree overlays. A sample devicetree overlay is available at samples/bluetooth/radio_coex_1wire/boards/nrf52840dk_nrf52840.overlay. The elements are described in the bindings: dts/bindings/radio_coex/sdc-radio-coex-one-wire.yaml.

Sample application

A sample application for 1-wire coexistence can be found at samples/bluetooth/radio_coex_1wire.