This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC2640R2: CC2640 can't capture all packets

Part Number: LAUNCHXL-CC2640R2


Hi,

I have the same issue. I can't capture all packets, which I send by other device. I use simple observer to scanning and I set scan interval to 16000ms, scan window to 16000ms and scan duration to 0. I send packets with 330ms interval. and I receive max 90% packets. Any idea what I did wrong?

Regards,
Ma Ri

  • Hello,

    Did the responses in the original question help? What were the results?

    I am looking into this further, please allow me a few days and I will get back with you.
  • Hi,

    thanks for Your reply. The responses in the original question didn't help. I set scan window greater than advertising interval and device scans on 3 channels, but  I send advertising packets on only one channel. I'm working in busy environment - when I use SmartRF Studio sometimes appears "buffer overflow", but SmartRF Studio captures more packets than my software.

    Regards,

    Ma Ri

  • Thanks for that information.

    What have you set your DEFAULT_MAX_SCAN_RES to? You may try increasing this to 16 to see if your packet rate is increased.

    Will it be possible to test your device in a non-noisy environment? The device will scan for other devices too, which increases the likelihood of missing a packet from the device you're listening to.

    Additionally, you can try temporarily adding the device you're observing to the whitelist. This will ensure you're only observing the one device, giving you more accurate readings for received packets.

    //remember to change the values below to the BDA of your central device
    static uint8 bdAddressPeer[6] = {0x00,0x90,0x78,0x56,0x34,0x12};
    HCI_LE_AddWhiteListCmd(ADDRMODE_PUBLIC, bdAddressPeer);

    Be sure to change the BDA to your device.

    Let me know if that helps narrow down the issue!

  • Hello,

    Can I use white list without connection to device which I observe? I have to use passive scanning, so either I did something wrong with white list configuration or it doesn't works with passive scanning. When I set other bdAddressPeer in white list configuration, can the reciver recive any frames from my device?

    Cheers,

    Ma Ri

  • Hey,

    I tested out using the whitelist while observing, and yes, you can use the whitelist. Don't forget to change the DEFAULT_DISCOVERY_WHITE_LIST to GAP_DISC_FILTER_POLICY_WHITE in the Constants section. Additionally, make sure your bdAddressPeer is in little endian. For example, if your address is 0x123456789ABC, then bdAddressPeer would be {0xBC, 0x9A, ... , 0x12}.

    I've edited my previous response, as the code to add devices to the whitelist included one unnecessary line.
  • Hi,

    thank You, my white list works, but I still lose many packets. I use only one advertising channel to send packets, maybe I lose packets during scan for the other advertising channels. Is any possibility to scan only one channel? How it's made in SmartRF Studio? 

    Regards,
    Ma Ri

  • I apologize for the delayed response. I am seeking the assistance of my colleagues to help narrow down the issue.

    Are you able to test in a less noisy environment?
  • Hi,

    unfortunetely I work in noisy environment. But I found mistake - I set DEFAULT_SCAN_DURATION to 4000 and DEFAULT_SCAN_WINDOW to 6000, so it should finish scannning before scanning on 38 channel, but my device scans on 37 channel long time, then it scans on 38 channel short time and It repeats all the time. So when device scans on 38 channel, I miss my frames, which I send on 37 channel. Is any posibility to scan on only one channel? Maybe cancelling and init BT in properly time or using CMD_BLE commands? 

    Regards,

    Ma Ri

  • Unfortunately, to comply with the Bluetooth Core Spec, the device must scan on all three advertising channels. http://www.bluetooth.com/.../adopted-specifications

    The device should scan on each channel the same length of time. There's more detail here: http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC2640R2%20SDK%2FSimpleLink%20Academy%2FBluetooth%204.2%2FScanning%20and%20Advertising

    Can you try adjusting your scan parameters temporarily just to verify that each channel scans at identical intervals?

  • Hi,

    yes, I can adjust this parameters, but when device scans on three channels, I lose 66% of my packets. If I advertise in 3 channels, I will capture all packets, but I must send packets in only one channel beacause I must save energy. How SmartRF Studio scans on only one channel? When I choose channel 37 for scanning, it captures almost all packets, so I think that it doesn't scan 38 and 39 channel.

    Regards,

    Ma Ri

  • I'm not too familiar with using SmartRF Studio for this purpose.

    Can you try using Btool to measure the PER? There is documentation here: dev.ti.com/.../index.html.

    You'll need to flash a device with Host Test software, and then establish a connection with the device that is advertising. Then, execute the HCI command HCIExt_PacketErrorRateCmd. It should give you the results you are looking for.

    Let me know if you'd like clarification on the process. Please post the results, as I'm curious as to how they compare with your tests with SmartRF Studio.
  • Hello,

    I haven't heard from you in a few days. I am going to close this thread due to inactivity. To reopen the thread, simply post a reply.

    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.