<?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>pc_ble_driver_py.exceptions.NordicSemiException: Characteristic value handler not found</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89816/pc_ble_driver_py-exceptions-nordicsemiexception-characteristic-value-handler-not-found</link><description>Using the pc_ble_driver_py.ble_driver I&amp;#39;m able to subscribe to notifications, but unable to get the values upon connection. The error is: 
 
 
 
 I do not know how to install a value handler and could not find documentation about it. The code looks like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Jul 2022 12:35:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89816/pc_ble_driver_py-exceptions-nordicsemiexception-characteristic-value-handler-not-found" /><item><title>RE: pc_ble_driver_py.exceptions.NordicSemiException: Characteristic value handler not found</title><link>https://devzone.nordicsemi.com/thread/376428?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2022 12:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20084581-24e0-437e-bdd6-896ce004fcc2</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Marc&lt;br /&gt;&lt;br /&gt;Ah, yes, it should indeed be Value Handle, not Handler* you are right.&lt;br /&gt;Thank you for sharing the fix to your issue - I am glad to see that it is now resolved! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.&lt;br /&gt;&lt;br /&gt;Good luck with your development!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc_ble_driver_py.exceptions.NordicSemiException: Characteristic value handler not found</title><link>https://devzone.nordicsemi.com/thread/376417?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2022 11:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a30eec5-ff06-49b0-9264-94c0b9e8716c</guid><dc:creator>marto</dc:creator><description>&lt;p&gt;In fact, the error message tricked me. It should probably be `value handle` and not `value handler`.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After realizing that value_handle could be specified and debugging the search for handles, I realized that I had to specify that my UUID is vendor specific.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The fix:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;from pc_ble_driver_py.ble_driver import driver

[…]

UUIDS = {
    &amp;#39;base&amp;#39;: &amp;quot;0000XXXX-1212-EFDE-1523-785FEABCD123&amp;quot;,
    &amp;#39;led&amp;#39;: 0x1525,
    &amp;#39;button&amp;#39;: 0x1524,
}

def uuid(key):
    &amp;quot;&amp;quot;&amp;quot;Parse a string and returns a BLEUUID&amp;quot;&amp;quot;&amp;quot;
    string = UUIDS[key]
    return list(bytearray.fromhex(string.replace(&amp;#39;-&amp;#39;, &amp;#39;&amp;#39;).replace(&amp;#39;X&amp;#39;, &amp;#39;0&amp;#39;)))


def build_uuid(key):
    &amp;quot;&amp;quot;&amp;quot;Build a nordic BLEUUID from a key (led, button)&amp;quot;&amp;quot;&amp;quot;
    return BLEUUID(UUIDS[key], BLEUUIDBase(uuid(&amp;#39;base&amp;#39;), uuid_type=driver.BLE_UUID_TYPE_VENDOR_BEGIN))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What&amp;#39;s strange is that googling for BLE_UUID_TYPE_VENDOR_BEGIN + python does not give a lot of answer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Marc.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc_ble_driver_py.exceptions.NordicSemiException: Characteristic value handler not found</title><link>https://devzone.nordicsemi.com/thread/376414?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2022 11:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb04e404-3389-4b44-a090-bb590a8cdeac</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Marc,&lt;/p&gt;
[quote user=""]I do not know how to install a value handler and could not find documentation about it.[/quote]
&lt;p&gt;Yes, unfortunately the documentation for the pc-ble-driver-py is very sparse. Fortunately, both it and the&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;the pc-ble-driver&lt;/a&gt;&amp;nbsp;are very similar, since they both just expose the serial interface to the connectivity device, so a lot of the time it can be helpful to take a look at the usage and inline comments from the pc-ble-driver too.&lt;/p&gt;
[quote user=""]status, data = self.adapter.read_req(new_conn, build_uuid(&amp;#39;button&amp;#39;))[/quote]
&lt;p&gt;Could you show where you set the new_conn value, and the contents of the build_uuid function?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>