Detect beeing active scanned

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
pontush
Offline
Last seen:6 months 2 weeks ago
加入:2017-02-10 15:38
Detect beeing active scanned

我已经建立了一个broadcasting device in non-connectable mode using the easy_gap API. It works, but I would like to detect if an active scanner is nearby without providing connections
Is there a way to detect that (or get notified if) the scan response packet is requested from an external (active) scanner? Even if there is no official API supporting this I'm satisfied if there is an indirect way, for example timing, memory usage...

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi pontush,

Hi pontush,

There are theADV_SCAN_INDpackets (scannable undirected advertising), those packets are non-connectable and you will be able to send scan response data in the case of a scan request. In order to activate those kind of packets in the SDK you will have to set the scan response data and the SDK will send those kind of packets. But there is no detection if there is an active scanner in the area, the peripheral will always have the receiver open (i mean when transmitting data during the advertising triplet it will also open the receiver for hearing scan requests). So the device will always send scan responses when it gets an scan request.

Thanks MT_dialog

pontush
Offline
Last seen:6 months 2 weeks ago
加入:2017-02-10 15:38
Hi,

Hi,
Yes I understand this, the stack handles listening to scan requests and automatic transmission of scan responses if provided by the application. I was hoping there was a way to detect from the application that this has happened and if so preferably the device address of the scanner (the ScanA field from the SCAN_REQ packet). If not available today I think it could be a nice feature in a future version of the SDK. A use case could, for example, be a beacon that lights up when approached by (active) scanners.

MT_dialog
Offline
Last seen:2 months 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi pontush,

Hi pontush,

Thank you for the suggestion but i dont see how this is going to work, when in classic non-connectable advertising the device only transmits and never receives, so without any reception you wont be able track any scan requests from any active scanners. At least at the moment, as far as the undirected advertising is concern, there is no such feature in the SDK (to indicate to the application that a scan request is received).

Thanks MT_dialog