Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

SCAN_REQ and SCAN_RSP logging

Hello, I have a question about the scan request event.

I checked the logs of BLE_GAP_EVT_SCAN_REQ_REPORT.  If this event is received, does Softdevice recognize the packet as SCAN_REQ properly and surely send back SCAN_RSP?  If there are any problems in receiving a SCAN_REQ packet (e.g. CRC error), can I see any logs/messages?  Or if there are any problems in sending a SCAN_RSP packet, can I see any logs/messages as well?

I am looking for any tools/methods to make sure the scan response procedure works in the software level.

[Environment]

nRF52832 custom board

nRF5 SDK 17.1.0

Softdevice S132 v7.0.1, 7.2.0, 7.3.0

Sample source code : ble_peripheral\ble_app_blinky

 

[Modification]

I added the following lines in main.c and built a debug module.  The log messages are seen.

// In advertising_init

    adv_params.scan_req_notification  = 1;

 // In ble_evt_handler

         case BLE_GAP_EVT_SCAN_REQ_REPORT:

            NRF_LOG_INFO("SCAN_REQ");

            break;

Parents
  • Hi Vidar, Thank you so much for your answer.

    I understand the first two answers.  For the third one, regardless of ACK, I wanted to know the logging mechanism to confirm that Softdevice completes the SCAN_RSP sending procedure.

    Seeing a sniffer log below, SCAN_RSP is missing after some of SCAN_REQ packets.  But the sniffer might have missed the packet and the peripheral device might have worked well.  So, the sniffer log is not helpful.  I will collect more Info, and I may ask some more questions related to this.

    Regards,

    Toru (Felipe1)

Reply
  • Hi Vidar, Thank you so much for your answer.

    I understand the first two answers.  For the third one, regardless of ACK, I wanted to know the logging mechanism to confirm that Softdevice completes the SCAN_RSP sending procedure.

    Seeing a sniffer log below, SCAN_RSP is missing after some of SCAN_REQ packets.  But the sniffer might have missed the packet and the peripheral device might have worked well.  So, the sniffer log is not helpful.  I will collect more Info, and I may ask some more questions related to this.

    Regards,

    Toru (Felipe1)

Children
Related