<?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>nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8836/nrf-uart-app-works-on-android-not-on-ios-8-4</link><description>My ANT BLE application runs on a custom board with a nRF51422, SD 310 rev 2.0.0 
 I can use the nRF UART app on an android phone, but on an iPhone with iOS 8.4 I can&amp;#39;t even see the device. 
 I can see the device in the list in the DFU Tool in the nRF</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Sep 2015 09:24:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8836/nrf-uart-app-works-on-android-not-on-ios-8-4" /><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32499?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2015 09:24:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:366948ac-057a-4a62-b71a-6bd2d440f6bf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Peterh: I&amp;#39;m glad that you found the issue. Regarding the reason #1, it was because sd_ble_uuid_vs_add() should be called (as in ble_nus_init() ) to add the NUS base UUID before you can use m_adv_uuids in advertising_init().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32498?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2015 12:16:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af3cfe92-4490-4f7d-a6c8-2da24eb3b296</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;In summary:&lt;/p&gt;
&lt;p&gt;iOS UART needs the advertising packet to work, android does not.&lt;/p&gt;
&lt;p&gt;The advertising packet didn&amp;#39;t come across for two reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;services_init() was not called before advertising_init(). It has to be that way around.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The advertising packet was not built correctly, the length was too long (&amp;gt;31 bytes). Splitting the packet into an advertising packet and a scan response packet did the trick.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32497?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 10:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f063ada4-7425-40b7-acd9-7a2fe9192745</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Maximum size of an advertising packet is 31 bytes. You have to count all the over head such as the flags, length, etc. My suggestion is to reduce the device name. Let&amp;#39;s say, make it 1 byte. Just to test.&lt;/p&gt;
&lt;p&gt;You can have 31 more bytes using the scan response packet. It&amp;#39;s the second packet that the advertiser sends when receive a scan request from a scanner. You can find the use of &amp;quot;scanrsp&amp;quot; when calling ble_advertising_init() in advertising_init() in the ble_app_uart example.&lt;/p&gt;
&lt;p&gt;You can post your code here, so I can have a look.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32496?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 10:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b201cc98-ed07-4e25-bdc0-3eed4f41a1e6</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;Success! If I put the adv_uuids into the scan response package, the UART works. Thanks for your help&amp;amp;patience :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32495?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 08:59:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0525f54-58e7-40a8-b53d-53a4b7b62291</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;Aha! Now we&amp;#39;re getting close to the issue I guess. I get NRF_ERROR_DATA_SIZE in the call to adv_data_encode, so I break out before even reaching the call to sd_ble_gap_adv_data_set().&lt;/p&gt;
&lt;p&gt;I guess I have to reduce the amount of advertising data in some way - is there a good way to split the info, or is it necessary to leave some of the info out?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32494?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 07:48:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c135039-fd84-4d7f-8d65-58225fa67dce</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Peter: OK, I understand now.
You meant with the example you can see local name and the NUS service UUID and you can connect using nRFToolbox and nRFUART, when with your application you can only see &amp;quot;Device is connectable&amp;quot; and can&amp;#39;t find it using nRFUART on iOS.&lt;/p&gt;
&lt;p&gt;I suspect there could be some issue when you set-up your advertising packet with advertising_init() function. You may need to check if the call for sd_ble_gap_adv_data_set() return NRF_SUCCESS.&lt;/p&gt;
&lt;p&gt;If possible please update your code here so that I can test.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32493?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 05:17:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cef669b-3f57-475f-89af-6905e3fe9285</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;That kind of puzzles me. The advertising info is different in the two cases as explained in my latest answer, but still you think the NUS service is included properly?&lt;/p&gt;
&lt;p&gt;Regarding ble_app_uart/nRFToolbox app etc : please look at the top of this thread, it&amp;#39;s what I have been doing all along ;-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32492?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2015 15:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f8250b-bf76-4dc1-a1f0-24f19660e15b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;This means the NUS service is included properly in the advertising packet.&lt;/p&gt;
&lt;p&gt;I would suggest you to try again with the nRFToolbox app, there is a UART profile included in the app (make sure you update to the lastest one).&lt;/p&gt;
&lt;p&gt;You should test with the ble_app_uart example from the SDK before testing with your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32487?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2015 14:58:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ce80231-fb6b-49f7-bb64-70abd792b712</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;The example shows:
Device is Connectable: Yes
LocalName: Nordic_UART
Service UUIDs: 6E400001 etc (reverse of the array in code)&lt;/p&gt;
&lt;p&gt;My code:
Device is Connectable - and that&amp;#39;s it I&amp;#39;m afraid...&lt;/p&gt;
&lt;p&gt;Thanks for clarifying. I run services_init first, then advertising_init. Could there be something else I&amp;#39;m missing? I guess that some sort of mechanism keeps on advertising while the device is on, but is there something I should do or be aware of in connection with that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32491?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2015 14:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8271bef8-cd10-4d8c-a327-8a6c2129ecf3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@peterh: Please double check, the 128 bit NUS UUID is added to the scan response packet when advertising in our ble_app_nus example. In LightBlue you can see the advertisement data when connected and click &amp;quot;Show&amp;quot; button next to &amp;quot;Advertisement Data&amp;quot;.&lt;/p&gt;
&lt;p&gt;The setting up of advertising packets (advertisement and scan response packet) are on GAP (Generic Access Profile) and the setting up of services and characteristics are on GATT (GENERIC ATTRIBUTE PROFILE). They are not the same and doesn&amp;#39;t have to be related to each other.
In the source code one is done by advertising_init() and the other is by services_init()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32490?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2015 14:19:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baa8d830-38d3-47eb-a0f1-16219559141d</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;Using the returned value - which is 3 by the way - doesn&amp;#39;t do anything good either.&lt;/p&gt;
&lt;p&gt;In LightBlue the advertisement data do not contain a local name or any Service UUIDs, as is the case when using the example.&lt;/p&gt;
&lt;p&gt;The answer may lie in this statement from you: &amp;quot;Note that the advertising packet setting up is a separate process with the service and characteristic initialization process. They are 2 independent setting up.&amp;quot;&lt;/p&gt;
&lt;p&gt;This paragraph makes no sense to me, could you please try to explain in some detail? What is the &amp;quot;characteristic initialization process&amp;quot; for example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32489?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2015 12:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd8c470e-8f81-4d76-8a16-a41a40ea220d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;The NUS_SERVICE_UUID_TYPE tells the stack of the index of the base UUID that we add to the database inside the stack using sd_ble_uuid_vs_add().&lt;/p&gt;
&lt;p&gt;sd_ble_uuid_vs_add() function returns the index of the UUID in uuid_type as the output. You can then use the value of uuid_type for the value of m_adv_uuids.&lt;/p&gt;
&lt;p&gt;We use NUS_SERVICE_UUID_TYPE (=0x02) just because in the example we only have one Vendor specific base UUID, and it will be at index  = 0x02. But if you have more than one you should use the value returned when you call sd_ble_uuid_vs_add.&lt;/p&gt;
&lt;p&gt;Note that the advertising packet setting up is a separate process with the service and characteristic initialization process. They are 2 independent setting up.&lt;/p&gt;
&lt;p&gt;You can see what is advertised using Master Control panel application either on PC or on Android, or with iOS you can use 3rd party app called &amp;quot;LightBlue&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32488?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2015 07:36:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54f4e1d3-1594-4ddf-b6b1-729b11288b32</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;You were right about the incorrect order of uuid_vs_add and uuid_encode. Switching the calls makes encode call return success now.&lt;/p&gt;
&lt;p&gt;Doesn&amp;#39;t solve my problem though. The codebase I use does not have a NUS_SERVICE_UUID_TYPE defined, but a peek in the s110 example tells me that the type is 2, so uuids array lloks like this:     static ble_uuid_t adv_uuids[] =  { {BLE_UUID_NUS_SERVICE,BLE_UUID_TYPE_VENDOR_BEGIN}, {BLE_UUID_CYCLING_POWER_SERVICE,  BLE_UUID_TYPE_BLE},{BLE_UUID_CYCLING_SPEED_AND_CADENCE,  BLE_UUID_TYPE_BLE},{BLE_UUID_BATTERY_SERVICE,        BLE_UUID_TYPE_BLE},  {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE} };&lt;/p&gt;
&lt;p&gt;Is there a way in which I can check what is actually advertised? (where should I stick a breakpoint to see if the correct function is called)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32486?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 14:41:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:698e9532-8428-4b09-b1f5-bbdfb0e1d7c5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You need to make sure you have called sd_ble_uuid_vs_add() to the UUID base database before you call  sd_ble_uuid_encode().&lt;/p&gt;
&lt;p&gt;However, we are talking about the advertising packet here. So it may not related to sd_ble_uuid_encode() issue. Could you check what you are advertising ? Make sure you have&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;m_adv_uuids[] = {{BLE_UUID_NUS_SERVICE, NUS_SERVICE_UUID_TYPE}}; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and added m_adv_uuids into the advertising packet or scan response packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32485?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 13:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f1efd52-76d8-454f-b9e7-15761ab7e170</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;Got sidetracked, but now I&amp;#39;m back looking at this issue...&lt;/p&gt;
&lt;p&gt;You&amp;#39;re probably right about the missing 128 bit NUS UUID. Next question is why it isn&amp;#39;t there:&lt;/p&gt;
&lt;p&gt;In my code the call : err_code = sd_ble_uuid_encode(&amp;amp;uuid, &amp;amp;encoded_size, NULL) returns NRF_ERROR_INVALID_PARAM when I call it with uuid = 1, type = 2 which I believe should represent the NUS. In the example code using SD 110 the same call returns NRF_SUCCESS, so what can I possibly be doing wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32484?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 13:32:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be098614-d0b8-4d47-9574-157453894cc1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@peterh: The iOS app will look for the 128 bit NUS UUID in the advertising packet and only show devices with this in the advertising packet when you connect.
The nRFUart Android app scan for any BLE device, and allow you to connect. After connected it will do service discovery and check if the NUS service is available or not.&lt;/p&gt;
&lt;p&gt;You may want to edit the source code of the iOS app to not filter for NUS service in advertising packet. Or add the service into the advertising packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32483?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 12:53:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a54e4d15-2e74-408a-bc57-d41406b4ff3d</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;The one in the toolbox doesn&amp;#39;t recognize my device+software either.&lt;/p&gt;
&lt;p&gt;As I commented above, the UART app &lt;em&gt;can&lt;/em&gt; be used together with the exampleproject, but not with my current code. My current code does however work with android, so the software isn&amp;#39;t entirely bad ;-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32482?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 12:47:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ad64c5a-c8b4-4d2f-bf6b-1c461937d502</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@peterh: Please test with the nrfToolbox (make sure you have latest version). There is an UART profile in the app. It&amp;#39;s more up to date than the nRFUart app on iOS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF UART app works on android, not on iOS 8.4</title><link>https://devzone.nordicsemi.com/thread/32481?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 07:10:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac3a1d54-75a0-4019-9013-70e56c522456</guid><dc:creator>peterh</dc:creator><description>&lt;p&gt;I can get the iPhone UART app to work with the ble_app_uart_s110 project, which indicates that my problem is in my parameter setup rather than &amp;quot;just&amp;quot; in the iOS part of the world.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>