<?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>Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5976/bootloader-ios-and-secure-connection</link><description>Hi All, 
 Does anybody has a working setup using SD 7.1.0 with SDK 7.2.0, iOS 8, DFU with a secure connection?
When I use no encryption it works, but when I enable encryption Toolbox is complaining about wrong handles. I do call sd_ble_gatts_service_changed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Mar 2015 11:52:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5976/bootloader-ios-and-secure-connection" /><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20852?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2015 11:52:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74a69789-ea25-4f42-93ed-40d32aea224d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Good that you found the root cause. You are welcome to select the answer as correct and the case can be closed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20859?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 15:45:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2a43fba-f6ff-40c8-a89f-664126e8192b</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;I did some more testing and it is faulty behavior of LightBlue. Sorry for the confusion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20858?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 15:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32877273-1ad6-4cae-994e-36753ea36cba</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;What I meant was you may not change the ATT table when in the middle of a connection connection, as you also mentioned. The result is that you have to reconnect to perform a change. Or do I miss something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20857?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 15:30:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc0e2085-bb7e-4a16-a097-fd1679066974</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;It looks like this is the behavior of LightBlue (which I use for testing). It behaves different in iOS 8.1 and in iOS 8.2. I get a popup saying: Connection Alert; The peripheral disconnected while being interrogated.&lt;/p&gt;
&lt;p&gt;note: I only use encrypted links&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20856?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 15:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f7b13b9-f979-4dad-96c6-69a73cb3cb79</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I haven&amp;#39;t seen that behaviour. What I observed is that if prior to the SC indication the iOS device has already done a service discovery, it will not do a re-discovery. So it&amp;#39;s true that service changed indication should be used when the attribute table is changed compare to the last time it is connected to the same master, not if the table is change in the middle of the connection.&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t seen in the spec that mentions the master should terminate and reconnect when receiving SC indication.
If you can send me an example showing that iOS&amp;#39; behaviour it would be great.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20855?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 14:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eaf34671-c2a0-4656-8116-17bcb636579c</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;I can&amp;#39;t sniff because it (both Master Control Panel and sniffer) does not work in a VirtualBox :-(
My setup is different from yours. But when I detect in the application that the bootloader service was used I send a service changed so the iPhone does a new discovery. This works all well but when the iPhone receives the service changed it disconnects. The application however disconnect after a timeout.
I think this is &amp;quot;normal&amp;quot; behavior because the specification says that the new characteristics are only valid after a reconnect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20854?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 14:31:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1138d879-a303-45da-a664-f41b1a2fa508</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;No, I don&amp;#39;t. Could you capture a sniffer trace and send me ?&lt;/p&gt;
&lt;p&gt;Note: we only send service changed when the link is encrypted. So if you haven&amp;#39;t bonded with the device before you shouldn&amp;#39;t receive any service changed indication.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20853?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 14:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:565ff60f-14c8-4ed7-bd81-34bc7829c372</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;The update works as you say, but when starting the updated app the first time the iPhone with iOS 8.2 disconnects. Because of the service changed indication. You don&amp;#39;t see that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20851?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 13:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:947b69fc-3ea6-4018-b57b-516c2f60507c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I just tested again, worked smoothly. I attached the application and the bootloader hex file I used. Tested with S110 v8.0 and nRFToolbox App, Ipad iOS8.2&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6175.bootloader.hex"&gt;bootloader.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/HRM_5F00_DFU_5F00_BONDED_5F00_S110v80.zip"&gt;HRM_DFU_BONDED_S110v80.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20849?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 13:22:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7454247d-40fd-4e1a-8d5a-1b6a2eb6c3e2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I post the next comment as an answer because I want to attach a file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20848?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 13:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b19251cb-6b38-4d31-8ab7-965193458bc3</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;There is some difference in behavior. iOS 8.2 disconnects directly after receiving a service changed. iOS 8.1.x does not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20847?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 12:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c65b4d7f-b071-4a40-b991-3868aebcf0d9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Marcel: No, I guess it was 8.1.x. I can see the update to 8.2 available on my iPad now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20846?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2015 08:10:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a4dc5d0-486a-433b-a136-92b8e12d0ff8</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;Did you also tried this with iOS version 8.2?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20843?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 14:50:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8195423-e92e-4963-9766-3ead60bf2ae0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Marcel: The main point is to have iOS to do a service discovery when we switch to bootloader.
The reason why it worked when there is no bonding is that iOS will do service discovery everytime it connect to a unbonded device (if there is a service changed characteristic on it).
I just tried here with SDK v8.0 DFU example and it worked pretty smooth on iOS. I modified so that the hrm dfu example require bonding. And I just have to click Upload on nRFToolbox to have the app write 0x01 to DFU control point, switch to DFU bootloader, send service changed indication, have iOS do service discovery, and then upload the new image, everything was done when the link was encrypted.
I would suggest you to try with new SDK example and can record a sniffer trace and see what happens when switching to DFU when bonded.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20845?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 16:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8594b4ae-0567-4446-b787-11d1e3beea6e</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;Yes I have set gatts_enable_params.service_changed to 1 in both cases. So I send a sd_ble_gatts_service_changed when I change from application to bootloader and I send a sd_ble_gatts_service_changed from bootloader to application when an update is succeeded.
I really do not understand why a unsecure connection works and a secure connection not. My guess is it is a iOS problem, but I am nt completely sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20844?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 14:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b630f48-99a4-40d1-ae80-50fc22100cfd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Marcel: Have you make sure you set IS_SRVC_CHANGED_CHARACT_PRESENT = 1 in both the application code and the bootloader code ? The observation I had with iOS is that when you sent service changed indication and disconnect, the next time when connected, iOS device will do a service discovery and update the server attribute table.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader, iOS and secure connection</title><link>https://devzone.nordicsemi.com/thread/20850?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 07:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4510476c-f104-433d-af6a-734b71c2c551</guid><dc:creator>Marcel Mulder</dc:creator><description>&lt;p&gt;I found a work-a-round for my problem. I made the handles equal by putting the dfu service first in the initialization of the services as it is in the bootloader. This is however not done in the examples. As it actually should be.&lt;br /&gt;
But I am still curious if somebody else as a working setup with iOS 8, secure connection and DFU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>