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.

CC2340R5: Scan Request from Central device issue

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

We are using CC2340R5 DK and SDK v8.20,
The device is configured in peripheral mode.
An issue has been identified in receiving scan requests from the mobile app(right now trying with nRF connect for mobile and lightblue)
Settings done in BLE STACK
1] " BLEAPPUTIL_SCAN_REQ_RECEIVED " is set from "BLEAppUtil_EventHandler_t peripheralAdvHandler"
2] " BLEAPPUTIL_SCAN_REQ_RECEIVED " case condition is added under Peripheral_AdvEventHandler
3] "BLEAppUtil_initAdvSet" also set with "GAP_ADV_EVT_MASK_ALL"
4]"peripheralAdvHandler" is added with "BLEAppUtil_registerEventHandler"
5] Other events which are mentioned below from the peripheral handler are work correctly when triggered.
"BLEAPPUTIL_ADV_START_AFTER_ENABLE",
BLEAPPUTIL_ADV_END_AFTER_DISABLE,
Questions:
1] BLEAPPUTIL_SCAN_REQ_RECEIVED, confirm wheather is it right event to receive scan request from central?
2] Are there any specific settings required to enable receiving scan requests from the mobile application?
3] Is there any mobile application available to test and generate scan request effectively.

  • Hello Ashwini,

    Thanks for reaching out.

    Yes, if you subscribe your handler to trigger a callback to the application layer with an event such as BLEAPPUTIL_SCAN_REQ_RECEIVED, it should happen when a scan request is received, are you not receiving it?

    How are you configuring the Event Properties Options in SysConfig? A device configured with scannable type of advertisement will accept scan requests.

    BR,

    David.

  • Hello David,

             We are using connectable scannable advertising type.

  • Hello,

    Could you please share how you have subscribe your handler to trigger a callback to the application layer with an event such as BLEAPPUTIL_SCAN_REQ_RECEIVED, and if the callback is not being triggered? Have you done any other particular modifications? How is your filter policy configured?

    BR,

    David

  • Hello David,

    We have done with all these settings and functions. Please check it once and let me know any changes needs to be add for SCAN REQUEST RECEIVED EVENT.

    How to check this scan request received event? Can you suggest me any mobile application which trigger scan request or any other way to do testing.

  • Greetings Ashwini,

    Apologies for the late response. Due to vacation season, it has taken us longer to get back to you. Thank you for the screenshots and information provided. Getting a scan request notification from the device is a relatively straightforward task. You can make use of the TI SimpleLink Connect app to be able to perform Active Scan operations. This will allow for scan requests to be sent from your phone to the CC23xx device. I notice that you are modifying the app_observer.c file, but these files appear to be greyed out, meaning that they are possibly not being compiled in. This is the root of you problem. Scan requests are sent to the peripheral, and the handling should be added to the app_peripheral.c file instead

    Additionally, have you tried to run the same test, but instead with the device in the central role, and modified the app_peripheral.c file instead? Looking forward to hear back from you.

    Best,
    Achyut Ray