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.