This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Analyze timing of periods with active softdevice/bluetooth communication using modified relay software (NRF52, Softdevice s132 v5.0.0)

Hello everyone,

we are developing a bluetooth application based on the relay example included in SDK 14.0.0. We have already developed our own services and characteristics and the communication generally works fine. Now we would like to examine the timing of the different phases (application based processing, softdevice activity) during communication by toggling GPIO pins and analyzing the pin states using an oscilloscope. We are interested in the phases/periods in which the softdevice handles communication both in regard to the peripheral and to the central. Which events provided by the softdevice can be used to set/clear our GPIO pins in order to analyze timing? What we are interested in is not only when bluetooth communication is active, but also how long (from start until end of each communication interval).

Here some background information regarding our setup:

Altogether three devices are used in our application: two self-developed boards containing an NRF52, and one NRF52DK board.  One of the self-developed boards acts as relay, and at the beginning scans for the advertising message of the other self-developed board (peripheral). The relay connects to the peripheral but does not yet activate notification of the peripherals’ characteristic. As long as the relay is only connected to the peripheral, it simultaneously sends out its own advertising message. The DK board is used as central and scans for the advertising message of the relay. It automatically connects to the relay based on the UUID and then it activates notification of the relay service/characteristic. In that case, the relay activates notification of the corresponding characteristic of the peripheral. Also, the central activates notification of the relay. The relay preprocesses the data received by the peripheral together with its' own data and transmits all output data to the central. After connection establishment none of the devices advertises or scans anymore. The central (DK board) transmits the received data via NRF_LOG-commands either by UART or RTT to the PC. 

  • Hi Sigurd,

    Thanks for your answer. In our case, the description under "Radio Notification with concurrent peripheral and central connection events" is relevant. The description says:

    “The Peripheral link events are arbitrarily scheduled with respect to each other and to the Central links. Therefore, if one link event ends too close to the start of a peripheral event, the notification signal before the peripheral connection event might not be available to the application.”

    Is there any way to influence the timing difference between the peripheral link events and the central links events? Maybe by timing the connection “activation” to the central in regard to the already established peripheral connection?  

    Should I better mark your answer as “solved” and post this question separately?

Related