<?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>iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72912/ios-ble-not-showing-passcode-popup</link><description>Hi Guys, 
 
 I need to connect to a BLE device using NRF52480 using passcode (6 digit pincode) 
 on Android it works just fine, I attempt to connect and displays the popup for entering the code. 
 on iOS nothing happens, I can only see the UART service</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 21 Mar 2021 11:35:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72912/ios-ble-not-showing-passcode-popup" /><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/301068?ContentTypeID=1</link><pubDate>Sun, 21 Mar 2021 11:35:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e5a6f3c-abf0-4fe5-9000-c5bc52b9d23e</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Ok,&lt;/p&gt;
&lt;p&gt;Just to understand - in my application - under&amp;nbsp;BLE_GAP_EVT_PHY_UPDATE_REQUEST, I can see that&amp;nbsp;rx_phys and&amp;nbsp;tx_phys are set to&amp;nbsp;BLE_GAP_PHY_AUTO. What does that mean? Who will decide about the MBPS parameter in that case?&lt;/p&gt;
&lt;p&gt;Thanks!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300942?ContentTypeID=1</link><pubDate>Fri, 19 Mar 2021 13:17:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3edd1c19-bca6-4cc3-9d87-e6fc6dad9ebf</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;That is also outside this topic, but it is a request to change the PHY (physical layer) from the default 1MBPS and probably to 2MBPS. It gives a more efficient link with higher throughput. As long as the devices are fairly close, it also gives a lower power consumption, because it spends less time on the radio transmitting the same amount of data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300901?ContentTypeID=1</link><pubDate>Fri, 19 Mar 2021 11:43:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27807c37-d1bb-4389-9c2c-246a03e8d69f</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Ok,&lt;/p&gt;
&lt;p&gt;Can you please tell me about&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_PHY_UPDATE_REQUEST? What does it do and what is the reason that Android didn&amp;#39;t require that?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your help!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300897?ContentTypeID=1</link><pubDate>Fri, 19 Mar 2021 11:36:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95384911-2c1a-4a84-92b2-7257e30b7f7a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;This is a bit outside the topic of the issue in this post. Probably, the reason that it behaved different was because one phone requested 2MBPS, and the other one didn&amp;#39;t.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Roei"]I had to set&amp;nbsp;m_sec_param.mitm to 1, under&amp;nbsp;case NFC_PAIRING_MODE_LESC_JUST_WORKS[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why are you using the NFC pairing file? Note that you didn&amp;#39;t mention NFC until now. NFC is an OOB in itself, so it wouldn&amp;#39;t typically prompt a passkey. I suggest you fetch your inspiration from the ble_app_gls example, which requires a passkey.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300792?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 21:53:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18db85a5-e93e-4beb-89ec-cecc23a02c61</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Hi Edvin - issue is solved.&lt;/p&gt;
&lt;p&gt;The problem was that the case of&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_PHY_UPDATE_REQUEST event was under #ifdef S140, so it was a disabled code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you please explain what is the propose&amp;nbsp;of this code, and&amp;nbsp;how did&amp;nbsp;it work with Android?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Another fix was setting SEC_PARAM_MITM and SEC_PARAM_LESC to 1, and&amp;nbsp;SEC_PARAM_IO_CAPABILITIES to&amp;nbsp;BLE_GAP_IO_CAPS_DISPLAY_ONLY. Again - I can&amp;#39;t understand how did it work with Android.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Finally - under nfc_ble_pair_lib.c file - I had to set&amp;nbsp;m_sec_param.mitm to 1, under&amp;nbsp;case NFC_PAIRING_MODE_LESC_JUST_WORKS and NFC_PAIRING_MODE_LESC_OOB, even though I don&amp;#39;t think it&amp;#39;s the right thing to do, but it&amp;#39;s the only way to fix that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you please give me your inputs regarding the fixes? Can I do something else regarding the last one?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks!!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300776?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 18:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8452c51-8d1b-48fb-9928-62478b5db3ce</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;In addition - when replacing all the services in Glucose example with one NUS service - it doesn&amp;#39;t work anymore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300761?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 16:31:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c97ad3d-e250-45de-9055-e5f3737b7db8</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried to change my address on my Nordic device, and I&amp;#39;m using&amp;nbsp;pm_peers_delete() function before starting advertising. Still doesn&amp;#39;t work. Am I doing anything wrong?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300734?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 14:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aaf80ace-874b-4a4a-b30f-74012360af11</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;The reason I keep pushing that both of you should erase bonding information on the phones is that it behaves differently on different phones.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please just give it a try.&lt;/p&gt;
&lt;p&gt;At least confirm that you have tried this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If it doesn&amp;#39;t work, then let me know, and we can look into how you added the MTIM requirement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300723?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 14:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc392189-3a8c-4874-be43-e22070e224b2</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;In addition - I&amp;#39;ve noticed that&amp;nbsp;Glucose example contains&amp;nbsp;ble_gls_init_t struct, which contains a field named&amp;nbsp;security_req_t, which I can use to define MITM. However - I don&amp;#39;t have that field in NUS service struct&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300719?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 14:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f3b007e-9114-4efe-8cb3-f0c844b1c704</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;I think that the first option is the correct one.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using&amp;nbsp;ble_nus_init_t struct to initialize the service.&lt;/p&gt;
&lt;p&gt;When adding Rx and Tx characteristics, I&amp;#39;m using&amp;nbsp;BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM for read and write permissions.&lt;/p&gt;
&lt;p&gt;In addition - I&amp;#39;m using BLE_GAP_IO_CAPS_DISPLAY_ONLY and define a passkey with&amp;nbsp;sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, ...).&lt;/p&gt;
&lt;p&gt;It all works with Android, not with IOS.&lt;/p&gt;
&lt;p&gt;Am I doing something wrong?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300696?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 13:48:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bceb882-b363-492a-aedb-ff367a2bd26b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I noticed now that you were not the same person who posted this ticket. Please see my initial reply in this ticket.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Possible reasons:&lt;/p&gt;
&lt;p&gt;1: You didn&amp;#39;t set the MITM requirement correctly.&lt;/p&gt;
&lt;p&gt;2: the phone is either bonded, and hence doesn&amp;#39;t need to bond again, or it has cached the service and doesn&amp;#39;t see that the services has changed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300675?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 13:06:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22e1acd1-2b93-4d40-83ba-f94dd180df6e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Perhaps the devices are already bonded, then?&lt;/p&gt;
&lt;p&gt;I can ask again, no problem. Have you deleted the bonding information from the phone? I have given you plenty of options on how to do this by now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300657?ContentTypeID=1</link><pubDate>Thu, 18 Mar 2021 12:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ebd63f-0cba-4a2b-ae91-a04e9d21f414</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve used Glucose example&amp;nbsp;with increased&amp;nbsp;security level and I&amp;#39;ve successfully initiated pin code connection with IOS.&lt;/p&gt;
&lt;p&gt;The issue is that in my application - I&amp;#39;m using 2 services - NUS and Device Information Service. With those two services - IOS doesn&amp;#39;t initiate passkey popup, even when the security level is high (MITM). I don&amp;#39;t need the Glucose in my application.&lt;/p&gt;
&lt;p&gt;Can you please help me?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300432?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 13:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eab240fa-10a0-4f5a-b6ed-2a37f63715d8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Asaf,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you try to delete the phones BLE cache as described in my initial reply?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Edvin Holmseth"]Phones act a bit different on how long they keep this data. An easy way to check if this is the issue is to test with another phone and see if you get the same issue. Then try to erase the service data by forgetting the device. To be sure, you can also try to completely turn off the Bluetooth on the phone from the phones settings (not just the &amp;quot;drag up menu&amp;quot;, which doesn&amp;#39;t really turn the bluetooth off.&amp;nbsp;It rather turns off some of the functionality. You will note that it is only whited out, and not turned off, as if you disable it from the settings).[/quote]
&lt;p&gt;&amp;nbsp;I am still not convinced the phone is seeing the nRF as a new device that needs service discovery.&lt;/p&gt;
&lt;p&gt;Another way to force service discovery is to change the BLE address to force the phone to think it is a new device. For debugging purposes, you can try to do this from your application after initializing the ble_stack, but before you start advertising:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    ret_code_t err_code;
    
    ble_gap_addr_t my_addr;
    err_code = sd_ble_gap_addr_get(&amp;amp;my_addr);
    APP_ERROR_CHECK(err_code);
    
    NRF_LOG_INFO(&amp;quot;my addr before changing: 0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x&amp;quot;, my_addr.addr[0],
                                                                                        my_addr.addr[1],
                                                                                        my_addr.addr[2],
                                                                                        my_addr.addr[3],
                                                                                        my_addr.addr[4],
                                                                                        my_addr.addr[5]);
    my_addr.addr[0] = 0x01;
    
    err_code = sd_ble_gap_addr_set(&amp;amp;my_addr);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Just make sure to set my_addr.addr[0] to something it wasn&amp;#39;t initially (printed in the log).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Whenever you need to force the phone to redo the service discovery, increment my_addr.addr[0].&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300375?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 11:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d99cdc4-5b94-4e00-944b-b82108475e87</guid><dc:creator>AsafV</dc:creator><description>&lt;p&gt;Hi Edvin, thanks for the reply.&lt;br /&gt;&lt;br /&gt;The Rx/Tx&amp;nbsp;&lt;span&gt;characteristics are with MITM. The iPhone cannot discover these services. on Android I can see them without connecting&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;The UART contains the 2 characteristics with the MITM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The Ble device is waiting for passcode, but when&amp;nbsp;I attempt to connect using the iPhone nothing happens.. when I try to read, write or do anything it throws the errors from original post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We are also forgetting the bonding information, (pm_peers_delete)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have any idea what can go wrong? Where can we get an example of the configuration required for iPhone device to know that we require a passcode for bonding?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Asaf&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS BLE not showing passcode popup</title><link>https://devzone.nordicsemi.com/thread/300367?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 11:34:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b3ffd22-615d-43e2-a633-3db411761ce4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Try forgetting the device from the phone&amp;#39;s settings.&lt;/p&gt;
&lt;p&gt;If you want the devices to pair using a passcode, you should have at least one characteristic that requires encryption with MITM protection. Have you specified this in one of your characteristics?&lt;/p&gt;
&lt;p&gt;Also make sure to delete the bonding information on the nRF. The easiest way to do that is to erase the chip using &amp;quot;nrfjprog --eraseall&amp;quot; (&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download"&gt;nRF Command Line Tools&lt;/a&gt;) and re-programming it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What may happen is that the phone was connected to this device earlier, and discovered and cached the services. If you added a service later, it may still think it only has the original services. Phones act a bit different on how long they keep this data. An easy way to check if this is the issue is to test with another phone and see if you get the same issue. Then try to erase the service data by forgetting the device. To be sure, you can also try to completely turn off the Bluetooth on the phone from the phones settings (not just the &amp;quot;drag up menu&amp;quot;, which doesn&amp;#39;t really turn the bluetooth off.&amp;nbsp;It rather turns off some of the functionality. You will note that it is only whited out, and not turned off, as if you disable it from the settings).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;See if that helps, and let me know if it doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>