<?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>Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59201/android-device-fails-to-reconnect-after-firmware-update-with-preserved-app-data</link><description>Hello, 
 I am currently working on a product with nRF51822 chip, based on SDK10.0.0. The problem is, after a firmware update, my device fails to reconnect to an Android mobile, even though the bonding information is preserved. 
 The bootloader is the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 May 2020 14:05:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59201/android-device-fails-to-reconnect-after-firmware-update-with-preserved-app-data" /><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/249512?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 14:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cf03cd9-5fb7-45b6-b196-834fbeadc3cb</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ah, I was not aware that the Android DFU Library would delete the bonding information by default. Happy to hear that you found the cause of the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/249492?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 13:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1afebccd-cc46-43b9-9952-0680be6e8ca3</guid><dc:creator>yaoCheng</dc:creator><description>&lt;p&gt;Hi bjorn,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the problem is now solved.&lt;/p&gt;
&lt;p&gt;The Android App uses the standard NORDIC library and the bonding information is deleted by default.&lt;/p&gt;
&lt;p&gt;That is why it no longer knows my device.&lt;/p&gt;
&lt;p&gt;thank you very much for your support &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Yao&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/249259?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 15:30:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69cb6411-b906-4c5f-ab43-8ee3d07a16fe</guid><dc:creator>yaoCheng</dc:creator><description>&lt;p&gt;Hi bjorn,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;yes, the APP data is preserved by changing &lt;span&gt;DFU_APP_DATA_RESERVED&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;My Device reconnectes successfully to an IOS device after FW update, without a new pairing. So I am sure that the bonding information is still there after update. The problem only exists with Android device.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Yao&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/249210?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 13:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5c4f171-413d-4902-a9bf-9c18a3ae2f5e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Yao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;have you configured the bootloader to preserve the application data, which also contains the bonding information, by setting &lt;span&gt;DFU_APP_DATA_RESERVED to&amp;nbsp;0x0C00&amp;nbsp;&lt;/span&gt;, see&amp;nbsp;&lt;a title="Preserving application data" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/bledfu_memory_appdata.html?cp=7_5_11_4_3_1_3_3"&gt;Preserving application data&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/248368?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 08:20:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f6e708-c57d-4f66-8941-66469d1aad91</guid><dc:creator>yaoCheng</dc:creator><description>&lt;p&gt;&lt;span class="user-name"&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/bjorn_2d00_spockeli"&gt;@bjorn-spockeli &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;Hi Bjorn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;I still can not figure out what caused the problem...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;do you have any idea about the difference between the following situations:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;1. when my device normally starts, it goes into bootloader first, and then jumps into application&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;2. after FW update, my device jumps from bootloader to application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;Under the first condition, the Aondroid device does not try to rebond (it correctly recognizes my device as a &amp;quot;known device&amp;quot;), but under the second condition, the Aondroid device sends a bonding-request. Does the NORDIC SDK do anything different under these two situations?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;Can the service changed characteristic cause the Android device to believe that my device is a new device?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;Yao&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/241404?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 14:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63f5d33b-6cef-414d-8254-1b21cc9f0244</guid><dc:creator>yaoCheng</dc:creator><description>&lt;p&gt;Hi Bj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;the address shown by nRF sniffer is the same before and after firmware update.&lt;/p&gt;
&lt;p&gt;I also tried to change the input argument of sec_status to BLE_GAP_SEC_STATUS_UNSPECIFIED, but my device and the Android mobile still fail to communicate with each other after firmware update.&lt;/p&gt;
&lt;p&gt;Here is the communication captured by nRF sniffer (pairing request from already bonded device &lt;strong&gt;rejected&lt;/strong&gt;),&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/fw_5F00_update_5F00_then_5F00_reject_5F00_bond_5F00_info_5F00_refresh.pcapng"&gt;devzone.nordicsemi.com/.../fw_5F00_update_5F00_then_5F00_reject_5F00_bond_5F00_info_5F00_refresh.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;which shows the process of bonding, firmware update and then the failed trial to reconnect.&lt;/p&gt;
&lt;p&gt;I think the request of pairing is rejected as you said (nRF sniffer No. 9688) . But I do not know why they still can not communicate with each other.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yet I find something that looks strange to me without the modification mentioned above. Here is the communication captured by nRF sniffer (pairing request from already bonded device &lt;strong&gt;accepted&lt;/strong&gt;):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/fw_5F00_update_5F00_then_5F00_accept_5F00_bond_5F00_info_5F00_refresh.pcapng"&gt;devzone.nordicsemi.com/.../fw_5F00_update_5F00_then_5F00_accept_5F00_bond_5F00_info_5F00_refresh.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After the firmware update and the new pairing process, the master keeps on sending the packet LL_START_ENC_RSP(from nRF sniffer No 9982). Does this mean that there is something wrong with the APP?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Yao&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/241343?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 11:23:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31172192-cbb6-4aba-801d-db17d2c3216b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Yao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the sniffer trace confirms that its the Master, i.e. Android device that issues the Pairing request ( Packet No 1245) to which the Slave, i.e. the nRF51422, responds with a Pairing response. Then the Pairing confirm and pairing random values are exchanged and the encryption process is started.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Device Manager allows the bond information to be refreshed so this is why it accepts the Pairing request.&lt;/p&gt;
&lt;p&gt;I do not have any explanation for why the Android sends a the Pairing Request, but you could modify the DM source to reject a pairing request if you are already bonded and see if the Android device then tries to re-encrypt the link with the stored keys. You can do this by modifying the case BLE_GAP_EVT_SEC_PARAMS_REQUEST in&amp;nbsp;dm_ble_evt_handler() in device_manager_peripheral.c to call&amp;nbsp;&lt;a title="Reply with GAP security parameters." href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s110.api.v8.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#ga7b23027c97b3df21f6cbc23170e55663"&gt;sd_ble_gap_sec_params_reply()&lt;/a&gt;&amp;nbsp;with&amp;nbsp;sec_status== BLE_GAP_SEC_STATUS_UNSPECIFIED&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Does the nRF51 device have the same Link Layer address, i.e.&amp;nbsp;fb:9e:df:ab:fe:6f, before and after the DFU?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/241152?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 13:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea0ad54e-17b9-4bd1-b21d-8b38cf81a0de</guid><dc:creator>yaoCheng</dc:creator><description>&lt;p&gt;Hi Bj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;thanks for your reply.&lt;/p&gt;
&lt;p&gt;I am using S110, v8.0.0.&lt;/p&gt;
&lt;p&gt;The communication between my board and the Android mobile is captured by nRF sniffer, filtered by packet length non-zero (please refer to the following file):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/reconnect_5F00_with_5F00_android_5F00_after_5F00_fw_5F00_update.pcapng"&gt;devzone.nordicsemi.com/.../reconnect_5F00_with_5F00_android_5F00_after_5F00_fw_5F00_update.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;After the FW update, when I try to reconnect to the Android mobile, I do receive the&amp;nbsp;BLE_GAP_EVT_SEC_INFO_REQUEST event. The arguments passed to sd_ble_gap_sec_info_reply() are listed below:&lt;/p&gt;
&lt;p&gt;conn_handle: 0x0000&lt;/p&gt;
&lt;p&gt;*p_enc_info:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/p_5F00_enc_5F00_info.png" /&gt;&lt;/p&gt;
&lt;p&gt;*p_id_info:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/irk.png" /&gt;&lt;/p&gt;
&lt;p&gt;*p_sign_info: NULL&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Yao&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android Device Fails to Reconnect after Firmware Update with Preserved APP data</title><link>https://devzone.nordicsemi.com/thread/240835?ContentTypeID=1</link><pubDate>Fri, 20 Mar 2020 11:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53ed0b89-23ce-4675-911b-a22a55593789</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Yao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;could you capture a on-air trace of the communication between the nRF51822 and the Android device using our &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer&lt;/a&gt; plugin in Wireshark and a NRF52 or NRF51 DK?&lt;/p&gt;
&lt;p&gt;Which SoftDevice are you using on the nRF51422?&lt;/p&gt;
&lt;p&gt;Do you receive the&amp;nbsp;BLE_GAP_EVT_SEC_INFO_REQUEST event when you try to re-connect after the DFU, see the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___b_l_e___g_a_p___p_e_r_i_p_h___e_n_c___m_s_c.html"&gt;Peripheral Encryption Establishment using stored keys&lt;/a&gt;&amp;nbsp;Message sequence chart? If so, then please debug the application and see what&amp;nbsp;arguments the application is passing to&amp;nbsp;sd_ble_gap_sec_info_reply() in device_manager_peripheral.c&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>