Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Difference Advertising Data and ScanRSP data.

Hello Nordic,

I have to transmit data from the nRF Chip(now i'm testing nRF52832 DK Board) to a PC on UART serial.

Each beacon has transmitted advertising and scanRSP data.

I have confirmed that following the transmission of advertising data comes the scanRSP data.

I'm seeing the data(ADV+RSP) through the debugger terminal on Segger Embedded Studio. It is no problem.

However, when I transmit the confirmed data(ADV+RSP) through serial, the PC program (DLL) prints only ADV data.

If I transmit only scanRSP data, the DLL program prints RSP data and the print interval is about 20s (I have transmitted scanRSP every second).

The same thing occurs even after changing the UART priority (HIGHEST)

The output for scanRSP and advertising data is received by its own, but when I attempt to receive both, the scanRSP data is not outputted. 

Is there anyway for me to receive both scanRSP and advertising data such that I am able to read both? What is the reasoning behind not being able to see both forms of data simultaneously?

I have tested and confirmed that it was not due to the DLL, as its only function is to print out UART RX buffer data.

I am currently using

  • nRF52832 DK board
  • SDK 14.2
  • Receiver app = ble_app_uart_c
  • beacon app = ble_app_beacon

Thanks. 

Parents
  • Hello,

    This sounds like an application issue. There is no reason why you should not be able to print the Scan response data.

    I assume that you are trying to print the data in the BLE_GAP_EVT_ADV_REPORT event, right?

    Could you include the snipped inside this event? How do you transmit the data from the advertising packets?

     

    Do you see that event for the scan response as well?

    Do you try to print something, which you can't see, or are you missing the events?

     

    Best regards,

    Edvin

  • Yes, I know that the ADV data and Scan Rsp data is same report.

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {
        ret_code_t            err_code;
        ble_gap_evt_t const * p_gap_evt = &p_ble_evt->evt.gap_evt;
        uint8_t rssi_value;
        ble_gap_addr_t peer_address;
       
       
        switch (p_ble_evt->header.evt_id)
        {
            case BLE_GAP_EVT_ADV_REPORT:
            {
                ble_gap_evt_adv_report_t const * p_adv_report = &p_gap_evt->params.adv_report;
                if(p_adv_report->scan_rsp == 1)
                {
                    for(int i=0; i<31; i++)
                    {
                      SEGGER_RTT_printf(0, "%02x", p_adv_report->data[i]);
                      app_uart_put(p_adv_report->data[i]);
                    }
                    SEGGER_RTT_WriteString(0, "\n");
                }
                
                else if(p_adv_report->scan_rsp == 0)
                {
                  for(int i=0; i<31; i++)
                    {
                      SEGGER_RTT_printf(0, "%02x", p_adv_report->data[i]);
                      app_uart_put(p_adv_report->data[i]);
                    }
                    SEGGER_RTT_WriteString(0, "\n");
                }

    So, I have tested by using the Oscilloscope to confirm the TX Pin Signal of  nRF52832 chip on the board(P0.06).

    When the each advertising data and the scan rsp data was sent, the TX pin of the DK board has a correct signal.

    However, in the beacon that i made using the nRF52832 chip, the advertising data showed a correct signal, but the scan ras data did not come out. This was also measured at the TX pin (P0.06).

    There are same firmware and same enviroment in the DK board and my beacon.

    If my beacon is designed in the wrong way and the signal does not come out properly, why is the ADV data coming out well and not the scan data?

    Why this reason happend? I don't understand... thanks Edvin.

  • Hello,

    I am still trying to figure out whether the issue is BLE related, or UART related. Do you get the event when you receive the scan response? What happens if you e.g. toggle a pin/LED when scan_rsp == 0 and toggle another when scan_rsp == 1? Does both of the pins toggle?

     

    Would it be possible for me to recreate the issue that you are seeing? If you could send both the beacon application and the scanner, I can see if I can see the same behavior as you.

     

    BR,

    Edvin

  • Thanks for your trying.

    I have tested with LED. When the scanrsp == 1, LED is on and the other side, LED is off.

    The result is that the LED is Blinky but the interval is very slowly.

    I have configured scanning every sec. but the scan rsp data does not come out every sec.

    A few tens of seconds short, and a few minutes long.

    I think the problem was caused BLE.

  • What are your scanning parameters, scan_interval and scan_window set to?

    If you send the projects, I can see if I can figure out the reason.

     

    BR,

    Edvin

Reply Children
No Data
Related