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.

Parents
  • This issue can be reproduced using NRF52840 dongle and NRF connect app (latest version 2.6.1) on a Windows 10 machine with 32 bit architecture.

    Steps to reproduce.

    T = 0 sec: Start scan, advertising devices are listed

    T = 3 sec: Stop scan, clear the seen devices

    T = 6 sec: Start scan,, advertising devices are listed

    T = 9 sec: Stop scan, clear the seen devices

    T = 12 sec: Start scan,, advertising devices are listed

    T = 15 sec: Stop scan, clear the seen devices

    T = 18 sec: Start scan,, advertising devices are listed

    T = 21 sec: Stop scan, clear the seen devices

    ...... repeat this for a few minutes .....

    leave the device running NRF connect for a few minutes

    Repeat the start-scan, stop-scan sequence again. The stop scan will not be responsive at one point of time. Thereafter if you do a start scan/stop scan, you'll see following error.

    Error occurred while starting scan. Errcode: NRF_ERROR_INTERNAL (0x3)

    Received status with code 4 Unknown value, message:'Error sending packet to target.'

    Find below the log file generated by NRF connect app.

    2018-11-20T10_18_37.286Z-log.txt

Reply
  • This issue can be reproduced using NRF52840 dongle and NRF connect app (latest version 2.6.1) on a Windows 10 machine with 32 bit architecture.

    Steps to reproduce.

    T = 0 sec: Start scan, advertising devices are listed

    T = 3 sec: Stop scan, clear the seen devices

    T = 6 sec: Start scan,, advertising devices are listed

    T = 9 sec: Stop scan, clear the seen devices

    T = 12 sec: Start scan,, advertising devices are listed

    T = 15 sec: Stop scan, clear the seen devices

    T = 18 sec: Start scan,, advertising devices are listed

    T = 21 sec: Stop scan, clear the seen devices

    ...... repeat this for a few minutes .....

    leave the device running NRF connect for a few minutes

    Repeat the start-scan, stop-scan sequence again. The stop scan will not be responsive at one point of time. Thereafter if you do a start scan/stop scan, you'll see following error.

    Error occurred while starting scan. Errcode: NRF_ERROR_INTERNAL (0x3)

    Received status with code 4 Unknown value, message:'Error sending packet to target.'

    Find below the log file generated by NRF connect app.

    2018-11-20T10_18_37.286Z-log.txt

Children
No Data
Related