<?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>Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22249/unable-to-send-messages-nrf52-ble-central-custom-device</link><description>Currently I am using the NRF52 device to connect with a custom peripheral. The current goal I am trying to reach is toggling an LED by sending the command 0x8900 through Service UUID 0x0001 with Characterisic ID 0x0002. 
This is a write command that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 May 2017 11:10:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22249/unable-to-send-messages-nrf52-ble-central-custom-device" /><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87456?ContentTypeID=1</link><pubDate>Thu, 25 May 2017 11:10:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca53eb7e-dbe7-43ef-875d-f00cc614c144</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Glad to help and good to hear that &lt;code&gt;peer_manager&lt;/code&gt; works well for you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87455?ContentTypeID=1</link><pubDate>Wed, 24 May 2017 22:19:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4bf47b5-0e64-4679-848c-4b1a8bd767ee</guid><dc:creator>P879</dc:creator><description>&lt;p&gt;Thank you for all of your help endnode.  I solved the issue several minutes ago.&lt;/p&gt;
&lt;p&gt;The issue was solved by adding all of the peer_manager code that was included in the HRS demo.  With this the bonding would occur quite easily.  Once bonded the commands worked immediately.&lt;/p&gt;
&lt;p&gt;I will note that if anyone has trouble bonding you have to make sure to remove the handling of&lt;/p&gt;
&lt;p&gt;BLE_GAP_EVT_SEC_PARAMS_REQUEST by the on_ble_evt event handler.  Both the event handler and peer_manager were trying to respond to the event causing the processor to reset.  This took me several hours to figure out.   The peer manager handles all of the security requests.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87454?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 20:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80e205df-1ba5-4a69-becb-eaa618c54b64</guid><dc:creator>P879</dc:creator><description>&lt;p&gt;After more trial and error I believe that the problem is that the connection is paired, but not bonded.  The custom device requires bonding.   The iOS and Android phones all bond automatically.   I am going to move forward with attempting to implement the peer_manager to handle the bonding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87453?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 19:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b300256-96ea-4e80-96fe-8d1e23fbaff1</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;//..&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;case BLE_GATTC_EVT_WRITE_RSP:
            if ((p_ble_evt-&amp;gt;evt.gattc_evt.gatt_status == BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION) ||
                (p_ble_evt-&amp;gt;evt.gattc_evt.gatt_status == BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION))
            {
                uint32_t err_code = dm_security_setup_req(&amp;amp;p_client-&amp;gt;handle);
                APP_ERROR_CHECK(err_code);
            }
            on_evt_write_rsp(p_ble_evt, p_client);
            break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So if you are using Device Manager module or your own code to manage link security it should be solved there. But as I said it&amp;#39;s hard to debug something through the forum posts just based on few lines of code and UART debug (not saying I do want your full project, I don&amp;#39;t have time to run it and debug for you anyway;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87452?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 19:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96a1a707-a447-45d5-8b30-90acdab3f003</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well my assumption that GATT object you are targeting requires some pairing step which you haven&amp;#39;t pass is based on &lt;code&gt;BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION&lt;/code&gt; error you get as Write result. The fact that mobile apps are OK can be simply caused by proper pairing of your device with that phone. Now when I look into nRF5 SDK v13 there is an example &lt;code&gt;.\examples\ble_central\ble_app_multilink_central\client_handling.c&lt;/code&gt; where BLE event handler contains following code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//...
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87451?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 19:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2634712-25f4-484e-b617-b00bc99928ad</guid><dc:creator>P879</dc:creator><description>&lt;p&gt;Since both the LightBlue app and the nRF connect app can immediately discover all of the services and perform any operation I don&amp;#39;t believe that a security issue is occurring.   I don&amp;#39;t think that I need anything in that realm.&lt;/p&gt;
&lt;p&gt;I have discovered two services, but I have not called:&lt;/p&gt;
&lt;p&gt;uint32_t characteristic_add(uint16_t                   service_handle,
ble_add_char_params_t *    p_char_props,
ble_gatts_char_handles_t * p_char_handle)&lt;/p&gt;
&lt;p&gt;with either of them.  Is this a step that has to occur before I can start writing to the characteristics?  It just seems like I have discovered them, but as you said they are not &amp;#39;open&amp;#39;.   It has to be something on my end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87450?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 16:26:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a7dbf69-ece8-48b7-9165-08b790146c0e</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hard to say when not seeing what is really happening on BLE radio but if you are not sure if pairing is completed in your custom code then using peer_manager module from SDK might help. I personally don&amp;#39;t us it but if you are starting from scratch it might be the fastest route.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87449?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 16:24:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba871fc0-b8f8-41a0-b4cd-15a5a8f8f1b2</guid><dc:creator>P879</dc:creator><description>&lt;p&gt;I am working on solving the permission issue, but I am not having any luck. I am trying to call:&lt;/p&gt;
&lt;p&gt;error = sd_ble_gap_authenticate(p_ble_evt-&amp;gt;evt.gattc_evt.conn_handle, &amp;amp;security_params);&lt;/p&gt;
&lt;p&gt;When I receive the security failure. I am leaning towards implementing the Peer Manager software. It appears that the peer manager performs the security and bonding that is not included in the UART BLE example. Does this seem like good route to take?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to Send Messages NRF52 BLE Central Custom Device</title><link>https://devzone.nordicsemi.com/thread/87448?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 09:34:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bad48dc7-6528-4edb-b204-3976bc3cfa4f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;It looks like your characteristics are not &amp;quot;open&amp;quot; but they have certain permissions set on ATT/GATT layer and your connection doesn&amp;#39;t have authorization (typically didn&amp;#39;t pass some Security Manager pairing/bonding procedure).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>