<?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>Bond to iOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4161/bond-to-ios</link><description>Hi 
 I&amp;#39;ve been able to include Device Manager to bond my peripheral to Master Control Panel, but testing with LightBlue runnining on an iOS 8 iPadI&amp;#39;m having several weird issues. 
 Everything is apparently correct, until I power off my peripheral or</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Oct 2014 10:31:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4161/bond-to-ios" /><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14904?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 10:31:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3871feef-fd38-4d96-9ac1-8bfbefde5a7a</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Thanks again. I didn&amp;#39;t want to restrict the connections, I just only using the WhiteList to fix the issue of private address. The thread you mentioned has fixed the problems, so I have just removed the WhiteList advertising. Now looks it&amp;#39;s working correctly!!!! Thanks for your help!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14903?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 09:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c25d6665-0e3c-45eb-9922-d7da05fca01d</guid><dc:creator>Nikita</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;When using BLE_GAP_ADV_FP_ANY and BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE, the bonding process is not working for iOS (it is not loaded the connection context when reconnecting). When using BLE_GAP_ADV_FP_ANY and BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED same results.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See &lt;a href="https://devzone.nordicsemi.com/blogs/12/nrf51-sdk-v600-bug-report-and-temporary-workaround/"&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[DeviceManager] Unable to re-connect to a bonded central that uses Resolvable Private Address (e.g iOS device) if the application doesn&amp;#39;t do whitelist advertising.
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;When using BLE_GAP_ADV_FP_FILTER_SCANREQ and BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED, works for iOS and Master Control, but not Android.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why are you using scan packet request filter BLE_GAP_ADV_FP_FILTER_SCANREQ if you want to filter connections? Use BLE_GAP_ADV_FP_FILTER_CONNREQ or both BLE_GAP_ADV_FP_FILTER_BOTH then.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t know what may cause the problem with reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14902?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 08:59:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2f13b32-eb25-4402-a121-80b08368e7a4</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Yes, you&amp;#39;re right. The problem is this:
When using
&lt;code&gt;BLE_GAP_ADV_FP_ANY and BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE&lt;/code&gt;,
the bonding process is not working for iOS (it is not loaded the connection context when reconnecting).
When using
&lt;code&gt;BLE_GAP_ADV_FP_ANY and BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED&lt;/code&gt; same results.
When using
&lt;code&gt;BLE_GAP_ADV_FP_FILTER_SCANREQ and BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED&lt;/code&gt;,
works for iOS and Master Control, but not Android.
When using
&lt;code&gt;BLE_GAP_ADV_FP_FILTER_SCANREQ and BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED&lt;/code&gt;, forces reset.
When using
&lt;code&gt;BLE_GAP_ADV_FP_FILTER_SCANREQ with BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE&lt;/code&gt;
forces reset....&lt;/p&gt;
&lt;p&gt;Should I ask for support to Nordic???? I love standards! :-( Thanks again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14901?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 08:44:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c17c36f6-5b31-4c4b-869e-89eee87c414f</guid><dc:creator>Nikita</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;but the flag BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED is also selected when using BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No, when you set flags like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_APP_AdvertisingInit(BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It means this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_APP_AdvertisingInit(BLE_GAP_DISC_MODE_NOT_DISCOVERABLE|BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;because BLE_GAP_DISC_MODE_NOT_DISCOVERABLE == 0x00.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14900?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 08:32:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ef1c085-a669-424a-96a5-ba4bb06dd4ff</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Thanks for your reply. Maybe you&amp;#39;re right, but the flag BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED is also selected when using BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE. I&amp;#39;ve been trying different combinations of flag in adv_params.fp and AdvertisingInit, but about all of them, or don&amp;#39;t work in iOS, or force a reset (probably they&amp;#39;re incompatible). :-(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14899?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 08:19:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09cf45d5-770b-43e9-b5d9-2a440c43a47f</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;I don&amp;#39;t know for sure but maybe it&amp;#39;s just different implementations of device discovery functions in iOS (?LightBlue?), Windows (Master Control Panel) and Android (BLE Scanner/B-BLE). When you set your advertising flags to BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED it means that device will have not discoverable discovery mode (BLE_GAP_DISC_MODE_NOT_DISCOVERABLE) that only tells central that it shouldn&amp;#39;t consider this device as discovered, but it&amp;#39;s up to central application to actually decide either to use this device and show it to you or not.&lt;/p&gt;
&lt;p&gt;Maybe Android applications follow the Bluetooth specification and don&amp;#39;t show you device with BLE_GAP_DISC_MODE_NOT_DISCOVERABLE flag and iOS/Windows application don&amp;#39;t follow specification and show it to you.&lt;/p&gt;
&lt;p&gt;You can read about it in Bluetooth 4.1 specification in &amp;quot;9.2.2 Non-Discoverable Mode&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14898?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 08:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3c27cd7-c430-4dcd-9000-0e2f638bcb17</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;No. I&amp;#39;m using BLE Scanner and &lt;a href="https://play.google.com/store/apps/details?id=com.billy.billylightblue"&gt;B-BLE&lt;/a&gt; for my tests. But anyway, I&amp;#39;m not able to see the device advertising from the Android Bluetooth options. When I&amp;#39;m not using the Whitelist (i.e., when no bonded devices are stored), I can see the device advertising from these tools and from the Android Bluetooth options. By the way: I&amp;#39;m using a Nexus 4 and a Motorola Moto G. Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14897?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 08:07:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d762c84-084a-417f-a864-a5f0a20cebbc</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;Are you using Master Control Panel for Android or some other application for your tests?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14896?ContentTypeID=1</link><pubDate>Wed, 22 Oct 2014 07:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7e787c7-f688-475c-a1c8-e1f5a5f86171</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Well, when I don&amp;#39;t have stored bonds I made a normal discovery mode. That&amp;#39;s the reason why, with no stored bonded devices, the first Android device can see my device advertising, connect it, and bonding it. A second Android smartphone can&amp;#39;t see my device, although I can see it from iOS or Master Control Panel. That&amp;#39;s weird. I will update my answer with my previous answer with the complete AdvertisingStart code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14895?ContentTypeID=1</link><pubDate>Tue, 21 Oct 2014 21:03:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de181adf-946d-4ad3-abd4-e17c03a31004</guid><dc:creator>Nikita</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;The problem is that now, when using the WhiteList, I can&amp;#39;t see the device advertising from Android.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can&amp;#39;t see device advertising when you run newly flashed device without any stored bonds?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14894?ContentTypeID=1</link><pubDate>Tue, 21 Oct 2014 20:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad72951c-3c20-4667-b463-f97bdbcd9c0d</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Sorry. You&amp;#39;re right. I will review right now the description of my issue to be more accurate. Thanks for your interest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14893?ContentTypeID=1</link><pubDate>Tue, 21 Oct 2014 20:29:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a84e4df0-2057-4de8-9252-02d8ab808f76</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;It&amp;#39;s working in Master Control Panel in Windows but not in Master Control Panel in Android? You can&amp;#39;t see your device advertising in Master Control Panel in Android or what is the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bond to iOS</title><link>https://devzone.nordicsemi.com/thread/14892?ContentTypeID=1</link><pubDate>Tue, 21 Oct 2014 13:38:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad561ce9-77b1-4f62-a6fa-9ba65947bb42</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been able to fix the problem by using a WhiteList in the advertising as explained in &lt;a href="https://devzone.nordicsemi.com/question/2931/misunderstanding-about-adertising-mode-whitelist/"&gt;this&lt;/a&gt; thread.&lt;/p&gt;
&lt;p&gt;Thanks for your help&lt;/p&gt;
&lt;p&gt;Elena&lt;/p&gt;
&lt;p&gt;UPDATE: Now, I&amp;#39;ve been able to fix the problem and it is working correctly in iOS and Master Control Panel, but not in Android. In other words: from iOS and Master Control Panel, I&amp;#39;m able to see the device advertising, and I&amp;#39;m able to connect to it. Even more, the connection context is correctly loaded when connecting a previous bonded device (iOS or Master Control Panel). The problem is that now, when using the WhiteList, I can&amp;#39;t see the device advertising from Android. Why???&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been using the following WhiteList configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    adv_params.fp          = BLE_GAP_ADV_FP_FILTER_SCANREQ;
    adv_params.p_whitelist = &amp;amp;whitelist;
    BLE_APP_AdvertisingInit(BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, the complete code of AdvertisingStart is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void BLE_APP_AdvertisingStart( void )
{
uint32_t             err_code;
ble_gap_adv_params_t adv_params;

ble_gap_whitelist_t  whitelist;
ble_gap_addr_t       * p_whitelist_addr[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
ble_gap_irk_t        * p_whitelist_irk[BLE_GAP_WHITELIST_IRK_MAX_COUNT];

/* Start advertising */
memset(&amp;amp;adv_params, 0, sizeof(adv_params));

adv_params.type        = BLE_GAP_ADV_TYPE_ADV_IND;
adv_params.p_peer_addr = NULL;
adv_params.fp          = BLE_GAP_ADV_FP_ANY;
adv_params.interval    = BLE_APP_ADV_INTERVAL;
adv_params.timeout     = BLE_APP_ADV_TIMEOUT_IN_SECONDS;

whitelist.addr_count = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
whitelist.irk_count  = BLE_GAP_WHITELIST_IRK_MAX_COUNT;
whitelist.pp_addrs   = p_whitelist_addr;
whitelist.pp_irks    = p_whitelist_irk;


err_code = dm_whitelist_create(&amp;amp;m_app_handle, &amp;amp;whitelist);
APP_ERROR_CHECK(err_code);

if ((whitelist.addr_count != 0) || (whitelist.irk_count != 0))
{
    adv_params.fp          = BLE_GAP_ADV_FP_FILTER_SCANREQ;
    adv_params.p_whitelist = &amp;amp;whitelist;
    BLE_APP_AdvertisingInit(BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED);
}
else
{
    adv_params.fp          = BLE_GAP_ADV_FP_ANY;
    adv_params.p_whitelist = NULL;
    BLE_APP_AdvertisingInit(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
}

err_code = sd_ble_gap_adv_start(&amp;amp;adv_params);
APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Any suggestion??? :-(&lt;/p&gt;
&lt;p&gt;UPDATE: As you can see in the comments below, Nikita mentioned &lt;a href="https://devzone.nordicsemi.com/blogs/12/nrf51-sdk-v600-bug-report-and-temporary-workaround/"&gt;this&lt;/a&gt; thread where it is mentioned the iOS bonding problem, and a patched version of device_manager_peripheral.c where the bug is fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>