<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20183/heavy-scanning-activity-from-android-and-ios-devices-might-prevent-connecting-to-ble-gap-peripheral</link><description>Dear Nordic team and community, 
 Have you encountered the problem where standard BT4.0/4.1 GAP Peripheral device would be &amp;quot;blocked&amp;quot; from connection (kind of &amp;quot;denial of service&amp;quot; situation) by too many actively scanning GAP Scanners/Centrals? We are seeing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 May 2017 07:21:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20183/heavy-scanning-activity-from-android-and-ios-devices-might-prevent-connecting-to-ble-gap-peripheral" /><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78642?ContentTypeID=1</link><pubDate>Mon, 29 May 2017 07:21:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f94f31c-6724-424c-8dc1-f5c85fddb175</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;You can use some wired interface (UART, SPI, I2C...), provision it in production (if you know all addresses at that stage and they fit into the memory), you could use NFC, you could even use keyboard and manual input. Simply whatever else then BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78641?ContentTypeID=1</link><pubDate>Mon, 29 May 2017 05:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41a216fe-bf0d-4d31-953c-150e4a7fad4f</guid><dc:creator>purgoufr</dc:creator><description>&lt;p&gt;Hi, How to use Out of Band to send address of the central to our peripheral ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78636?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 11:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46c84590-f909-4b57-aacd-d2f76a1d199f</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;It&amp;#39;s not only that on Android 6+ user must grant the location permission to an app (BLE scanning requires a runtime location permission, Bluetooth permission is granted automatically). A web can&amp;#39;t just scan in background without user knowing it. Scanning will show a popup (like one shown on the link I gave above) and will scan for few seconds. I guess even on CES or other shows like this where WiFi and Bluetooth are everywhere and people are walking around and scanning it is not that terrible. Although I have never been there, just heard that there were problems with connectivity but now not complete DoS. And this is a kind of an extreme environment.
