<?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>ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15268/ble_ancs_c_t-add-to-ble_advertising_init-get-error-code-12</link><description>(/attachment/0495424521df76d5b8f8e66c969ed791)Hi,
I add ANCS Service into my Heart rate ref ble_app_ancs_c example code.
I use MCU nRF51 and SD130 in nRF5_SDK_11.0.0_89a8197. 
 When I add ANCS_UUID_SERVICE UUID into my advertising_init will get error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jul 2016 12:22:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15268/ble_ancs_c_t-add-to-ble_advertising_init-get-error-code-12" /><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58334?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 12:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cc0bf1e-0d5b-4262-a57f-72dc33e14b10</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Vincent: Yes, it showed that the device is bonded with the phone. You can see the list of the bonded device by going to the Bluetooth setting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58336?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 09:18:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e81b6b2-8794-401f-b6bc-419fac175a66</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;The heart rate profile was not made to be used with ANCS. Could you provide a screenshot and add it into the question ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58335?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 22:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a55236a-ce28-4358-b35d-ea410cf29a51</guid><dc:creator>Vincent</dc:creator><description>&lt;p&gt;I use Heart rate profile in nRF ToolBox.
First time nRF ToolBox scan it has no Lock icon but after connect to nRF toolbox and Iphone (ANCS)
Then start nRF toolbox App again it will show up.
Does it happen because ancs service or not.&lt;/p&gt;
&lt;p&gt;The MCU does work fine now.
I just wonder this lock icon. What the lock icon show the cause of ANCS service.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58333?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 13:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3521b078-8c98-4699-a8aa-472f1be5ca35</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Which profile did you use in nRFToolbox? most likely the lock icon was to indicate the device is bonded.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58332?ContentTypeID=1</link><pubDate>Sat, 23 Jul 2016 11:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4100d657-59c8-4b73-bbca-a0127f585497</guid><dc:creator>Vincent</dc:creator><description>&lt;p&gt;It is done and thank you so much.
There is one more question about nRF toolbox.
After ANCS service connect to IPhone.
Start nRF Toolbox App again.
There is one small lock icon on the device name left side.
What the small lock icon means?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58331?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 11:41:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e5fed37-e56d-4fb1-be9a-70e0426c248d</guid><dc:creator>Vincent</dc:creator><description>&lt;p&gt;I will take a look tomorrow.
but I just put the HR, BATTERY, Device Information and ANCS and One service of my own
Total is five services. Are these is over 31 Bytes?&lt;/p&gt;
&lt;p&gt;Now I remove ANCS and put 4 services into Advertising init then MCU does work.
I try to connect to IPhone and It can connect once.
If I close App the ANCS is still connect to IPhone, this is no problem but I start App again the App can not connect to other services.&lt;/p&gt;
&lt;p&gt;I have this result for now and I will check the web site you give me tomorrow.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_ancs_c_t add to ble_advertising_init get error code 12</title><link>https://devzone.nordicsemi.com/thread/58330?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 09:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b79a989a-b2f5-4a27-81d1-aad976a439a6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Vincent,&lt;/p&gt;
&lt;p&gt;If you have a look at the error list, you can find error 12 means NRF_ERROR_DATA_SIZE.&lt;/p&gt;
&lt;p&gt;You may have put too many bytes in the advertising packet, the maximum size is 31 bytes.
If there is not enough you can think of using scan response packet.
You can have a look &lt;a href="https://devzone.nordicsemi.com/blogs/782/bluetooth-smart-and-the-nordics-softdevices-part-1/"&gt;here&lt;/a&gt; to read more.&lt;/p&gt;
&lt;p&gt;ANCS UUID in the advertising packet/scan response packet is needed if you want your device to be re-connected automatically by the phone, natively.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>