Enhanced ShockBurst: Receiver

The sample shows how to use the Enhanced ShockBurst (ESB) protocol in receiver mode. It shows how to configure the Enhanced ShockBurst protocol to receive packets.


The sample supports the following development kits:

Hardware platforms


Board name

Build target


nRF5340 DK





nRF52 DK




nRF52 DK (emulating nRF52810)




nRF52840 DK




nRF52833 DK




nRF21540 DK




Additionally, if you want to test the Enhanced ShockBurst Transmitter functionality, you need to build and run the Enhanced ShockBurst: Transmitter sample. You can use any two of the listed development kits and mix different development kits.


The sample consists of one Receiver that uses the Enhanced ShockBurst library. After building and programming each sample on an nRF52 Series development kit, you can test that packets that are sent by the kit that runs the Transmitter sample are picked up by the kit that runs the Receiver sample. Successful communication is indicated by LED changes, which should be in sync on both kits.

The Receiver sample listens for packets and sends an ACK when a packet is received. If packets are successfully received from the Transmitter, the LED pattern changes every time a packet is received.

User interface

LED 1-4:

Indicate that packets are sent or received. The first four packets turn on LED 1, 2, 3, and 4. The next four packets turn them off again in the same order.


See Configuring your application for information about how to permanently or temporarily change the configuration.

Building and running

The Receiver sample can be found under samples/esb/esb_prx in the nRF Connect SDK folder structure.

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

FEM support

You can add support for the nRF21540 front-end module to this sample by using one of the following options, depending on your hardware:

  • Build the sample for one board that contains the nRF21540 FEM, such as nrf21540dk_nrf52840.

  • Manually create a devicetree overlay file that describes how FEM is connected to the nRF5 SoC in your device. See Set devicetree overlays for different ways of adding the overlay file.

  • Provide nRF21540 FEM capabilities by using a shield, for example the nRF21540 EK shield that is available in the nRF Connect SDK. In this case, build the project for a board connected to the shield you are using with an appropriate variable included in the build command, for example SHIELD=nrf21540ek. This variable instructs the build system to append the appropriate devicetree overlay file.

    To build the sample in the nRF Connect for VS Code IDE for an nRF52840 DK with the nRF21540 EK attached, add the shield variable in the build configuration’s Extra CMake arguments and rebuild the build configuration. For example: -DSHIELD=nrf21540ek.

    See nRF Connect for VS Code extension pack documentation for more information.

    See Programming nRF21540 EK for information about how to program when you are using a board with a network core, for example nRF5340 DK.

Each of these options adds the description of the nRF21540 FEM to the devicetree. See Working with RF front-end modules for more information about FEM in the nRF Connect SDK.

To add support for other front-end modules, add the respective devicetree file entries to the board devicetree file or the devicetree overlay file.


After programming the Transmitter sample on one of the development kits and the Receiver sample on the other kit, you can test their functionality.

Complete the following steps to test both the Transmitter and Receiver samples:

  1. Power on both kits.

  2. Observe that the LEDs change synchronously on both kits.

  3. Optionally, connect to the kits with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.

  4. Observe the logging output for both kits.


This sample uses the following nRF Connect SDK library:

In addition, it uses the following Zephyr libraries: