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.

CC2652R: Scanned channel number on each advertising event

Part Number: CC2652R

Hello,

For more accurate locationing based on RSSI values, I need not only RSSI value but also channel number associated with each advertising report.

Currently it looks like none of the following events come with the scanned channel number in ble5stack:
GAP_EVT_SCAN_INT_ENDED
GAP_EVT_SCAN_WND_ENDED
GAP_EVT_ADV_REPORT

Is there a way to get the scanned channel number? Can you add channel number to all or any of the above events in the future release?

- Cetri

  • Hello Cetri,
    I will check with our team and get back to you.
  • Hello Cetri,
    Currently there is not a direct way of getting the channel number associated with the received advertising report in simplelink_cc26x2_sdk_2_30_00_34. The order of the scanning channels are not configurable, but you can change the advertising channels on the broadcaster.

    Can you elaborate on the use case that require you to know the adv. channel? This can help in case there might be a future feature request.
  • Hi Eirik,

    I think one feasible workaround would be using GAP_EVT_SCAN_WND_ENDED or GAP_EVT_SCAN_INT_ENDED. If it is guaranteed that scanning starts from channel 37 when it gets enabled, and then moves to 38, 39, and then back to 37, the application can track the last scanned channel when it receives the event callback from the stack. Of course it is not useful for extended advertising, but useful for legacy advertising.

    Questions:
    1. Does scanning start from channel 37 always and move to 38, 39, and back to 37?
    2. If GAP_EVT_SCAN_WND_ENDED (or GAP_EVT_SCAN_INT_ENDED) is registered using GapScan_setEventMask(), is it guaranteed that the application receives the event callback at each scanning window closing?
  • Hi Eirik,

    Any update? Thanks.

    - Cetri

  • Hello Cetri,
    1. Yes. Scanning start from ch. 37 and channel is incremented after every scan interval and wrap around after ch. 39. When you start a new scan the channel is set back to ch. 37.
    2. The GAP_EVT_SCAN_WND_ENDED should be received by the application at the end of every scan window, but I am not sure if you receive the last event if for example scan duration is equal to scan window where the duration time out before the window. You can easily set up a test case for this and count the number of events received.

    There can be limitations on how fast the events are handled in your application task function depending on code execution in that thread.