Scan Request events

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Does the Scan Request generate any events, either on the Central (TX) or the Peripheral (RX) modules?
Could anyone point me in the direction of more information on the format of the Scan Request - I've been having little luck on finding any more information other than "it exists".

0 Likes
1 Solution
Anonymous
Not applicable

@cnissman_1480666,

   

 

   

When talking about Scan requests, Central sends the request and Peripheral receives it. This is handled by BLE stack and does not need any application intervention (except regularly calling CyBle_ProcessEvents()). I don't see any situation where someone may need the Scan Request events to come to application.

   

On the other hand, Scan Response contains application useful data and does trigger an event. The Scan Response packet is sent from Peripheral (no event) and received by Central device (CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT event generated). The data that is sent from the Peripheral as part of scan response is configured in the BLE Component settings -> GAP Settings -> Scan Response Packet or in firmware by using the CyBle_GapUpdateAdvData() API.

   

 

   

Refer to example project at https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day006_Cen... for basic Central project implementation. Also, you can refer the repository at https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days for more projects.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

@cnissman_1480666,

   

 

   

When talking about Scan requests, Central sends the request and Peripheral receives it. This is handled by BLE stack and does not need any application intervention (except regularly calling CyBle_ProcessEvents()). I don't see any situation where someone may need the Scan Request events to come to application.

   

On the other hand, Scan Response contains application useful data and does trigger an event. The Scan Response packet is sent from Peripheral (no event) and received by Central device (CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT event generated). The data that is sent from the Peripheral as part of scan response is configured in the BLE Component settings -> GAP Settings -> Scan Response Packet or in firmware by using the CyBle_GapUpdateAdvData() API.

   

 

   

Refer to example project at https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day006_Cen... for basic Central project implementation. Also, you can refer the repository at https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days for more projects.

0 Likes
Anonymous
Not applicable

I've been looking for this 'feature' too.  A Scan Request Event would let the Peripheral device know the Scan Response data has been read and can now be updated.  This would allow the Central device to receive short data packets from multiple Peripheral devices without needing to connect to each in turn. Is there a means to implement this functionality?

   

As a side question, does the Central device need to stop scanning once having received a Scan Response from a peripheral device before it can receive another Scan Response?

0 Likes
Anonymous
Not applicable

There is a new event added in BLE component v3.20 (and later), CYBLE_EVT_GAP_SCAN_REQ_RECVD. This event is received when a peripheral receives a scan request. However, changes to the scan response can be made only for the next scan request.

0 Likes