<?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>ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49875/ancs-connectivity-problem</link><description>Hi, I am running ANCS example application ( nRF5_SDK_15.3.0_59ac345/examples/ble_peripheral/ble_app_ancs_c ) i changed allow_repairing = false to allow_repairing = true 
 case PM_EVT_CONN_SEC_CONFIG_REQ: { // Reject pairing request from an already bonded</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jul 2019 06:43:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49875/ancs-connectivity-problem" /><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200653?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2019 06:43:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d84819f1-9d87-4b1c-abfe-7f332a13dc51</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Could you please create a new ticket about this?&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200491?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:31:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11b4a1e9-4299-4a7c-ad18-f2e07efb57b9</guid><dc:creator>IMRAN</dc:creator><description>&lt;p&gt;hi&amp;nbsp;Joakim&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;want&amp;nbsp;to generate a custom delay of one microsecond&amp;nbsp; &lt;strong&gt;without using any timers&lt;/strong&gt;&amp;nbsp;By simply&lt;strong&gt;&amp;nbsp;Executing&amp;nbsp;instructions&lt;/strong&gt; I want to generate is there any possibility please let me know&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200488?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40af633e-d908-459c-b5a3-12a84b13ca6a</guid><dc:creator>IMRAN</dc:creator><description>&lt;p&gt;you are welcome&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200480?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3a7c89a-97c2-4c0c-a710-a43dc9d32556</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks for sharing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200478?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 10:56:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4c63b08-cb72-46a5-82ed-591be6122fd9</guid><dc:creator>IMRAN</dc:creator><description>&lt;p&gt;Hey Joakim,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;Here is the snippet I am using to avoid my problem. The problem seems to be advertising whitelist reply. This holds the boards to only connected to already connected peered device and was not able to pair with other devices, to do so either we were erasing peered devices or connecting to same paired devices.&lt;/p&gt;
&lt;p&gt;Solution: Fast advertising mode&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Not Fast advertising with whitelist&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="text"&gt;
case BLE_ADV_EVT_WHITELIST_REQUEST:
{
ble_gap_addr_t whitelist_addrs[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
ble_gap_irk_t whitelist_irks[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
uint32_t addr_cnt = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
uint32_t irk_cnt = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;

memset(whitelist_addrs,0x00,sizeof(whitelist_addrs));

ret = pm_whitelist_get(whitelist_addrs, &amp;amp;addr_cnt, whitelist_irks, &amp;amp;irk_cnt);
APP_ERROR_CHECK(ret);
#if DEBUG_MAIN
printf(&amp;quot;\npm_whitelist_get returns %d addr in whitelist and %d irk whitelist\r\n&amp;quot;, addr_cnt, irk_cnt);
for(uint8_t i = 0; i&amp;lt;8; i++)
{
for(int j =5; j&amp;gt;=0;j--)
{
printf(&amp;quot;%02x,&amp;quot;,whitelist_addrs[i].addr[j]);
}
printf(&amp;quot;\n&amp;quot;);
}
#endif
// Apply the whitelist.
/*ret = ble_advertising_whitelist_reply(&amp;amp;m_advertising,
whitelist_addrs,
addr_cnt,
whitelist_irks,
irk_cnt);
APP_ERROR_CHECK(ret);*/
}break;







case PM_EVT_PEER_DATA_UPDATE_SUCCEEDED:
{
// Note: You should check on what kind of white list policy your application should use.
if ( p_evt-&amp;gt;params.peer_data_update_succeeded.flash_changed &amp;amp;&amp;amp; (p_evt-&amp;gt;params.peer_data_update_succeeded.data_id == PM_PEER_DATA_ID_BONDING))
{
#if DEBUG_MAIN
printf(&amp;quot;\nNew Bond, add the peer to the whitelist if possible\n&amp;quot;);
printf(&amp;quot;\nm_whitelist_peer_cnt %d, MAX_PEERS_WLIST %d\n&amp;quot;, m_whitelist_peer_cnt + 1, BLE_GAP_WHITELIST_ADDR_MAX_COUNT);
#endif

if (m_whitelist_peer_cnt &amp;lt; BLE_GAP_WHITELIST_ADDR_MAX_COUNT)
{
uint16_t dummy_peer_id = p_evt-&amp;gt;peer_id;
for(uint8_t i = 0; i&amp;lt;8; i++)
{

if(dummy_peer_id == m_whitelist_peers[i])
{
break;
}
else if(m_whitelist_peers[i] == 0xffff)
{

m_whitelist_peers[i] = dummy_peer_id;
m_whitelist_peer_cnt = m_whitelist_peer_cnt + 1;
//printf(&amp;quot;ith value:%d\n&amp;quot;,i);
// ret = pm_device_identities_list_set(m_whitelist_peers, (uint32_t )i);
// APP_ERROR_CHECK(ret);
// ret = pm_whitelist_set(m_whitelist_peers, (uint32_t )i);
// APP_ERROR_CHECK(ret);
//peer_list_get(m_whitelist_peers, &amp;amp;m_whitelist_peer_cnt);
break;
}
}
// Bonded to a new peer, add it to the whitelist.
//m_whitelist_peers[m_whitelist_peer_cnt] = p_evt-&amp;gt;peer_id;

// The whitelist has been modified, update it in the Peer Manager.
//ret = pm_device_identities_list_set(m_whitelist_peers, m_whitelist_peer_cnt);
/*if (ret == BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE)
{
printf(&amp;quot;\nDUPLICATE ID FOUND-----------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;\n&amp;quot;);
}
else if (ret != NRF_ERROR_NOT_SUPPORTED)
{
printf(&amp;quot;\nNRF_ERROR_NOT_SUPPORTED\n&amp;quot;);
APP_ERROR_CHECK(ret);
}
*/
//printf(&amp;quot;\nm_whitelist_peer_cnt------------------------&amp;gt;&amp;gt;%d\n&amp;quot;, pm_peer_count());
//m_whitelist_peer_cnt = pm_peer_count();

// ret = pm_whitelist_set(m_whitelist_peers, m_whitelist_peer_cnt);
// APP_ERROR_CHECK(ret);

//m_whitelist_peer_cnt = m_whitelist_peer_cnt + 1;
#if DEBUG_MAIN
for(uint8_t i = 0; i&amp;lt;8; i++)
{
printf(&amp;quot;%04x\n&amp;quot;, m_whitelist_peers[i]);
}
#endif
}
}

}
break;



case PM_EVT_CONN_SEC_SUCCEEDED:
{
// Check it the Service Changed characteristic handle exists in our client instance.
// If it is invalid, we know service discovery is needed.
// (No database was loaded during @ref PM_EVT_BONDED_PEER_CONNECTED)
if (m_gatts_c.srv_changed_char.characteristic.handle_value == BLE_GATT_HANDLE_INVALID)
{
ret = nrf_ble_gatts_c_handles_assign(&amp;amp;m_gatts_c, p_evt-&amp;gt;conn_handle, NULL);
APP_ERROR_CHECK(ret);

// Discover peer&amp;#39;s services.
m_ancs_discovered = false;
m_gatts_discovered = false;
memset(&amp;amp;m_db_disc, 0x00, sizeof(m_db_disc));
ret = ble_db_discovery_start(&amp;amp;m_db_disc, p_evt-&amp;gt;conn_handle);
APP_ERROR_CHECK(ret);
}
else
{
ret = ble_db_discovery_start(&amp;amp;m_db_disc, p_evt-&amp;gt;conn_handle);
if (ret != NRF_ERROR_BUSY)
{
APP_ERROR_CHECK(ret);
}
}
} break;



iadded this to peer manger event handler

case PM_EVT_CONN_SEC_CONFIG_REQ:
{
// Reject pairing request from an already bonded peer.
pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
pm_conn_sec_config_reply(p_evt-&amp;gt;conn_handle, &amp;amp;conn_sec_config);
} break;&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200464?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 10:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1469d3e-5566-4990-bed8-54727ca23b71</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;I&amp;#39;m glad to hear that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to share the solution to your problem, this might help others in the community with the same problems in the future.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200442?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 09:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e6a4000-b61b-4d7e-b737-9735c5456cca</guid><dc:creator>IMRAN</dc:creator><description>&lt;p&gt;thanks for the reply but i solved this issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/200413?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 07:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8410f6a-a054-40b1-8c1a-8f61177130e4</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user=""]and i am trying to connect with another device i am unable to connect and unable to pair the device[/quote]
&lt;p&gt;So you are not able to connect or pair with another device after&amp;nbsp;disconnecting from the first device you paired with?&lt;/p&gt;
&lt;p&gt;Did you delete the bond information before trying to connect to a new device?&lt;/p&gt;
&lt;p&gt;Have you made sure that your device isn&amp;#39;t advertising with a whitelist after disconnecting the first device?&lt;/p&gt;
&lt;p&gt;Are the maximum allowed bonds, BLE_GAP_WHITELIST_ADDR_MAX_COUNT &amp;gt; 1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ANCS CONNECTIVITY PROBLEM</title><link>https://devzone.nordicsemi.com/thread/199695?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 09:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bae95cd7-7bc7-4984-8b6a-5786d389cfe8</guid><dc:creator>IMRAN</dc:creator><description>&lt;p&gt;please help me out this problem&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>