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.

CC2640R2L: Scanning fail in runtime

Part Number: CC2640R2L


Hi ,

We are using BLE module in two different products in which both has Peripheral + Observer Role.

In BLE module, to confirm scanning properly working or not we are using SCAN_PERIOD_EVENT which confirms BLE scans periodically.

Issue : During run time this event stops coming randomly and then BLE never scans any beacon.

We observed that in both devices sometimes scanning fails 20 to 30 times in a day and sometimes 2 to 4 times in a day and its random.

We assume that many people may came across this issue, can you please let us know what could be the solution of this ?

Configuration of both BLE in products.

1st device :

SDK - 2.30 

Role - Peripheral + Observer

Example - Host test

blestack-5

BLE always in connected with scanning mode with another central decide.

All interface is with external micro in HCI protocol

2nd device :

SDK - 4.20 

Role - Peripheral + Observer

Example - Simple Peripheral Observer 

blestack-4

BLE always in scanning mode only

No external micro.

Regards,

Bhavin 

  • Hi Bhavin,

    Thank you for opening a separate thread for this problem! Similar to the other one, I'm assigning a TI expert to weigh in on this. To help him, can you give us some more information about this please.

    1. You said in your post:

    We observed that in both devices sometimes scanning fails 20 to 30 times in a day and sometimes 2 to 4 times in a day and its random.

    How many times per day does the device scan? This would be found by calculating 1 / (Scanning Interval). This will give us an idea of how frequently it is failing with respect to the number of times the device scans.

    2. What kind of environment is your device in? If the beacon is placed in an environment where there is a lot of RF interference then I would not be surprised if the device cannot scan the beacon every single time because there may be other devices advertising at the same time.

    3. Are your devices operating as peripherals or observers? Peripherals don't scan, rather, they advertise. Observers however do scan.

    4. You also say

    BLE always in connected with scanning mode with another central decide.

    If you're in a connection, you cannot be scanning. Rather, scanning is the process that can lead to a connection. You may find the Scanning and Advertising and Connections Pages of the SimpleLink Academy helpful for this.

  • Hi Nathan,

    Please find answers.

    1. You said in your post:

    We observed that in both devices sometimes scanning fails 20 to 30 times in a day and sometimes 2 to 4 times in a day and its random.

    2. What kind of environment is your device in? If the beacon is placed in an environment where there is a lot of RF interference then I would not be surprised if the device cannot scan the beacon every single time because there may be other devices advertising at the same time.

    Answer : 

    There is possibility of many BLE devices as this is development area.

    3. Are your devices operating as peripherals or observers? Peripherals don't scan, rather, they advertise. Observers however do scan.

    Answer :

    BLE Role is Peripheral+Observer but at a time only one role will work ( Controlled by application ) and most > 99% of this device will remain in observer role only

    4. You also say

    BLE always in connected with scanning mode with another central decide.

    If you're in a connection, you cannot be scanning. Rather, scanning is the process that can lead to a connection. You may find the Scanning and Advertising and Connections Pages of the SimpleLink Academy helpful for this.

    Regards,

    Bhavin P

  • Hey Bhavin,

    Thanks for your reply. To quickly comment:

    I apologize for any confusion, it is certainly possible to scan after a connection is made. Scanning is used to discover advertisements and (if desired) enter a connection. The stack should manage connection events and scans simultaneously. What Nathan specifically refers to is that a connection event cannot be serviced properly while a scan is ongoing (the device cannot both RX and TX at the same time). If a scan is ongoing, the stack will "pause" the scan to service the connection event.

    For the original issue: would it be possible to test this out on the latest SDK? Can you also track the heap (see Debugging Common Heap Issues in our User's Guide) to rule out any memory issue? How do you recover from this issue when it occurs? I.e. does the device assert or are you able to continue scanning again after a certain amount of time?

  • Hi Ammar,

    Thanks for response. If you will see my query from starting on wards then i have mentioned that we are using two types of devices, in both we are facing  same problem.

    In one device it always remains in connection mode + Scanning and in another always in scanning.

    Answers of your queries.

    For the original issue:

    would it be possible to test this out on the latest SDK?

    Ans:I haven't checked on latest SDK but do you think is there any improvements in this area ?

    Can you also track the heap (see Debugging Common Heap Issues in our User's Guide) to rule out any memory issue?

    Ans: I need to look as per guide

    How do you recover from this issue when it occurs? I.e. does the device assert or are you able to continue scanning again after a certain amount of time?

    Ans : Currently i do reset the device - HCI_RESET( )

    Regards,

    Bhavin P