<?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>Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1525/large-number-of-ble-devices-with-an-ipad</link><description>Question: Can a nrf51822 acting as a server/slave message a client/master (iPad), that it has bonded with previously, to let it know that new data is available without having a link open? 
 Why? 
I want to have a lot of custom devices running nrf51822s</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Feb 2014 17:14:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1525/large-number-of-ble-devices-with-an-ipad" /><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6773?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2014 17:14:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d2a2630-85ad-4bc9-a193-34f01700b53a</guid><dc:creator>Ingolf Petersen</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;Update on the progress. We&amp;#39;ve got it very close to working. We ran into the problem of the firmware not disconnecting fast enough. We tried changing the Connection Supervision Timeout to the lowest possible value that still fullfils the constraints posed in the nordic SDK and by Apple (&lt;a href="https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf"&gt;developer.apple.com/.../BluetoothDesignGuidelines.pdf&lt;/a&gt; - chapter 3.6). That didn&amp;#39;t change anything really, the nrf51822s still thought they were connect for 5-10 seconds after the disconnection in the iPad app. To counter this we use a message from the iPad to trigger a call to sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);&lt;/p&gt;
&lt;p&gt;We then make our custom modules with the nrf51822s only advertise when there is new data to send and the iPad is scanning very frequently and connecting to modules that it has been told to communicate with.&lt;/p&gt;
&lt;p&gt;We use the following values in the firmware:&lt;/p&gt;
&lt;p&gt;#define APP_ADV_INTERVAL                32                                          /**&amp;lt; The advertising interval (in units of 0.625 ms. This value corresponds to 40 ms). */&lt;/p&gt;
&lt;p&gt;#define MIN_CONN_INTERVAL               16                                           /&lt;strong&gt;&amp;lt; Minimum acceptable connection interval (7.5 ms), Connection interval uses 1.25 ms units. */
#define MAX_CONN_INTERVAL               40                                           /&lt;/strong&gt;&amp;lt; Maximum acceptable connection interval (7.5 ms), Connection interval uses 1.25 ms units. */
#define SLAVE_LATENCY                   0                                           /&lt;strong&gt;&amp;lt; Slave latency. */
#define CONN_SUP_TIMEOUT                400                                         /&lt;/strong&gt;&amp;lt; Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */
#define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(20000, APP_TIMER_PRESCALER) /&lt;strong&gt;&amp;lt; Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (15 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(5000, APP_TIMER_PRESCALER)  /&lt;/strong&gt;&amp;lt; Time between each call to sd_ble_gap_conn_param_update after the first (5 seconds). */
#define MAX_CONN_PARAMS_UPDATE_COUNT    3                                           /**&amp;lt; Number of attempts before giving up the connection parameter negotiation. */&lt;/p&gt;
&lt;p&gt;We still have some tests to do to see if it&amp;#39;s real-time viable but it&amp;#39;s looking very good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6772?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2014 11:54:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3e95e0f-0fff-4b46-a40c-40d5e56bb3dc</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;This is really the Connection Supervision Timeout, that you can configure in your application. Take a look at this question for details on connection parameters: &lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/what-is-connection-parameters" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/what-is-connection-parameters&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you have further questions on this, I suggest to post a separate question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6771?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2014 11:52:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3c3c287-213d-4e8f-a0e3-394ab6fa5e5b</guid><dc:creator>Ingolf Petersen</dc:creator><description>&lt;p&gt;Small update:&lt;/p&gt;
&lt;p&gt;Working on it but the main problem now is that the nrf51822s sometimes take up to 5-10 seconds to notice that there&amp;#39;s no connection after the iPad breaks it.&lt;/p&gt;
&lt;p&gt;Is there any timeout parameter or similar that can be changed to speed the process?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6770?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 18:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3fb4fe-0f51-43b4-80f4-19d2a783bff8</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Yes, that would be a broadcaster. You would not have bidirectional data transfer as a broadcaster, only from the peripheral to the central (i.e. from the broadcaster to the scanner) but I was suggesting this as a way to notify the iPad that new data is available so that the iPad could then subsequently connect and exchange data with the nRF51-based device&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6769?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 17:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3502fc0e-5b07-4862-a2c3-bb983461dcc2</guid><dc:creator>Ingolf Petersen</dc:creator><description>&lt;p&gt;@Carles: Thanks for the info. That makes sense as it then is a Broadcaster, right?&lt;/p&gt;
&lt;p&gt;Anyway, the peripherals also need to be able to accept data so I&amp;#39;m not sure that that&amp;#39;s what I&amp;#39;m looking for. Maybe it is possible to use another advertisement type and encode the data from the peripherals to the advertisement packages and then only have the iPad initiate a connection to a specific device them when it needs to send data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6768?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 17:01:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b303cb5-27d0-48c7-a79b-353765bfcf52</guid><dc:creator>Ingolf Petersen</dc:creator><description>&lt;p&gt;Don&amp;#39;t know yet as it&amp;#39;s not entirely up to me :)&lt;/p&gt;
&lt;p&gt;Thanks for the info, will come in handy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6767?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 16:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f469229-28a2-41a1-b36f-5d999f461679</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Please note that if you use either BLE_GAP_ADV_TYPE_ADV_SCAN_IND or BLE_GAP_ADV_TYPE_ADV_NONCONN_IND as your advertisement type, the peripheral device is not connectable, and therefore the intent to broadcast data is inherently expressed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6766?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 16:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:596445c3-346c-4a2b-a37a-08a0ac5e2fa3</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;One could say that the mere act of advertising is to request a connection, but you&amp;#39;re right that a Peripheral can never actually initiate the connection. I&amp;#39;m looking forward to hear how your test goes! Do you intend to test both, or just the latter?&lt;/p&gt;
&lt;p&gt;I would normally consider this to be a perfectly fine example of how BLE can be used, but if you actually have a hard real-time requirement on the link establishment, that of course complicates things.&lt;/p&gt;
&lt;p&gt;Note that there isn&amp;#39;t any strict relation between being a Central and GATT Client and Peripheral/GATT Server. You may have use in taking a look at this: &lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/what-is-a-client-and-server-in-ble" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/what-is-a-client-and-server-in-ble&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6765?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 16:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01305de9-962d-4602-a8ed-9b3b2a355d5d</guid><dc:creator>Ingolf Petersen</dc:creator><description>&lt;p&gt;Thanks for the reply. That&amp;#39;s the only thing I could think of as well. I assume I will try it in the coming week and see how it works out. I&amp;#39;ll post any updates to this thread.&lt;/p&gt;
&lt;p&gt;It does however sound like using the BLE protocol in a way it&amp;#39;s not meant to be used but as I understand it that&amp;#39;s the only way to do this (apart from polling all the devices which will take way to long anyway). At least it is my understanding that a peripheral/server can never initiate or requesta a connection, that task is always left to the central/client.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Large number of BLE devices with an iPad</title><link>https://devzone.nordicsemi.com/thread/6764?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2014 16:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cc24405-5f0e-4f70-8caa-1b3b9f45c78b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;You can have custom data in the manufacturer specific data field of the advertisement packet, and when the application is in the foreground, it&amp;#39;s possible to read this data on the iOS device, and then connect. How fast you can get this working, I&amp;#39;m not completely certain about, so this you&amp;#39;d have to test.&lt;/p&gt;
&lt;p&gt;Another option could be to just let your devices not advertise by default, and only start advertising when they actually have data. In that way, you can (hopefully) just start initiating connections to all known devices from iOS, and once a device starts advertising, it will be connected to as fast as possible. Beware that I have never tested how many connects that an iOS device can have pending at a certain time, so it could be that there are similar limitations there, but I wouldn&amp;#39;t really expect that.&lt;/p&gt;
&lt;p&gt;Those two are my best initial suggestions. If anyone else have any, I&amp;#39;d be happy to hear them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>