This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE scan does not timeout

I am using NRF 52840 dongle, SoftDevice 3.1 and connectivity firmware 1.2.3. I have a node js application, I am using pc-ble-driver-js 2.4.3. I am testing the application on Windows 10 32-bit.

The app starts the scan for 3 seconds every 6 seconds. For first 15-20 minutes or so, scan starts and times out correctly after 3 seconds. But after that the scan does not time out at all. Due to this subsequent scans starts fail with NRF_ERROR_BUSY.

I can introduce an explicit stop scan if timeout does not happen. But I wanted to check if this is a known issue or a misconfiguration on my part. I use following scan parameters.

const scanParameters = { active: true, interval: 100, window: 20, timeout: 3 };

Debug logs show following pattern

[2018-11-20 12:26:56.853] [info] Starting BLE scan
[2018-11-20 12:26:59.891] [info] ###NRF_Log: 1: GAP_EVT_TIMEOUT time:2018-11-20T06:56:59.892Z connHandle:65535 src:2 srcName:bleGapTimeoutSrcScan
[2018-11-20 12:27:02.882] [info] Starting BLE scan
[2018-11-20 12:27:05.972] [info] ###NRF_Log: 1: GAP_EVT_TIMEOUT time:2018-11-20T06:57:05.973Z connHandle:65535 src:2 srcName:bleGapTimeoutSrcScan
[2018-11-20 12:27:08.913] [info] Starting BLE scan
[2018-11-20 12:27:11.952] [info] ###NRF_Log: 1: GAP_EVT_TIMEOUT time:2018-11-20T06:57:11.952Z connHandle:65535 src:2 srcName:bleGapTimeoutSrcScan
[2018-11-20 12:27:14.931] [info] Starting BLE scan
[2018-11-20 12:27:17.972] [info] ###NRF_Log: 1: GAP_EVT_TIMEOUT time:2018-11-20T06:57:17.973Z connHandle:65535 src:2 srcName:bleGapTimeoutSrcScan
[2018-11-20 12:27:20.933] [info] Starting BLE scan
[2018-11-20 12:27:24.006] [info] ###NRF_Log: 1: GAP_EVT_TIMEOUT time:2018-11-20T06:57:24.003Z connHandle:65535 src:2 srcName:bleGapTimeoutSrcScan
[2018-11-20 12:27:26.962] [info] Starting BLE scan
[2018-11-20 12:27:33.002] [info] Starting BLE scan
"errcode": "NRF_ERROR_BUSY",
"errmsg": "Error occured when starting scan. Errorcode: NRF_ERROR_BUSY (0x11)\n"
[2018-11-20 12:27:39.032] [info] COMM_BLE: Starting BLE scan
"errcode": "NRF_ERROR_BUSY",
"errmsg": "Error occured when starting scan. Errorcode: NRF_ERROR_BUSY (0x11)\n"
[2018-11-20 12:27:45.062] [info] COMM_BLE: Starting BLE scan
"errcode": "NRF_ERROR_BUSY",
"errmsg": "Error occured when starting scan. Errorcode: NRF_ERROR_BUSY (0x11)\n"
[2018-11-20 12:27:51.082] [info] COMM_BLE: Starting BLE scan
"errcode": "NRF_ERROR_BUSY",
"errmsg": "Error occured when starting scan. Errorcode: NRF_ERROR_BUSY (0x11)\n"
[2018-11-20 12:27:57.102] [info] COMM_BLE: Starting BLE scan
"errcode": "NRF_ERROR_BUSY",
"errmsg": "Error occured when starting scan. Errorcode: NRF_ERROR_BUSY (0x11)\n"

regards,
-Prashant.

Related