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.

CC2652R7: Peripheral not getting detected in broadcaster mode.

Part Number: CC2652R7

I am working with the simple peripheral example in the launchpad and on setting the “Legacy Event Properties Options” to "Connectable and scannable undirected" in simple_peripheral.syscfg file, a device address is displayed on the terminal as shown in figure 1 and the device is detectable by other BLE device.

On shifting it to “Non-connectable and Non-scannable undirected” mode no address is displayed on the terminal as shown in figure 2 and also other BLE devices are not able to detect it.

I want to calculate how many packets were received by a central device in a particular time from a broadcaster in given time and for that I need to identify the broadcaster.

  • Hi,

    Thank you for reaching out to us. If the advertisements are changed to non-scannable non-connected, then no Bluetooth LE device that is operating in a scanning role will scan or report the advertisements. This is expected behavior as the advertisements are specifying that they should not be scanned or used to form a connection.  If you wish to measure the throughput of the device via advertisements, then you will need to set the advertisements to at least scannable. You can then modify your central project to continuously scan and check if an advertisement belongs to your peripheral and measure the time between packets as well as the size of the packet payload.

    If you are interested in the connection throughput, then I would suggest referencing the Bluetooth 5 Throughput Demo projects we have available on the ble_examples github repo.

    Best Regards,

    Jan

  • Hi Jan,

    Thanks for the quick response. I am new to BLE so please fell free to correct me if I am wrong.

    If I want to work with the non scannable non connectable mode than in what configuration should the observer work in to receive the information from the broadcaster? and if there is no way to receive information from broadcasters working in this mode than what is the use of this mode?

    Additionally, doesn't BLE beacons not function in this mode?

  • Hi,

    No worries! My apologies, I misspoke earlier. Non-scannable advertisements can be scanned by scanning devices, but they will not respond to a scan request and send a scan response. The non-scannable non-connectable configuration should only be used in beacon use cases. When in the Non-Scannable Non-Connectable configuration, the device will advertise data that any scanner can read, but will not respond to scan requests and is unable to form connections.

    Best Regards,

    Jan

  • Hello Jan,

    As you mentioned - "in the Non-Scannable Non-Connectable configuration, the device will advertise data that any scanner can read" so this is the exact issue I am facing. When I am keeping my device in Non Scannable Non connectable configuration I am not able to see any device address assigned to the peripheral which I can use to track the peripheral device at observer. 

    Also, I am not able to track it using its device name as well.   

  • Hi,

    Understood, my apologies! Can you share how you are scanning?

    Best Regards,

    Jan

  • I am using the simple_central project on another BLE device. Also I tried finding the device on my mobile using BLE scanner app and on PC using -  chrome://bluetooth-internals/#adapter

  • Hi Garvit,

    When using non-scannable advertisements, the device will not send scan responses. If the central device uses the scan response to identify nearby devices then it will not be able to detect it.The scanner should instead look for advertisements themselves and not the scan responses.

    Best Regards,

    Jan

  • Hi Jan,

    Can you please guide me about how to modify the simple central project to do so?

    Thanks

  • Hi Garvit,

    No problem! Looking through the code, it seems that by default we are filtering out any packets that are not connectable as shown below:

    To capture non-connectable packets, you will need to remove the SCAN_FLT_PDU_CONNECTABLE_ONLY define from the temp16 variable. I am not sure exactly which packets you would like to filter, so I would suggest referencing the gap_scanner.h file. Specifically, the section that lists the filter types shown below:

    You can add which ever filter you would like to apply to your scanner (provided they do not conflict with each other) and the scanner should only process those packets. Let me know if you are able to see the desired packets after making the modification to the filter paramters.

    Best Regards,

    Jan

  • Hi Jan,

    Thanks a lot Jan for the insights you shared in pervious reply.

    I modified the temp16 to temp16 = SCAN_FLT_PDU_NONCONNECTABLE_ONLY | SCAN_FLT_PDU_COMPLETE_ONLY;

    The issue I am facing now are - 

    1) How to modify simple_peripheral code to assign the device a address in non-connectable and non-scannable mode? Even if  the simple_central project is scanning for non-connectable advertisement it would need some way to identify the device but currently simple_peripheral is not assigning any address to device in this mode.

    2) On modifying the simple_central code it is entering in the error.c file at following location and stops execution.

    Thanks,

    Garvit

  • Hi Garvit,

    I believe the simple_peripheral project still has an address (even if its not being printed), so we can identify which is the correct device if we modify the simple_peripheral code to print out the address or if we add some unique advertising data that we can look for on the simple_central side. Do you have access to a bluetooth sniffer? If so, then this will help us figure out if we are sending out the packets properly.

    For 2), can you provide the return code of the GapScan_SetParam() as well as the call stack you have when you pause the execution at the error function? I would like to see exactly how the program got to that area.

    Best Regards,

    Jan

  • Hi Jan,

    Sorry for delayed response. I was learning about packet sniffers and it seems to me we need to have some specific hardware to work with it which I don't have currently available.

    When I am trying to debug the code now, it is neither entering into the error.c file nor detecting the peripheral device. All I can hear is an error sound coming from my PC at regular interval. The sound is similar to the one we get when we are trying to find a string using ctrl+F  in ccs and it doesn't exist in the code. Also the sound stops when I exit the tera term terminal.

    I am still trying to figure out the reason. If you have any suggestions do let me know.

    Thanks

  • Hi Garvit,

    I am a bit confused by your last comment. To clarify, you are no longer seeing the error code you were before, but now you are getting an error sound from your PC (originating from your UART terminal) when the program is running? Can you specify the Serial settings you have configured your UART terminal with do you have any output on the screen you can share?

    Best Regards,

    Jan

  • Hi Jan,

    I have set the serial settings to same as shown in fig 1 and the UART terminal display is freezing after few seconds as shown in fig 2 .

    Thanks,

    Garvit

  • Hi Garvit,

    It seems you are printing advertising packets received. Is this the case? If so, then could you try removing the print statements for now to see if the behavior persists?

    Best Regards,

    Jan

  • Hi Jan,

    The error issue is resolved after the removal of print statement but I am still not able to detect the peripheral. I have added a counter for the peripheral device in the following way - 

    static uint32_t counter = 0;

    uint8_t  temp[6] = {0xCA,0x00,0x00,0x00,0x00,0xCA}; // Random static address I have given to the peripheral device

    // counter setup under the case SC_EVT_ADV_REPORT of SimpleCentral_processAppMsg function 

    if (memcmp(temp , pAdvRpt->addr , 6 ) == 0){
    counter = counter+1;
    Display_print1(dispHandle, 4, 0, "counter %d",
    counter);
    }

    I have setup a breakpoint on counter but the code never stops at it.

  • Hi,

    I am glad to hear we were able to resolve the serial terminal issue. Can you clarify how you have set the random static address? I would recommend setting your peripheral to Public Address mode and using that address instead. Are you able to acquire the sniffer hardware that was previously discussed? This would greatly help us in understanding what is going on over the air.

    Best Regards,

    Jan

  • Hello Jan,

    I have set the random static address under simple_peripheral.syscfg > General Config > Address Mode. 

    The issue with public address mode was it keeps on changing and every time I disconnect the board I have to again change the code at central side to track it. 

    About Sniffer circuit, as of now I won't be able to access it so for I am going ahead with setting up the device in non connectable and scannable mode.

    Thanks,

    Garvit

  • HI Garvit,

    Understood. I truly apologize for the inconvenience this unexpected behavior may be causing. Once you have access to a sniffer, then please let us know and we would be more than happy to help debug the packet logs. Are you still able to implement your desired functionality with the workaround you suggested (non-connectable and scannable mode)?

    Best Regards,

    Jan

  • Hello Jan,

    Yes, I am working on getting the functionality as of now. Thanks for your responses till now.

    Regards,

    Garvit

  • Hi Garvit,

    Sounds good. I will close this thread for now, but if  you have any update to share then please respond to this message and it should reopen the thread. After 30 days, the thread will permanent close, but if you have an update, then you can open a related thread and we will assist you on the new thread.

    Best Regards,

    Jan