<?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>Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8779/is-it-possible-to-bypass-service-discovery-in-s120-if-uuids-and-characteristics-of-peripheral-are-known</link><description>Hi,
I am using the S120 stack and wish to connect and control as quickly as possible to the peripheral. The central and peripheral devices are both embedded devices and are dedicated to each other for eternity. I only have control of the central source</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Apr 2017 23:44:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8779/is-it-possible-to-bypass-service-discovery-in-s120-if-uuids-and-characteristics-of-peripheral-are-known" /><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32212?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 23:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de3e3868-7eba-459e-b024-de9a943390aa</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;Hi Boz, I know this post is old, but can you share part of you experience bypassing the discovery service? what example did you use? can you share some code snippet? Thanks and I apologize for too many questions :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32211?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2015 07:39:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c64e3b0-fb40-433c-9739-2a1b034517f2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I see, you meant you disconnect the connection and enter sleep mode. Not the sleep mode between the connection event. Then yes, you may need to re-init the client module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32210?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2015 15:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3432c9cf-5b65-4249-9e65-bd5c29155551</guid><dc:creator>boz</dc:creator><description>&lt;p&gt;My application only requires a single connection event every few hours or sometimes even a few days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32209?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 13:29:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0010bd89-06fb-44a7-b1b9-addedef87f6f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@boz: Then I don&amp;#39;t get it. The CPU will go to sleep on every connection event (with sd_app_evt_wait()). You meant you reinit client module on every single connection event ??&lt;/p&gt;
&lt;p&gt;If the module hold the last values of the characteristic handle IDs, isn&amp;#39;t it better we can just re-use them?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32208?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 12:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bc9c8e7-6782-439e-b193-9ed7d352755c</guid><dc:creator>boz</dc:creator><description>&lt;p&gt;reinit after wake up from sd_app_evt_wait();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32207?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2015 12:18:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4f4608c-8782-4c60-871c-9f9aa32e9640</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@boz: I&amp;#39;m glad that you managed to find the bug.
Just curious about your last note &amp;quot;You must reinit the Client Modules after waking up as they will hold the last values used before sleeping.&amp;quot; What do you mean by sleeping ? it&amp;#39;s the power down mode or else ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32206?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2015 22:40:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ea2cdd9-57bb-4e87-9c8d-eaa751a9eb6f</guid><dc:creator>boz</dc:creator><description>&lt;p&gt;Thank you for suggesting the sniffer Hung.  Using it I was quickly able to find the problem -- my coding :/  The solution turned out to be quite simple.  Using the battery service as an example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Init the Battery Service Client module with known handles rather than the default INVALID handles in ble_bas_c_init( )&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After connection do not call  ble_db_discovery_on_ble_evt( ) in client_handling_ble_evt_handler( ) but call your own function to tell the event handler that discovery is complete:&lt;/p&gt;
&lt;p&gt;void set_bas_discovery(ble_db_discovery_t * const p_db_discovery)
{
ble_bas_c_evt_t evt;
evt.evt_type = BLE_BAS_C_EVT_DISCOVERY_COMPLETE;
mp_ble_bas_c-&amp;gt;evt_handler(mp_ble_bas_c, &amp;amp;evt);
}&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next time bas_c_evt_handler() is called, case BLE_BAS_C_EVT_DISCOVERY_COMPLETE is now true so you can call ble_bas_c_bl_read() instantly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Same idea for all known handles.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note:  You must reinit the Client Modules after waking up as they will hold the last values used before sleeping.&lt;/p&gt;
&lt;p&gt;Worked for me...&lt;/p&gt;
&lt;p&gt;Thanks again to Nordic for all the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32205?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2015 13:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f68a883-aa06-4f2c-8e31-3052cadc1e92</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Boz,&lt;/p&gt;
&lt;p&gt;Could you check the disconnected reason when BLE_GAP_EVT_DISCONNECTED occurs ? You can find the reason inside p_ble_evt-&amp;gt;gap_evt-&amp;gt;disconnected-&amp;gt;reason.&lt;/p&gt;
&lt;p&gt;You can also try to do a sniffer trace and upload it here (in your question) so that we can find what happens over the air.&lt;/p&gt;
&lt;p&gt;When the central disconnected would it continue to scan or just hang ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32204?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2015 00:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70fb67b6-50e6-47cd-b4c7-f5944f32c18a</guid><dc:creator>boz</dc:creator><description>&lt;p&gt;Update: I can read/write the characteristics directly by not calling ble_db_discovery_on_ble_evt() from client_handling_ble_evt_handler() after connect, but the central/server is disconnecting prematurely.  When using the ble_db_discovery_on_ble_evt() as intended it waits for disconnect from the peripheral/client normally (BLE_GAP_EVT_DISCONNECTED).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32203?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2015 23:18:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3a4f647-3158-4ad0-a404-57a796d408f0</guid><dc:creator>boz</dc:creator><description>&lt;p&gt;Referring to :&amp;quot;To skip this step you need to store these (persistently or not) on the first connection and then give them to ble_hrs_c and ble_bas_c on subsequent connections.&amp;quot;  I can initialize ble_hrs_c and ble_bas_c on boot with the uuids and handles required; however, this still does not prevent the central/server discovery from running.  I must be missing a step to prevent this. The comment by Carles to avoid this by setting &amp;quot;en_param.gatts_enable_params.service_changed = 0&amp;quot; is specific to the peripheral/client.  Thanks much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to bypass service discovery in S120 if UUIDs and characteristics of peripheral are known?</title><link>https://devzone.nordicsemi.com/thread/32202?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 09:16:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7deebd31-1cd1-4cbe-bc5d-1ae403fb01d8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Please have a look at this &lt;a href="https://devzone.nordicsemi.com/question/43446/s120-central-bonding-with-s110-peripheral/"&gt;question&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>