<?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>Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55036/data-length-update-with-pc-ble-driver-py-library</link><description>Hi everyone, 
 I am trying to start a data length update procedure from a central that I am developing with python using the library pc-ble-driver-py. 
 However, I keep having the error 0x13 which corresponds to a timeout (generated in the function &amp;quot;ble_gap_data_length_update</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Dec 2019 09:25:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55036/data-length-update-with-pc-ble-driver-py-library" /><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/226508?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 09:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfcb8016-4894-4180-aaa6-76310ef79b90</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Update: it should be fixed by&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-py/pull/149"&gt;https://github.com/NordicSemiconductor/pc-ble-driver-py/pull/149&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/226043?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 08:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fdb8d5e-2ef2-47d7-862d-04e0d35958a2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The task has been added to the current sprint, which ends January 7, but as there are a few holidays in the next couple of weeks, I&amp;#39;m not sure how much time they will get to spend on it. But were you able to get longer data packets as I did? You can use the debug output from the peripheral to confirm.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/225915?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2019 14:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd6d51b2-b622-424a-a5b8-0faa71da6a3e</guid><dc:creator>Imen</dc:creator><description>&lt;p&gt;Any update on the data length problem? thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/223766?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 07:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa00176f-3fe4-42c6-be58-6f93a96b6d5b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I will update the ticket when I have more details. Hopefully, it&amp;#39;s an easy fix.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/223640?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 14:20:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd6a353-7b4b-49ff-b625-7030f8327f3c</guid><dc:creator>Imen</dc:creator><description>&lt;p&gt;Thank you for confirming the problem, I will be very happy to know when it is resolved, thank you&lt;/p&gt;
&lt;p&gt;Imen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/223634?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 14:12:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53ce4a6e-38ec-42f9-a4b6-40deb2d219ae</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Sorry, I thought v.0.11.4 was the latest, and I wasn&amp;#39;t sure how you were able to use API v5 with that release.&amp;nbsp;What I see now after updating to 0.14 is that the&amp;nbsp;packet length gets correctly updated when receiving the request from the peer device, but the parameters reported&amp;nbsp;to on_gap_evt_data_length_update() were still invalid like they were in your case.&lt;/p&gt;
&lt;p&gt;I used the heart rate collector script for my test and only added &lt;span&gt;on_gap_evt_data_length_update() function so I could log the DL parameters.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="python"&gt;
    def on_gap_evt_data_length_update(
        self, ble_driver, conn_handle, data_length_params
    ):
        print(&amp;quot;Max rx octets: {}&amp;quot;.format(data_length_params.max_rx_octets))
        print(&amp;quot;Max tx octets: {}&amp;quot;.format(data_length_params.max_tx_octets))
        print(&amp;quot;Max rx time: {}&amp;quot;.format(data_length_params.max_rx_time_us))
        print(&amp;quot;Max tx time: {}&amp;quot;.format(data_length_params.max_tx_time_us))&lt;/pre&gt;&lt;/span&gt;&lt;span&gt;Result&amp;nbsp;from one of the tests I di:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Max rx octets: 400&lt;br /&gt;Max tx octets: 151&amp;nbsp;&lt;br /&gt;Max rx time: 0&lt;br /&gt;Max tx time: 0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And the corresponding result&amp;nbsp;from&amp;nbsp;&amp;nbsp;the&amp;nbsp;ble_app_hrs peripheral SDK example running on the other side:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 151 on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 151&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 151&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_time: 1320&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_time: 1320&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have not been able to figure out why the event parameters are not correctly forwarded from the Softdevice, but it looks like it might be a bug in the driver implementation. I have reported this as a bug internally.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Data Length Update Procedure" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v5.0.0/group___b_l_e___g_a_p___d_a_t_a___l_e_n_g_t_h___u_p_d_a_t_e___p_r_o_c_e_d_u_r_e___m_s_c.html?cp=4_5_2_5_2_1_3_6"&gt;Data Length Update Procedure&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/223346?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 13:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74d55f96-0555-426b-a9ad-e4e0e0ef2720</guid><dc:creator>Imen</dc:creator><description>&lt;p&gt;I am testing with SD API v5, I thought that it could work with a more recent release. I added the event in the library and the peripheral I am using logs the new values but the central returns random corrupted data everytime as you can see above&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/223339?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 13:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b94a33ce-b91a-4ea4-94a5-4f5699a3934b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Imen,&lt;/p&gt;
&lt;p&gt;I tried installing the latest 0.11.4 release to replicate this, but it appears to only support SD API v3 for the 52 series. Are you testing with a different branch?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data length update with pc-ble-driver-py library</title><link>https://devzone.nordicsemi.com/thread/223250?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 09:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a89dc74-831c-46ab-996f-436c2759a772</guid><dc:creator>Imen</dc:creator><description>&lt;p&gt;More details about trying to get data_length_update to work&lt;/p&gt;
&lt;p&gt;Peripheral flashed on a nrf52832 with &amp;nbsp;nRF5_SDK_15.3.0 ble_app_multirole_lesc exemple.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I do a ble_gap_data_length_update() with all parameters set to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/55036/data-length-update-with-pc-ble-driver-py-library/group___b_l_e___g_a_p___d_e_f_i_n_e_s.html#gacb2c93761f970580b158e25192802474"&gt;BLE_GAP_DATA_LENGTH_AUTO&lt;/a&gt; &amp;ldquo;0&amp;rdquo;&amp;nbsp; (or any other value), none error is returned and I get the right event on_gap_evt_data_length but with strange values that &amp;nbsp;change after each try for on the pc-ble-driver-py:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exemple with all parameter set to 0 (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/55036/data-length-update-with-pc-ble-driver-py-library/group___b_l_e___g_a_p___d_e_f_i_n_e_s.html#gacb2c93761f970580b158e25192802474"&gt;BLE_GAP_DATA_LENGTH_AUTO&lt;/a&gt;):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Result on the pc-ble-driver-py (nrf52832)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max tx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx octets = 483 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max tx times us = 256 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx time us = 0 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Result on the JLink viewer connected to the peripheral nrf52832 with ble_app_multirole_lesc, I have the right parameters:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLE_GAP_EVT_DATA_LENGTH_UPDATE: Data length update to 27 on connection 0x1&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max tx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;Max rx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;Max tx times us = 2120 (ok)&lt;/li&gt;
&lt;li&gt;Max rx time us = 2120 (ok)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I get the parameters with following lines:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; print(&amp;quot;data_length_params max_tx_octets = &amp;quot; + str(data_length_params.max_tx_octets))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(&amp;quot;data_length_params max_rx_octets = &amp;quot; + str(data_length_params.max_rx_octets))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(&amp;quot;data_length_params max_tx_time_us = &amp;quot; + str (data_length_params.max_tx_time_us))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(&amp;quot;data_length_params max_rx_time_us = &amp;quot; + str (data_length_params.max_rx_time_us))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Other exemples call ble_gap_data_length_update() with BLEGapDataLengthParams(max_tx_octets=100, max_rx_octets=100, max_tx_time_us=0, max_rx_time_us=0):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On the Central with pc-ble-driver:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max tx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx octets = 1000 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max tx times us = 256 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx time us = 0 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Other try:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max tx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx octets = 20850 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max tx times us = 0 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx time us = 29184 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Other try:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Max tx octets = 14363&lt;/strong&gt; (&lt;strong&gt;(??)&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx octets = 192 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max tx times us = 0 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Max rx time us = 0 (??)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With the JLink viewer connected to the peripheral nrf52832 with ble_app_multirole_lesc I have the good parameters:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLE_GAP_EVT_DATA_LENGTH_UPDATE: Data length update to 27 on connection 0x1&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max tx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;Max rx octets = 27 (ok)&lt;/li&gt;
&lt;li&gt;Max tx times us = 912 (ok)&lt;/li&gt;
&lt;li&gt;Max rx time us = 912 (ok)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;Do you have any idea what makes the event get me different values everytime with the same config asked? I believe the problem comes form pc-driver-ble-py knowing that the peripheral gets the right values&lt;/p&gt;
&lt;p&gt;Thanks, Imen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>