Enhanced ShockBurst: Transmitter/Receiver

The Enhanced ShockBurst Transmitter/Receiver sample shows the basic steps that are needed to transmit and receive packets using Enhanced ShockBurst (ESB).


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


The Transmitter example sends a packet, waits for a configurable time (50 milliseconds by default), and then sends another packet. In each packet, the four least significant bits of the first byte of the payload are incremented (or reset to zero when they reach 16). The LEDs indicate that packets were sent and acknowledged. Therefore, if packets are successfully received and acknowledged by the Receiver, the LED pattern will change every 50 milliseconds (with the default delay).


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


The sample supports the following development kits:

Hardware platforms


Board name

Build target

nRF52840 DK




nRF52 DK




You can use any two of the development kits listed above and mix different development kits.

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.

Building and running

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

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


After programming the Transmitter sample on one of the development kits and the Receiver sample on the other kit, test them by performing the following steps:

  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 libraries:

In addition, it uses the following Zephyr libraries: