<?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>how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions</link><description>hello Nordic 
 i am working with nrf52832 and nrf52840 socs, with ncs v2.1.0 
 i would like to know how many of the BLE packets i am sending has to be resent (and if it is possible to know the reason of resent, in case there is another reason beside packet</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Aug 2023 08:40:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions" /><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/439440?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2023 08:40:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3363d27-2f96-44db-8566-9523f312e30d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ziv123"](or is it something that suppose to help the central pick specific channels for the hopping map&amp;nbsp;? )[/quote]
&lt;p&gt;Correct. E.g. if you see that retransmits happening on only certain channels, or that the channel energy is very high on certain channels, the central can use that that information, and call&amp;nbsp;bt_le_set_chan_map() to set a channel map to avoid those channels.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/439419?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2023 07:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4afb1496-3097-4b47-ac86-dedfecbf7cd6</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;Hi Sigurd&lt;/p&gt;
&lt;p&gt;i&amp;#39;ll close this topic after this&amp;nbsp;last question&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f64f.svg" title="Pray"&gt;&amp;#x1f64f;&lt;/span&gt;&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/439317"]I don&amp;#39;t understand&amp;nbsp;this question.[/quote]
&lt;p&gt;what i am asking is what can i learn from the information about the channel number (which probably change every few connection events or something like that) in the connection event report ?&lt;/p&gt;
&lt;p&gt;(that is when i look at a complete connection session that is composed from many connection events)&amp;nbsp;&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/439317"]We have recently added a new feature on the main branch.&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/main/softdevice_controller/CHANGELOG.rst#id317"&gt;https://github.com/nrfconnect/sdk-nrfxlib/blob/main/softdevice_controller/CHANGELOG.rst#id317&lt;/a&gt;&amp;nbsp;that gives you&amp;nbsp;channel_energy.[/quote]
&lt;p&gt;same question as for what i can learn about the environment, interference, etc. where my central and peripheral are set from channel&amp;nbsp;energy?&lt;/p&gt;
&lt;p&gt;(or is it something that suppose to help the central pick specific channels for the hopping map&amp;nbsp;? )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/439317?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2023 14:31:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:474cbdd4-daec-4e0d-97b0-68b25245a49c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi Ziv,&lt;/p&gt;
[quote user="ziv123"]I am enabling the connection event report and it works ok.[/quote]
&lt;p&gt;Great!&lt;/p&gt;
[quote user="ziv123"]1. What added values can i get from the channel index if I look at the complete time of connection between central and peripheral ?&amp;nbsp;[/quote]
&lt;p&gt;I don&amp;#39;t understand&amp;nbsp;this question.&lt;/p&gt;
[quote user="ziv123"]2. Is there some other info I can get from the softdevice that can give insight / statistics on the BLE connection health, noise, density etc. ? (i am also reading&amp;nbsp;RSSI on peripheral side and central side)[/quote]
&lt;p&gt;We have recently added a new feature on the main branch.&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/main/softdevice_controller/CHANGELOG.rst#id317"&gt;https://github.com/nrfconnect/sdk-nrfxlib/blob/main/softdevice_controller/CHANGELOG.rst#id317&lt;/a&gt;&amp;nbsp;that gives you&amp;nbsp;channel_energy.&lt;/p&gt;
&lt;p&gt;&amp;quot;Experimental support for the Quality of Service (QoS) channel survey. See the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/main/softdevice_controller/CHANGELOG.rst#id1"&gt;&lt;span&gt;:c:func:`sdc_hci_cmd_vs_qos_channel_survey_enable`&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;function.&amp;quot;&lt;/p&gt;
[quote user="ziv123"]&lt;p&gt;&lt;span style="font-weight:400;"&gt;3. i am using the same function as in the ncs example [&amp;nbsp;enable_qos_conn_evt_report() ] to enable the callback on the connection events&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;does it matter if i call it once in my application comm&amp;#39;s init function, without disabling it (ever) ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;can i enable and disable it while a connection is already active between central and peripheral ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;how can i disable the callback ?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I don&amp;#39;t think there is any limitations here. You disable it in the same way as you enabled, but instead of&amp;nbsp;cmd_enable-&amp;gt;enable = true; , you set&amp;nbsp;cmd_enable-&amp;gt;enable = false;&lt;/p&gt;
&lt;p&gt;PS: I believe the original question in this case, &amp;quot;how can i get the number BLE TX re transmissions&amp;quot;, has been answered. If you have new questions or issues, please open a new case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/439051?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2023 13:46:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50d8351d-18d7-44ed-845e-d058e45ee226</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Sigurd&lt;/p&gt;
&lt;p&gt;it has been a while since i touched this issue. i am back on it now.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I am enabling the connection event report and it works ok.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;1. What added values can i get from the channel index if I look at the complete time of connection between central and peripheral ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;2. Is there some other info I can get from the softdevice that can give insight / statistics on the BLE connection health, noise, density etc. ? (i am also reading&amp;nbsp;RSSI on peripheral side and central side)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;3. i am using the same function as in the ncs example [&amp;nbsp;enable_qos_conn_evt_report() ] to enable the callback on the connection events&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;does it matter if i call it once in my application comm&amp;#39;s init function, without disabling it (ever) ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;can i enable and disable it while a connection is already active between central and peripheral ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;how can i disable the callback ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;hope to read you soon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Ziv&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/424049?ContentTypeID=1</link><pubDate>Fri, 05 May 2023 14:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c917458-adfb-4415-bb00-9fee54b0ee98</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ziv123"]1. is there some example or place to look for how to enable it after a connection was establish and disable before a connection is terminated ?[/quote]
&lt;p&gt;Just call the enable/disable function in the connected/disconnected callback you get when a device connects/disconnects.&lt;/p&gt;
[quote user="ziv123"]&lt;p&gt;2. i got values when analysing my data transfer connection via different Rssi values while Node is also scanning for another device that is in it&amp;#39;s white list.&amp;nbsp;i am trying to understand what can i understand by the type of fails i get.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;when having more then one device in the Node white list with rssi ~40 :&amp;nbsp;i&amp;nbsp;get around 8300 timeouts and ~330 naks but only ~12 crc fails. total connection events count ~11330&lt;/p&gt;
&lt;p&gt;when i have one device in the white list with same rssi, i get around 200 timeouts, ~350 naks and ~8crc. total connection events count ~ 5660&lt;/p&gt;
&lt;p&gt;with more then one device in Node white list but with rssi ~70 : ~8800 timeouts, ~560 naks (in compare to ~330), ~200 crc (in compare to ~12). total ~11820&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i guess crc fail is caused by some bit miss but then what may be the reason to receive naks ?&lt;/p&gt;
&lt;p&gt;also what can i learn on the connection if i get so many timeouts on one state and much less on another state (rssi on both tests was the same), and what is the different causes for timeouts&amp;nbsp;that explains the different values in comparison to the other two reasons ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in all cases total data size transmitted is the same.so also when trying to calculate how many re transmission and how many total connection events it seems that there is no &amp;quot;gold&amp;quot; number of connection events to transfer a known size of data it v&lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;span&gt;ries a lot from case to case. is there something to learn from looking on how many re&amp;nbsp; transmissions and total connection events count ?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;If you are getting&amp;nbsp;&lt;span&gt;rx_timeout, then the central did not send a packet when it was expected. I&amp;#39;m not sure what you mean by node white list, but if the central device is connected to other devices,&amp;nbsp;then it&amp;#39;s maybe skipping connection events, and then the reason for the timeout have to do with&amp;nbsp;scheduling. You can read about how the SDC handles scheduling here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrfxlib/softdevice_controller/doc/scheduling.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrfxlib/softdevice_controller/doc/scheduling.html&lt;/a&gt;&amp;nbsp;, you could e.g try to change connection interval and see how that affects the behavior. Also a sniffer log can be useful&amp;nbsp;here, maybe it&amp;#39;s skipping every x connection events. For&amp;nbsp;&lt;/span&gt;&lt;span&gt;nak_count, then&amp;nbsp;the other device did not get your packet last connection event, and a packet needed to be retransmitted.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/423503?ContentTypeID=1</link><pubDate>Wed, 03 May 2023 11:03:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eb3ad79-556e-41de-bec1-182c80715d73</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks,&amp;nbsp;for the patient and help&amp;nbsp;:) few more questions&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/423039"]Yes, you can enable/disable this reporting as needed.[/quote]
&lt;p&gt;1. is there some example or place to look for how to enable it after a connection was establish and disable before a connection is terminated ?&lt;/p&gt;
&lt;p&gt;2. i got values when analysing my data transfer connection via different Rssi values while Node is also scanning for another device that is in it&amp;#39;s white list.&amp;nbsp;i am trying to understand what can i understand by the type of fails i get.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;when having more then one device in the Node white list with rssi ~40 :&amp;nbsp;i&amp;nbsp;get around 8300 timeouts and ~330 naks but only ~12 crc fails. total connection events count ~11330&lt;/p&gt;
&lt;p&gt;when i have one device in the white list with same rssi, i get around 200 timeouts, ~350 naks and ~8crc. total connection events count ~ 5660&lt;/p&gt;
&lt;p&gt;with more then one device in Node white list but with rssi ~70 : ~8800 timeouts, ~560 naks (in compare to ~330), ~200 crc (in compare to ~12). total ~11820&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i guess crc fail is caused by some bit miss but then what may be the reason to receive naks ?&lt;/p&gt;
&lt;p&gt;also what can i learn on the connection if i get so many timeouts on one state and much less on another state (rssi on both tests was the same), and what is the different causes for timeouts&amp;nbsp;that explains the different values in comparison to the other two reasons ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in all cases total data size transmitted is the same.so also when trying to calculate how many re transmission and how many total connection events it seems that there is no &amp;quot;gold&amp;quot; number of connection events to transfer a known size of data it v&lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;span&gt;ries a lot from case to case. is there something to learn from looking on how many re&amp;nbsp; transmissions and total connection events count ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/423039?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2023 15:21:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f45c0f16-f5dd-4e2c-99a6-ae5babcf9b49</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ziv123"]what can cause the diff ?&amp;nbsp;[/quote]
&lt;p&gt;Based on my testing, if the SDC e.g. dropped a connection event, i.e. it was blocked for some reason(see link below), you will not get the callback. But the connection event counter is still incremented internally. And next time you get the callback, it will show you the updated counter value that matches the current connection event number.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/doc/scheduling.html#timing-activities-and-priorities"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/doc/scheduling.html#timing-activities-and-priorities&lt;/a&gt;&lt;/p&gt;
[quote user="ziv123"]another question i have - is it possible to have the report start at some point after the connection between end point and node was established and not from the first moment of connection ?[/quote]
&lt;p&gt;Yes, you can enable/disable this reporting as needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/421262?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2023 12:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb121117-7569-400d-b14f-88182082039f</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;e_counter&amp;nbsp; vs&amp;nbsp; evt-&amp;gt;event_counter&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;volatile uint32_t e_counter = 0;
static bool       on_vs_evt(struct net_buf_simple *buf)
{
    uint8_t                                      code;
    sdc_hci_subevent_vs_qos_conn_event_report_t *evt;
    e_counter++;
    code = net_buf_simple_pull_u8(buf);
    if (code != SDC_HCI_SUBEVENT_VS_QOS_CONN_EVENT_REPORT)
    {
        return false;
    }

    evt = (void *)buf-&amp;gt;data;
    con_event_info.nak_count += evt-&amp;gt;nak_count;
    con_event_info.crc_err_count += evt-&amp;gt;crc_error_count;
    con_event_info.timeout_disconnection_count += evt-&amp;gt;rx_timeout;

    con_event_info.con_event_count = evt-&amp;gt;event_counter;

    return true;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;this are the printed values,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/// print values on disconnection:
static void disconnect(struct k_work *work)
{
    LOG_INF(&amp;quot;event log: naks %d, crc %d, timeouts %d, events %d&amp;quot;, con_event_info.nak_count, con_event_info.crc_err_count,
            con_event_info.timeout_disconnection_count, con_event_info.con_event_count);
    con_event_info.nak_count = 0;
    con_event_info.crc_err_count = 0;
    con_event_info.timeout_disconnection_count = 0;
    con_event_info.con_event_count = 0;

    comm_mng_disconnect_ble_blocking();
}

//// output
counter 9032 event log: naks 62, crc 9, timeouts 23, events 4423&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;what can cause the diff ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;another question i have - is it possible to have the report start at some point after the connection between end point and node was established and not from the first moment of connection ? (i ask that in order to get better resolution of number of connection event and re transmissions at the stage of big data transfer which is not always start right&amp;nbsp;at the start of the connection)&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/420841?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 15:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ba2a98d-56f3-4e53-818f-75549115b5cc</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ziv123"]i am trying to understand the diff between the values&amp;nbsp;[/quote]
&lt;p&gt;&lt;br /&gt;What values do you mean now?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;evt-&amp;gt;event_counter&amp;nbsp; ,&amp;nbsp; con_event_info.con_event_count , e_counter ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/420839?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 15:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:519261b2-93fc-4b4b-8f55-a8e24a265a77</guid><dc:creator>ziv123</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/420832"]You don&amp;#39;t need to do any increment for the&amp;nbsp;event_counter yourself. The event will give you the&amp;nbsp;event_counter directly.[/quote]
&lt;p&gt;i am trying to understand the diff between the values&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if the event_counter is increment by 1 each time the callback is called the 2 values (mt counter and the event_counter) should have been equal ???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/420832?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 14:48:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e498bb5-10cb-4981-8ac4-8d74da976e8e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1)&lt;/p&gt;
[quote user="ziv123"]1. however, i added a counter to each callback, which as for i understand is called ofr each connection event, but the count set at&amp;nbsp;14371 but the &amp;#39;&lt;span&gt;evt&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;event_counter&amp;#39; gives 2937412, so what does it count and what each entry to the callback represents ?&lt;/span&gt;[/quote]
&lt;p&gt;You don&amp;#39;t need to do any increment for the&amp;nbsp;event_counter yourself. The event will give you the&amp;nbsp;event_counter directly.&lt;/p&gt;
&lt;p&gt;2) Will be covered here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/98768/reduce-ram-and-flash-take-by-softdevice-controller"&gt;reduce RAM and flash take by softdevice controller&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/420262?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 13:07:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d8b61e1-12fe-434f-b5d0-971f7265d93d</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;ok the problem i mentioned here is solve&lt;/p&gt;
&lt;p&gt;needed to increase config &amp;#39;&lt;span&gt;CONFIG_NUM_PREEMPT_PRIORITIES&amp;#39;&amp;nbsp; from =10 to&amp;nbsp;&lt;/span&gt;&lt;span&gt;=15&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;cause it ASSERTED here on the thread creation&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;void hci_ecdh_init(void)
{
#if !defined(CONFIG_BT_CTLR_ECDH_IN_MPSL_WORK)
	k_poll_signal_init(&amp;amp;ecdh_signal);

	k_thread_create(&amp;amp;ecdh_thread_data, ecdh_thread_stack,
			K_KERNEL_STACK_SIZEOF(ecdh_thread_stack), ecdh_thread,
			NULL, NULL, NULL, K_PRIO_PREEMPT(10), 0, K_NO_WAIT);
	k_thread_name_set(&amp;amp;ecdh_thread_data, &amp;quot;BT CTLR ECDH&amp;quot;);
#else&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;with the mentioned error&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERTION FAIL [((((prio)) == 10 &amp;amp;&amp;amp; z_is_idle_thread_entry((entry))) || (((10 - 1) &amp;gt;= ((-5))) &amp;amp;&amp;amp; ((prio)) &amp;gt;= ((-5)) &amp;amp;&amp;amp; ((prio)) &amp;lt;= (10 - 1)))] @ WEST_TOPDIR/zephyr/kernel/thread.c:536
00&amp;gt; 
00&amp;gt;   invalid priority (10); allowed range: 9 to -5&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;1. however, i added a counter to each callback, which as for i understand is called ofr each connection event, but the count set at&amp;nbsp;14371 but the &amp;#39;&lt;span&gt;evt&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;event_counter&amp;#39; gives 2937412, so what does it count and what each entry to the callback represents ?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;this is my callback, a small modification from the llpm sample&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static bool on_vs_evt(struct net_buf_simple *buf)
{
    uint8_t                                      code;
    sdc_hci_subevent_vs_qos_conn_event_report_t *evt;
    e_counter++;
    code = net_buf_simple_pull_u8(buf);
    if (code != SDC_HCI_SUBEVENT_VS_QOS_CONN_EVENT_REPORT)
    {
        return false;
    }

    evt = (void *)buf-&amp;gt;data;
    con_event_info.nak_count += evt-&amp;gt;nak_count;
    con_event_info.crc_err_count += evt-&amp;gt;crc_error_count;
    con_event_info.timeout_disconnection_count += evt-&amp;gt;rx_timeout;

    con_event_info.con_event_count += evt-&amp;gt;event_counter;

    return true;
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;2. moving to softdevice controller increased ram take by 5% and also flash take, is there a way to configure for use only feature or something to decrease the memory take ?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;hope to read you soon&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;best regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;ziv&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/420167?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 10:03:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd6a9e27-2da0-431f-8b11-952368dee6d0</guid><dc:creator>ziv123</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/419584"]I don&amp;#39;t see why, Both the&amp;nbsp;SoftDevice Controller and the Zephyr Controller, uses the Zephyr Bluetooth Host, and the Zephyr Bluetooth Host API can be used by both controllers.[/quote]
&lt;p&gt;if i change to =n (only that change) then i get:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERTION FAIL [((((prio)) == 10 &amp;amp;&amp;amp; z_is_idle_thread_entry((entry))) || (((10 - 1) &amp;gt;= ((-5))) &amp;amp;&amp;amp; ((prio)) &amp;gt;= ((-5)) &amp;amp;&amp;amp; ((prio)) &amp;lt;= (10 - 1)))] @ WEST_TOPDIR/zephyr/kernel/thread.c:536
00&amp;gt; 
00&amp;gt;   invalid priority (10); allowed range: 9 to -5
00&amp;gt; 
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: ***** USAGE FAULT *****
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os:   Attempt to execute undefined instruction
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: r0/a1:  0x00008001  r1/a2:  0x20022b40  r2/a3:  0x0004ae97
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: r3/a4:  0x20026c30 r12/ip:  0x00000000 r14/lr:  0x0003ed4b
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os:  xpsr:  0x61000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: fpscr:  0x00000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: r4/v1:  0x200055c8  r5/v2:  0x00000388  r6/v3:  0x00000000
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: r7/v4:  0x20022b50  r8/v5:  0x0003ca55  r9/v6:  0x0000000a
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: r10/v7: 0x00000000  r11/v8: 0x00000000    psp:  0x20022ad8
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: EXC_RETURN: 0xffffffed
00&amp;gt; [00000001] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0003ed4a
00&amp;gt; *** Booting Zephyr OS build v3.1.99-ncs1  ***
00&amp;gt; I: Reset Reason, RESETREAS=0x4
00&amp;gt; I: Reset Causes: 
00&amp;gt; I:  Software
00&amp;gt; I: GNU Build ID: 80e5e918576521287483c25ad58831d4437782b8&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in my init flow&lt;/p&gt;
&lt;p&gt;any idea why this is ?&lt;/p&gt;
&lt;p&gt;maybe it has something to do with me working with pm_static and maybe the softdevice needs to be given some defined specific place ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/419584?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 09:09:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0836698-52ef-44b6-9827-81844f6786a6</guid><dc:creator>Sigurd</dc:creator><description>[quote user="ziv123"]this much i know,&amp;nbsp; but the the whole API used on our&amp;nbsp;BLE comm module will have to change now&amp;nbsp;[/quote]
&lt;p&gt;I don&amp;#39;t see why, Both the&amp;nbsp;SoftDevice Controller and the Zephyr Controller, uses the Zephyr Bluetooth Host, and the Zephyr Bluetooth Host API can be used by both controllers.&lt;/p&gt;
[quote user="ziv123"]also i need to know if by moving to softdevice controller i am loosing some zephyr&amp;#39;s controller features ?&amp;nbsp;[/quote]
&lt;p&gt;I&amp;#39;m not aware of any features you might lose. Is there anything you have in mind ?&lt;/p&gt;
[quote user="ziv123"]and lastly is it actually preferable to move to softdevice controller from currently implemented zephyr controller assuming we are going to keep on working with nrf52832 and nrf52840 for a list few more years ? what are the pros and cons of that transition ?[/quote]
&lt;p&gt;The SoftDevice Controller is the recommended controller. It&amp;#39;s what we test and qualify.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/419577?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 08:48:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6d129ed-cb03-4094-adbd-c88d7630533e</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/419539"]Set&amp;nbsp;&lt;span&gt;CONFIG_BT_LL_SW_SPLIT=n&lt;/span&gt;[/quote]
&lt;p&gt;this much i know,&amp;nbsp; but the the whole API used on our&amp;nbsp;BLE comm module will have to change now&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and my question is is there some&amp;nbsp;API correlation doc to switch to softdevice controller from zephyr controller ?&lt;/p&gt;
&lt;p&gt;- what modules are used in softdevice that correlate and if i try to deep dive into my current zephyr controller APIs until i get to an NCS ones, could i just use them directly ? (not sure you can answer that but i am trying &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; )&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- where can i find some comparison between the 2 BLE stacks cause changing the BLE stacks may change much more things in the connection and throughput etc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;also i need to know if by moving to softdevice controller i am loosing some zephyr&amp;#39;s controller features ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and lastly is it actually preferable to move to softdevice controller from currently implemented zephyr controller assuming we are going to keep on working with nrf52832 and nrf52840 for a list few more years ? what are the pros and cons of that transition ?&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&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;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/419539?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 07:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4da4da96-9467-4700-9005-2f24355ca1b5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ziv123"]and if i understand correct then zephyr BLE LL des not support the connection event report, again, correct me if i am wrong[/quote]
&lt;p&gt;Correct. The QoS Connection Event Report is a feature of the SoftDevice/MPSL stack.&lt;/p&gt;
[quote user="ziv123"]1. is there an API to get BLE re transmissions count, while using zephyr BLE LL&amp;nbsp;[/quote]
&lt;p&gt;I&amp;#39;m not aware of any API for this for the Zephyr Controller.&lt;/p&gt;
[quote user="ziv123"]2. is there a build that enables work with both, if it is even possible to have 2 ble stacks work together,&amp;nbsp;or is ti just enabling use of nordic libraries ?[/quote]
&lt;p&gt;You can only have 1 stack enabled.&lt;/p&gt;
[quote user="ziv123"]3. if not, how complex should it be to migrate to work with the Nordic softdevice, is there some guide on the topic ?[/quote]
&lt;p&gt;Set&amp;nbsp;&lt;span&gt;CONFIG_BT_LL_SW_SPLIT=n&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="ziv123"]&amp;nbsp;is it not dependent on the other side of the BLE connection, central/peripheral&amp;#39;s ability to support that ?[/quote]
&lt;p&gt;To use the&amp;nbsp;Low Latency Packet mode, you need to use nRF52 with LLPM support on both sides of the link.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/419043?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 12:01:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5107a695-9724-49fc-b7ce-bddd28492163</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;ok, if i am correct then the issue is this config&amp;nbsp; &amp;#39; CONFIG_BT_LL_SW_SPLIT &amp;#39;&lt;/p&gt;
&lt;p&gt;which according to&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/bluetooth-arch.html#bluetooth-build-types"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/bluetooth-arch.html#bluetooth-build-types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;means i am working with the zephyr BLE stack and not with the nrf connect SDK&amp;#39;s softdevice.&lt;/p&gt;
&lt;p&gt;please correct me if i am wrong&lt;/p&gt;
&lt;p&gt;and if i understand correct then zephyr BLE LL des not support the connection event report, again, correct me if i am wrong&lt;/p&gt;
&lt;p&gt;so..&lt;/p&gt;
&lt;p&gt;1. is there an API to get BLE re transmissions count, while using zephyr BLE LL&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. is there a build that enables work with both, if it is even possible to have 2 ble stacks work together,&amp;nbsp;or is ti just enabling use of nordic libraries ?&lt;/p&gt;
&lt;p&gt;3. if not, how complex should it be to migrate to work with the Nordic softdevice, is there some guide on the topic ?&lt;/p&gt;
&lt;p&gt;p.s. regarding low latency, according to the table of &lt;span&gt;Proprietary feature support&amp;nbsp;&lt;/span&gt;in here &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/README.html#softdevice-controller"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/README.html#softdevice-controller&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;is it not dependent on the other side of the BLE connection, central/peripheral&amp;#39;s ability to support that ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/418423?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 19:37:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eb033a6-a255-4384-8f28-bded35de9345</guid><dc:creator>ziv123</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/418362"]You are seeing&amp;nbsp;on_vs_evt() beeing called, right?[/quote]
&lt;p&gt;no, i added a counter to&amp;nbsp;&amp;#39; on_vs_evt() &amp;#39; to counts how many times it is called (which should be equal to evt-&amp;gt;event_counter i guess) and it is &amp;#39;0&amp;#39; as well,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i also see that the enable function itself fails on&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int bt_hci_cmd_send_sync(uint16_t opcode, struct net_buf *buf,
			 struct net_buf **rsp)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in hci_core.c module (err -5 -&amp;gt; -EIO)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	status = cmd(buf)-&amp;gt;status;
	if (status) {
		BT_WARN(&amp;quot;opcode 0x%04x status 0x%02x&amp;quot;, opcode, status);
		net_buf_unref(buf);

		switch (status) {
		case BT_HCI_ERR_CONN_LIMIT_EXCEEDED:
			return -ECONNREFUSED;
		default:
			return -EIO;
		}
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;0&amp;gt; [00000000] &amp;lt;wrn&amp;gt; bt_hci_core: opcode 0xfd04 status 0x01
00&amp;gt; [00000000] &amp;lt;err&amp;gt; COMM_MNG: Could not send command buffer (err -5)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;haven&amp;#39;t figure out why yet&lt;/p&gt;
&lt;p&gt;when i tried to run the llpm example from my ncs (v2.1.0) with nrf52832 board, and i get different values for some reason i can&amp;#39;t understand..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-from-2023_2D00_04_2D00_03-11_2D00_33_2D00_07.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-from-2023_2D00_04_2D00_03-11_2D00_40_2D00_01.png" /&gt;&lt;/p&gt;
&lt;p&gt;in the above pic is what i see in debug mode, i get a value inserted to the function 64772, and stepping in the function i see a different value - 3075, also the &amp;#39;buf&amp;#39; values are different .. what am i missing ??&amp;nbsp;&lt;/p&gt;
&lt;p&gt;also it seems like the function &amp;#39; enable_qos_conn_evt_report &amp;#39; is called many times which is not clear to me yet, and the &amp;#39;&amp;nbsp;bt_hci_cmd_send_sync &amp;#39; is called many times in it , not clear as well ??&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/418362?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 14:15:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3fe323a-3e0f-44ae-90c2-1c6c69f132d8</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You are seeing&amp;nbsp;on_vs_evt() beeing called, right?&lt;/p&gt;
&lt;p&gt;But&amp;nbsp;evt-&amp;gt;event_counter is 0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/418253?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 09:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37ce9baf-bf95-42b9-b68d-67b165cf7161</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/418252"]&lt;p&gt;Take a look at how it&amp;#39;s done here:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;i took a look there, that&amp;#39;s what i meant by&amp;nbsp;:&lt;/p&gt;
[quote userid="90084" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/418239"]i tried to use the same function as in the example, with some minor modifications.&amp;nbsp;[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/418252?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 09:23:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdcd768f-ab18-4ad0-a222-7a4c016a9dac</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Take a look at how it&amp;#39;s done here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/628de35443dff27f6915e718c6de2afe2b9015a5/samples/bluetooth/llpm/src/main.c#L492"&gt;https://github.com/nrfconnect/sdk-nrf/blob/628de35443dff27f6915e718c6de2afe2b9015a5/samples/bluetooth/llpm/src/main.c#L492&lt;/a&gt;&lt;/p&gt;
[quote user="ziv123"](p.s. what qos and vs stands for ?)[/quote]
&lt;p&gt;qos =&amp;nbsp;&lt;em&gt;Quality of Service&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;vs =&amp;nbsp;vendor specific&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/418239?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 08:48:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c702f762-7f57-4499-b927-dd32714d4ad8</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Sigurd&lt;/p&gt;
&lt;p&gt;i tried to use the same function as in the example, with some minor modifications.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static bool on_vs_evt(struct net_buf_simple *buf)
{
    uint8_t                                      code;
    sdc_hci_subevent_vs_qos_conn_event_report_t *evt;

    code = net_buf_simple_pull_u8(buf);
    if (code != SDC_HCI_SUBEVENT_VS_QOS_CONN_EVENT_REPORT)
    {
        return false;
    }

    evt = (void *)buf-&amp;gt;data;
    con_event_info.nak_count += evt-&amp;gt;nak_count;
    con_event_info.crc_err_count += evt-&amp;gt;crc_error_count;
    con_event_info.timeout_disconnection_count += evt-&amp;gt;rx_timeout;

    con_event_info.con_event_count += evt-&amp;gt;event_counter;

    return true;
}

static int enable_qos_conn_evt_report(void)
{
    int             err;
    struct net_buf *buf;

    err = bt_hci_register_vnd_evt_cb(on_vs_evt);
    if (err)
    {
        printk(&amp;quot;Failed registering vendor specific callback (err %d)\n&amp;quot;, err);
        return err;
    }

    sdc_hci_cmd_vs_qos_conn_event_report_enable_t *cmd_enable;

    buf = bt_hci_cmd_create(SDC_HCI_OPCODE_CMD_VS_QOS_CONN_EVENT_REPORT_ENABLE, sizeof(*cmd_enable));
    if (!buf)
    {
        printk(&amp;quot;Could not allocate command buffer\n&amp;quot;);
        return -ENOMEM;
    }

    cmd_enable = net_buf_add(buf, sizeof(*cmd_enable));
    cmd_enable-&amp;gt;enable = true;

    err = bt_hci_cmd_send_sync(
        SDC_HCI_OPCODE_CMD_VS_QOS_CONN_EVENT_REPORT_ENABLE, buf, NULL);
    if (err)
    {
        printk(&amp;quot;Could not send command buffer (err %d)\n&amp;quot;, err);
        return err;
    }

    printk(&amp;quot;Connection event reports enabled\n&amp;quot;);
    return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;where should i put the &amp;#39; enable_qos_conn_evt_report() &amp;#39; call&amp;nbsp;? cause if i put it when i init the BLE here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void augu_com_start_ble(void)
{
    int rc;

    rc = STATS_INIT_AND_REG(smp_svr_stats, STATS_SIZE_32, &amp;quot;smp_svr_stats&amp;quot;);
    __ASSERT(rc == 0, &amp;quot;failed in STATS_INIT_AND_REG&amp;quot;);


    ///////////////////////
    enable_qos_conn_evt_report();
///////////////////////
#ifdef CONFIG_FILE_SYSTEM
    fs_mgmt_register_group();
    os_mgmt_register_group();
    img_mgmt_register_group();
    stat_mgmt_register_group();
#endif
    /* Enable Bluetooth. */
    rc = bt_enable(bt_ready);
    if (rc != 0)
    {
        AUGU_LOG_ERR(&amp;quot;Bluetooth init failed (err %d)&amp;quot;, rc);
        return;
    }

    bt_conn_cb_register(&amp;amp;conn_callbacks);

    /* Initialize the Bluetooth mcumgr transport. */
    smp_bt_register();

    commands_service_init();
#if defined(CONFIG_BOARD_CANARY_TYPE)
    testing_service_init();
#endif
    halo_svc_init();
    cts_init();

    if (IS_ENABLED(CONFIG_BT_SETTINGS))
    {
        settings_load();
    }

    k_sem_take(&amp;amp;bt_ready_sem, K_FOREVER);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;then i get&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:327
00&amp;gt; 
00&amp;gt;   k_sem_take failed with err -11
00&amp;gt; 
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: r0/a1:  0x00000003  r1/a2:  0x00000002  r2/a3:  0x00000001
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: r3/a4:  0x20003cd8 r12/ip:  0x0000000a r14/lr:  0x00022087
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os:  xpsr:  0x41000000
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
00&amp;gt; [00000010] [1;31m&amp;lt;err&amp;gt; os: fpscr:  0x20006518
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: r4/v1:  0x2002446c  r5/v2:  0x00000000  r6/v3:  0xfffffff5
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: r7/v4:  0x20022a10  r8/v5:  0x0000fd04  r9/v6:  0x20008250
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: r10/v7: 0x00000000  r11/v8: 0x00000000    psp:  0x200229a8
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: EXC_RETURN: 0x0
00&amp;gt; [00000010] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00022092
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: ***** HARD FAULT *****
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os:   Debug event
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x45524f43
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: r3/a4:  0x80000000 r12/ip:  0x0000000a r14/lr:  0x00054fb9
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os:  xpsr:  0x8100000b
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
00&amp;gt; [00000046] [1;31m&amp;lt;err&amp;gt; os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: fpscr:  0x200220e0
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: r4/v1:  0x20022158  r5/v2:  0x0000244d  r6/v3:  0x2000b5f4
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: r7/v4:  0x20022188  r8/v5:  0x200220f4  r9/v6:  0x00000003
00&amp;gt; [00000046] [1;31m&amp;lt;err&amp;gt; os: r10/v7: 0x00000003  r11/v8: 0x20022170    psp:  0x200229a8
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: EXC_RETURN: 0xffffffe1
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0005430c
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: Fault during interrupt handling
00&amp;gt; 
00&amp;gt; [00000046] &amp;lt;err&amp;gt; os: Current thread: 0x20006518 (main)[0m
00&amp;gt; [00000047] &amp;lt;err&amp;gt; fatal_error: Resetting system
00&amp;gt; *** Booting Zephyr OS build v3.1.99-ncs1  ***&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;if i move it to other place in the BLE init call:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void augu_com_start_ble(void)
{
    int rc;

    rc = STATS_INIT_AND_REG(smp_svr_stats, STATS_SIZE_32, &amp;quot;smp_svr_stats&amp;quot;);
    __ASSERT(rc == 0, &amp;quot;failed in STATS_INIT_AND_REG&amp;quot;);

#ifdef CONFIG_FILE_SYSTEM
    fs_mgmt_register_group();
    os_mgmt_register_group();
    img_mgmt_register_group();
    stat_mgmt_register_group();
#endif
    /* Enable Bluetooth. */
    rc = bt_enable(bt_ready);
    if (rc != 0)
    {
        AUGU_LOG_ERR(&amp;quot;Bluetooth init failed (err %d)&amp;quot;, rc);
        return;
    }

    bt_conn_cb_register(&amp;amp;conn_callbacks);

    ///////////////////////
    enable_qos_conn_evt_report();
    ///////////////////////
    /* Initialize the Bluetooth mcumgr transport. */
    smp_bt_register();

    commands_service_init();
#if defined(CONFIG_BOARD_CANARY_TYPE)
    testing_service_init();
#endif
    halo_svc_init();
    cts_init();

    if (IS_ENABLED(CONFIG_BT_SETTINGS))
    {
        settings_load();
    }

    k_sem_take(&amp;amp;bt_ready_sem, K_FOREVER);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;then i get &amp;#39;0&amp;#39; for all event report values (i know i am transferring data so there must be connection events and packet transfers).&lt;/p&gt;
&lt;p&gt;if i put the enable qos call it in the &amp;#39;connected&amp;#39; callback then again i get &amp;#39;0&amp;#39; for all values in the event report&lt;/p&gt;
&lt;p&gt;(p.s. what qos and vs stands for ?)&lt;/p&gt;
&lt;p&gt;hope to read you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/416032?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 13:45:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c042f00-8c13-4cc6-98e0-7b24eea3da7c</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="90084" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415802"]1. our connection interval is the minimum 7.5mlsec, is it enough time to get all the info summed (we also read data from external flash and build packets while transmitting) ?[/quote]
&lt;p&gt;Yeah, that shouldn&amp;#39;t be a problem.&lt;/p&gt;
[quote userid="90084" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415802"]&lt;p&gt;2. i did not understood from your question if i need to sum the&lt;/p&gt;
&lt;p&gt;(nak count + crc_fail count + rx_timeout count = re tx count) , or am i missing something ?&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Yes, you need to sum it.&lt;/p&gt;
[quote userid="90084" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415802"]3.&amp;nbsp;&amp;nbsp;if the report is per connection event then the event counter is llike a running index counting how many connection event there have been so far, meaning the last one is the total connection event happend in one connection session between 2 devices ?[/quote]
&lt;p&gt;&lt;span&gt;One report will be generated every connection event. If you add some counter in your application, that you increment each time you get this event, then yes, that would be the total amount of connection events happened in one connection session between 2 devices.(Assuming your device is only connected to 1 device.)&lt;/span&gt;&lt;/p&gt;
[quote userid="90084" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415802"]the central does have the final say but if i want the peripheral to ask for longer connection events, how can i do it ?[/quote]
&lt;p&gt;By default, we extend the connection event as long as there are packets to be sent. If there is no more data to send, the connection event is closed.&amp;nbsp;There is no option in the spec to ask the central for &amp;quot;longer connect events&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/415802?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 16:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d41c21d4-83c6-4dab-9162-9cc87b0447b2</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415770"]Yes, it&amp;#39;s per connection event(that happens every connection interval), so you need to sum it to get it the amount over time. This is the way to do it.[/quote]
&lt;p&gt;1. our connection interval is the minimum 7.5mlsec, is it enough time to get all the info summed (we also read data from external flash and build packets while transmitting) ?&lt;/p&gt;
&lt;p&gt;2. i did not understood from your question if i need to sum the&lt;/p&gt;
&lt;p&gt;(nak count + crc_fail count + rx_timeout count = re tx count) , or am i missing something ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;&amp;nbsp;if the report is per connection event then the event counter is llike a running index counting how many connection event there have been so far, meaning the last one is the total connection event happend in one connection session between 2 devices ?&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415770"]The central&amp;nbsp;has the final say in what connection interval to use.[/quote]
&lt;p&gt;the central does have the final say but if i want the peripheral to ask for longer connection events, how can i do it ?&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/97591/how-can-i-get-the-number-ble-tx-re-transmissions/415770"]I have not seen any complaints or issues with that before[/quote]
&lt;p&gt;i am not complaining :) and obviously throughput should be better, but i just wonder if there is some&amp;nbsp;data&amp;nbsp;or some ratio of packet size vs probability to have to resent it&amp;nbsp;since our devices are sometimes installed in challenging environments BLE wise&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can i get the number BLE TX re transmissions</title><link>https://devzone.nordicsemi.com/thread/415770?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 15:08:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b64f085d-978b-41f2-8605-a02365056b5b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ziv123"]&lt;p&gt;1. if i want the count of re-transmission i actually need to sum the count of naks, crc fails and rx timeouts ? is there a better way to get how many BLE packets i sent more then once ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. when referring to event counter, does it counts number of connection event with in an established connection ? and does the above counts are counted within a connection event or throughout all the time the 2 devices are connected ?&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Yes, it&amp;#39;s per connection event(that happens every connection interval), so you need to sum it to get it the amount over time. This is the way to do it.&lt;/p&gt;
[quote user="ziv123"]3. if i can get the number of connection events, is it possible for me from one side (peripheral) to dictates / ask for a longer connection event in order to have less connection intervals and so more throughput ?[/quote]
&lt;p&gt;The central&amp;nbsp;has the final say in what connection interval to use.&lt;/p&gt;
[quote user="ziv123"]4. at some point i will move to BLE 4.2 or above on the non Nordic central and then i will be able to use extended BLE packet length, sending bigger packets, might result in more packets needed to be resend cause bigger packets may have greater risk of missing some data&amp;nbsp;on transmission ?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have not seen any complaints or issues with that before. If you are sending a lot of data, that are split into many small packets, then the &lt;span style="text-decoration:underline;"&gt;total&lt;/span&gt; on-air time is reduced with a&amp;nbsp;Data Packet Length Extension, since you don&amp;#39;t have the overhead/header data for multiple packets. Also with BLE 5.0, you have 2M PHY,&amp;nbsp;so packets are sent 2x faster, that also reduces the risk of packets being affected by RF interference.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>