This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral

Dear Nordic team and community,

Have you encountered the problem where standard BT4.0/4.1 GAP Peripheral device would be "blocked" from connection (kind of "denial of service" situation) by too many actively scanning GAP Scanners/Centrals? We are seeing this with certain mobile phones (especially Android) in "observing" role and this is pretty independent on adv. interval we use (typically 20-200ms). All adv. events are "loaded" with SCAN_REQ packets when there are 5 or more "scanning" phones and beside SCAN_REQ collisions (which are typically not critical for BLE solutions) basically all CONNECT_REQ collide with some SCAN_REQ packet and thus Peripheral never follows the connection.

Any suggestions (beside trying to lower scanning activity on phones' side which obviously isn't always possible)?

Thanks Jan

Parents
  • Hi, some insights from an Android developer. Background scanning on Android of course can be done using high power scanning, but it's a very bad practice and leads to draining the battery quickly. There are 4 options to scan: high power (continuous), balanced (2 sec out of 5), low power (0.5 sec/5 sec) and opportunistic (app gets updates only when another app is scanning). All Android tools, like Physical Web or Google Play service, that may scan in the background, do it in least disturbing mode, so more phones are required to fully block connections, unless all they open their favorite app (nRF Connect, of course ;) ) and start scanning at the same time. Also, it used to be, that some phones (Nexus 4 or 7) were sending only one Scan Request per scanning to one device. This approach was preventing from DoS, but also from tracking changing RSSI, so it has been fixed.

Reply
  • Hi, some insights from an Android developer. Background scanning on Android of course can be done using high power scanning, but it's a very bad practice and leads to draining the battery quickly. There are 4 options to scan: high power (continuous), balanced (2 sec out of 5), low power (0.5 sec/5 sec) and opportunistic (app gets updates only when another app is scanning). All Android tools, like Physical Web or Google Play service, that may scan in the background, do it in least disturbing mode, so more phones are required to fully block connections, unless all they open their favorite app (nRF Connect, of course ;) ) and start scanning at the same time. Also, it used to be, that some phones (Nexus 4 or 7) were sending only one Scan Request per scanning to one device. This approach was preventing from DoS, but also from tracking changing RSSI, so it has been fixed.

Children
No Data
Related