Bug in GAP_OBSERVER_MODE scan

3 posts / 0 new
Last post
brian
Offline
Last seen:6 years 2 months ago
Expert Master
加入:2014-10-16 18:10
Bug in GAP_OBSERVER_MODE scan

I want to use the GAP_OBSERVER_MODE to detect BOTH directed and undirected advertisements while in the central mode. The problem is that once a device is discovered and I stop the scan and then I connect to it, the software crashes. If I use GAP_GENERAL_DISCOVERY instead, I can connect, pair, and reconnect later without a problem. Of course to re-connect I have to invoke the connection attempt manually because the GAP_GENERAL_DISCOVERY scan filters out the directed advertisements (MUCH to my dismay and chagrin).

On the other hand, if I add the device to a white list while using the GAP_OBSERVER_MODE just before connecting, the software no longer crashes (but I don't connect ... may have entered the white list wrong).

According to the documentation the auto connect mode does a GAP_OBSERVER_MODE scan, uses the white list to find an acceptable device, stops the scan, and then does a DIRECT connect. The white list is not needed while doing the direct connect. I am doing the same thing above in the first case. GAP_OBSERVER_MODE scan, the I find the device I want using my own means, stop the scan, and then do a direct connect and it crashes. This behavior makes no sense.

I need to know if this is a bug in the system because I really need to be able to scan both directed and undirected advertisements so I can make the connection attempt when I see the device, both in a first-time case and a re-connect case.

The above is a result on Windows 8.1 which appears to have many stability problems. On Windows 7 the same code produces a build that just hangs in the connection (if the timeout is removed) but works fine when using GAP_GENERAL_DISCOVERY

JE_Dialog
Offline
Last seen:1 month 5 days ago
Staff
加入:2013-12-05 14:02
你好布莱恩,我有logged

你好布莱恩,我有logged this ticket with our team and they will look at it shortly. BR JE_Dialog

pnndra
Offline
Last seen:2 years 11 months ago
加入:2014-06-17 10:05
hi,

hi,
we have a similar problem here. in our case the software doesn't crash however what we see is that sometimes we can connect (in observer mode) while some other times we receive the directed advertisement from the peripheral but when we attempt connection the connection event doesn't get through and we can see that it doesn't fire also on the peripheral side.
thanks,

Dario