Closed pmancele closed 6 years ago
Hi Perre-Marie, thanks for detecting the possible issue. Indeed, factor 2 was introduced for safety due to an implementation choice of the underlying stack. Your setting seems ok, it will be integrated it in the next commit.
Andrea
@apalmieriGH Thank you ! I will wait for the commit then to close the issue
Hello, I'm using the ST ble driver for a while a i may have found an issue during the scan procedure. Indeed when the
stopScan()
function is called, the functionDiscover_CB
is then called with thereason = DISCOVERY_COMPLETE
. So we enter this section of the switch case :I may be wrong but the result of the delay calculation, in the line bellow, is way too long ! https://github.com/ARMmbed/ble-x-nucleo-idb0xa1/blob/1616127fd90a7bbf7dafc939e108a21693da1c41/source/BlueNRGGap.cpp#L1081 Indeed
getInterval()
returns a time in unit of 0.625 ms so we should writegetInterval()*0.625
to get a ms delay. Also, is it necessary to multiply the interval by 2 ?By default the scan interval is 10.5 seconds, so when you call
stopScan()
, you then have to wait for 2*10.5/0.625 = 33.6 seconds !! I tried to replace it withIs it ok ?
Thank you ! Pierre-Marie