This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S130 Unstable advertising reports during scan (Updated)

I use S130 on two nrf51822/PCA10001 boards. Each nRF scans and advertises simultaneously. Scan parameters are:

    scan_param.active = 0;
  	scan_param.selective = 0;
 	scan_param.p_whitelist = NULL;
	scan_param.timeout = 0;
	scan_param.interval = 0x00A0;   // 100 ms
	scan_param.window = 0x009C;   // bit less than 100 ms

Advertising parameters are:

    m_adv_params.type  = BLE_GAP_ADV_TYPE_ADV_IND;
	m_adv_params.p_peer_addr = NULL;                           				
	m_adv_params.fp = BLE_GAP_ADV_FP_ANY;
	m_adv_params.interval  = 0x0320; // 500ms
	m_adv_params.timeout = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED;

In general it works, both nRFs receive adv packets and indicate it by flashing LED for 20mS. But I notice some gaps in receiving packets, sometime this gaps is about few seconds. For verification stability of sending advertising packets by nRFs I use third BLE device CSR1010, that only for scans and indicates advertising packets by LED and this one works fine fine: LED flashes stable, without any delays and gaps - so, packets are transmitted, while LEDs of nRFs flash with gaps. I have used Oscilloscope to record states of LEDs of two nRFs and CSR and made screenshot:

image description

So, could you explain this delays in receiving? Does it expected behavior? Might it be appeared when both transmit data at the same time, then why CSR receives packets at this time?

Parents
  • This is not expected behavior.

    A workaround is to decrease the scanning window slightly, please try 0x009E instead of 0x00A0.

    m_scan_param.interval     = 0x00A0;// Scan interval.
    m_scan_param.window       = 0x009E;  // Scan window.
    

    Edit: I have tried with the S130 0.9.0-1 alpha, it has the same behavior.

    Here is my project. I used SDK 7.1.0 (with the new S130 headers), and PCA10001. Extract it to

    C:\Keil_v5\ARM\Device\SDK7.1.0\examples\ble_central_and_peripheral\experimental

    It has a advertising interval of 500 ms.

    It toggles LED 1 every time it receives an advertising packet from device address search[]

    One idea could be to look into using the Radio Notification Event Handler to get more control over when you are advertising and when you are scanning. Do it manually.

  • Did you try when both devices Advertised? Or one scanned and second advertised?

Reply Children
No Data
Related