Btw, if you want to block BLE it&amp;#39;s best to use a good WiFi router that takes all space available. BLE nodes are too lazy in doing so.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78635?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 11:08:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:878db303-c2da-4416-b574-99a52b142fbd</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Thanks Aleksander&lt;/p&gt;
&lt;p&gt;I have not upgraded to Android 6 yet, to use the Web BLE API, but my understanding was that the user had to approve it once, but I don&amp;#39;t think this is much of a barrier as most users just click Yes when asked to turn on Bluetooth. And I&amp;#39;m not sure if its once per page or just Once per every time Chrome is run.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if this feature will always off by default.  The settings were in the experimental section of the currently released version of Chrome for Android, but I can&amp;#39;t see them in the Chrome Beta App, so I presumed that in the next release (i.e when the beta gets released) that this feature will be On by default.&lt;/p&gt;
&lt;p&gt;BTW. On iOS, it will scan in the background, but it appears to slowly increase the interval between each scan, the longer you leave it scanning.
However its easy to stop the scan and start it again e.g. every 15 seconds, even in the background&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78634?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 11:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fa77034-5835-4894-a202-c4a24b150284</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I totally agree that Web BLE API shouldn&amp;#39;t be any danger in terms of DOS (it will provide other attack vectors;), because even if you would stay for longer time on such web site and enabled access to BLE it would hardly achieve such activity from generic BLE chip set. These DOS scenarios described by me above (flooding adv. channels or connecting to every ADV_IND packet which comes around) are already difficult if you run it as embedded application on nRF5x chip and SD S13x, you would most likely need several such fixtures to really block the Peripheral. Web BLE API could disturb BLE app (especially if it isn&amp;#39;t designed properly) but I don&amp;#39;t think that&amp;#39;s worth writing an script by some kiddie;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78633?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 10:53:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56795148-fa25-4221-b498-b97def7e103c</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Web BLE API requires users to actively select Scan for devices, where Chrome popup shows on top of the screen showing devices. A website can&amp;#39;t scan on it&amp;#39;s own. Also, as far as I know web-ble is still by default disabled feature (?) in Chrome and needs to be enabled in flags config.
&lt;a href="https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web"&gt;developers.google.com/.../interact-with-ble-devices-on-the-web&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78632?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 10:51:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10d4722d-2ae1-4527-a2ea-8bb47de9c248</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, some insights from an Android developer. Background scanning on Android of course can be done using high power scanning, but it&amp;#39;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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78640?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 10:44:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64c5ab21-fe9d-4310-aa12-8648dd1c59b3</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Thanks Alex, this is interesting, I&amp;#39;m obviously not mobile developer so I missed that! It&amp;#39;s worth trying, will recommend to our mobile development team...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78639?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 10:41:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3911db3f-4789-4cbb-b9cd-60137e2ee680</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, on Android you may set the TX power for advertisements. There are 4 options to choose from: -21 bBm, -15 dBm, -7 dBm and +1 dBm. You may also set the connectible/non-connectible flag. On iOS there also should be something like that (see CBAdvertisementDataTxPowerLevelKey).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78638?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 10:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bb1c006-b1f7-45a0-8afa-b741583b5579</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Thanks, this is helpful (although not applicable when GAP Peripheral is also mobile phone where you cannot affect such low-level BLE parameters;). So have you heard about such complains from the users of your chips or during your in-house tests/demos?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78637?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 10:21:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9c99f6b-0ace-4948-bce0-7cba3f4df4ac</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;I agree on what you are discussing in the comments. It could be an issue if we have an environment where several phones, device keeps scanning and sending scan request or connection request.&lt;/p&gt;
&lt;p&gt;I just want to add, some solutions if you want to establish a connection in a crowded environment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Reduce TXpower when advertising, and put the device you want to connect closer to your central. This is to avoid the unwanted scanners to send scan/connect request.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use Out of Band to send address of the central to your peripheral for example with NFC. After that let the peripheral advertising in directed mode so that other scanner will not send scan/connect request&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78631?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2017 20:07:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbfb1c0e-c480-4e6c-bf55-f89fdcd69b95</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Hi Jan&lt;/p&gt;
&lt;p&gt;My concern was not for a hardware DOS style attach, where the channels were effectively jammed by sending random noise, as I dont know if its possible to write a phone app to make the phone hardware do that.&lt;/p&gt;
&lt;p&gt;I was more concerned with web pages maliciously using the BLE web api without the user knowing it was happening.
i.e if an app deliberately does this, its likely google and apple would remove it from their App stores. But scripts on websites are a lot harder to ban.&lt;/p&gt;
&lt;p&gt;At the moment I dont know enough about the BLE protocol to know how to defend from the script kiddie type DOS attack.&lt;/p&gt;
&lt;p&gt;I have investigated multiple beacons in close proximity ( 100 beacons in the same room) and I did not see to many problems with this, but I have not tried lots of phones and a few beacons. I suppose I could simulate this by reflashing my Smartbeacons with some Central code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78630?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2017 11:30:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80285a03-021e-4070-8314-24ce326a8e94</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;... if applications are in the foreground (which is unusual) or it is something pretty recent so similar reports are yet to come.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78629?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2017 11:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e520e579-4137-4042-a0da-4bee713d4042</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Few more things on the issue:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It really looks like having any mobile app on mobile which causes heavy active (SCAN_REQ) scanning in GAP Scanner/Central role can take 15-30% of available &amp;quot;slots&amp;quot; (aka RX windows following ADV_IND packets from GAP Peripheral) so at 3-4 devices in the range you wills tart to observe occasional collisions and with 5-6 you will already have big troubles to find any available RX window to start connection.&lt;/li&gt;
&lt;li&gt;Note that this can be hardly prevented as users can have BT enabled and any application running and you can do very little about it.&lt;/li&gt;
&lt;li&gt;This would mean that any &amp;quot;dense&amp;quot; areas such as airports, office spaces, rush streets etc. should be full of such &amp;quot;DOS&amp;quot; zones. However there seems to be no such complains so I&amp;#39;m wondering if this &amp;quot;heavy scanning&amp;quot; behavior is limited only to few devices (I&amp;#39;ve tested Samsung Galaxy S6/7/8) or it happens only...&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78628?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2017 11:12:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6d86a4f-3291-4a72-af2a-c6c0725ac245</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hi Roger, you are right, there are two well known and pretty easy DOS attacks on BLE:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;quot;flooding&amp;quot; all 3 adv. channels (or entire 40) with noise&lt;/li&gt;
&lt;li&gt;connecting to every adv. packet issued (so peripheral device won&amp;#39;t be available for legitimate Central).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that there is almost no mitigation possible and that&amp;#39;s also reason why you will have big problems to deliver radio-based applications to critical applications such as healthcare, military and security. Anyway that&amp;#39;s not what I&amp;#39;m describing here. For two DOS scenarios I&amp;#39;ve mentioned you need to be active attacker with clearly malicious intentions (or absolutely ignorant to standards and regulations) so you could track it and put the attacker down. The scenario I&amp;#39;m describing in this question is different: all the parties behave normally and perfectly according to the specifications, yet they create DOS when reaching critical mass.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Heavy scanning activity from Android (and iOS) devices might prevent connecting to BLE GAP Peripheral</title><link>https://devzone.nordicsemi.com/thread/78627?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2017 03:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a610d789-ca3f-4093-b148-48fc30e451b2</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Hi Jan&lt;/p&gt;
&lt;p&gt;I can see DOS attacks being more and more common, especially with the BLE Web API being released by Google recently (in Chrome)&lt;/p&gt;
&lt;p&gt;I have thought about defence strategies for this, and one option I considered was changing the &amp;quot;connectable&amp;quot; flags if your software thinks its under DOS attack&lt;/p&gt;
&lt;p&gt;e.g. just turn it off for a few seconds, of perhaps longer.&lt;/p&gt;
&lt;p&gt;But. I&amp;#39;ve not tried this myself yet.&lt;/p&gt;
&lt;p&gt;I also looked at trying to prevent devices connecting in an attempt to flatten the battery.&lt;/p&gt;
&lt;p&gt;So I tried immediately disconnecting, if the first attempt didn&amp;#39;t immediately write to a custom (authorisation) characteristic, with a password.  But it didnt help, because Android appears to immediately tries to reconnect, over and over again, until it times out (which seems to take around 5 secs)&lt;/p&gt;
&lt;p&gt;Hence I considered changing the connectable flag, but didnt have time to investigate whether that would work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>