<?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>better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840</link><description>Hi, 
 I am developing a project where I have NRF52840 as a device and another NRF52840 as a BLE USB dongle connected to PC. 
 I have to improve the BLE data rate between the dongle and the device. 
 Using for the Device usbd_ble_uart example and added</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Oct 2020 09:10:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840" /><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/273407?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 09:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f14ad63e-0a67-4578-b4f1-18feb108ff46</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again JK,&amp;nbsp;&lt;/p&gt;
[quote user="jawadk"]In case that the application queued a 25 bytes to send (one packet), and the softdevice send them in the first connection event, after the sending is finished, you said that in this case the first event ends, so what the application queue for sending for now on till the second connection event will be sent during the second connection event yes ?[/quote]
&lt;p&gt;This is correct, once a connection event has ended you must wait until the next connection event occurs to transfer any data.&lt;/p&gt;
[quote user="jawadk"]the first connection event ends and not returns in this case, is that what you meant ? so in this case my&amp;nbsp; latency will still be &amp;lt;= 10 ms, is that right ?[/quote]
&lt;p&gt;I am not sure what you mean when you say &amp;quot;and not returns in this case&amp;quot;, but if you mean to ask if your worst case latency for the data transfer is &amp;lt;= 10 ms with a connection interval of 10 ms, then: Yes, in this case, your latency will indeed be &amp;lt;= 10 ms.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/273386?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 08:24:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:969fdf7a-7724-4903-b450-ec51308078c2</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;Lets say that the connection interval is 10 ms.&lt;/p&gt;
&lt;p&gt;In case that the application queued a 25 bytes to send (one packet), and the softdevice send them in the first connection event, after the sending is finished, you said that in this case the first event ends, so what the application queue for sending for now on till the second connection event will be sent during the second connection event yes ?&lt;/p&gt;
&lt;p&gt;the first connection event ends and not returns in this case, is that what you meant ? so in this case my&amp;nbsp; latency will still be &amp;lt;= 10 ms, is that right ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/273369?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 07:31:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4d37bb1-df1c-4716-a390-9546acf98047</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello JK,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="jawadk"]&lt;p&gt;Lets say the I am using the maximum connection event length (500ms), maximum MTU (247), maximum data length (251) and&amp;nbsp;&lt;span&gt;connection_interval (min and max) 100ms. as your colleague&amp;nbsp;&lt;/span&gt;suggested.&lt;/p&gt;
&lt;p&gt;If I am trying to send a message in between two connection events, it will be sent immediately as a part of the current connection event? or it will be sent as a part of the next connection event ? in other words the latency will be affected or not !?&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Not quite. The SoftDevice will control the CPU for the entire duration of the connection event - so your application may not queue new data for transfer while the event is ongoing.&lt;br /&gt;However, an event may end early if there is no more data queued for sending, in which case your application will be given back the CPU.&lt;br /&gt;So, I guess the answer to your question regarding latency is: it depends on how much data you have queued in between each connection event.&lt;br /&gt;Bear in mind that the connection event length will scale to be &amp;lt; connection_interval. By setting 500 ms event length, you are basically asking to set to to the maximum value possible, for your given connection interval.&lt;br /&gt;&lt;br /&gt;The aforementioned is also the reason why you should use easyDMA and PPI for most of your peripherals - so that they may continue working / sampling / receiving / transferring while the SoftDevice controls the CPU.&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: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/273263?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 13:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04d994fc-7575-49d0-bdd0-6467e7368fc6</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you again and again for the help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Lets say the I am using the maximum connection event length (500ms), maximum MTU (247), maximum data length (251) and&amp;nbsp;&lt;span&gt;connection_interval (min and max) 100ms. as your colleague&amp;nbsp;&lt;/span&gt;suggested.&lt;/p&gt;
&lt;p&gt;If I am trying to send a message in between two connection events, it will be sent immediately as a part of the current connection event? or it will be sent as a part of the next connection event ? in other words the latency will be affected or not !?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/273157?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 09:18:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c586fe04-0dd6-47be-9697-6664ff65ffe2</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello JK,&lt;/p&gt;
[quote user="jawadk"]thank you a lot for your fine explanation.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="jawadk"]there is replies that require a peripheral work, as you explained, ad now it make sense.[/quote]
&lt;p&gt;I am happy to hear that we are on the same page now, and that I have understood you correctly - thank you for clarifying!&lt;/p&gt;
[quote user="jawadk"]&lt;p&gt;But that raises for me another question:&lt;/p&gt;
&lt;p&gt;In one second we have 1/0.0075 = 133.33 connection events, if the connection interval is 7.5 ms.&lt;/p&gt;
&lt;p&gt;and the biggest MTU is 244 bytes, then the biggest data rate can be 133.33 * 244 = 32533 Bps= 31.7 KB ps = &lt;span&gt;2&lt;/span&gt;&lt;span&gt;54.16&lt;/span&gt;&lt;span&gt;&amp;nbsp;Kbps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So how can BLE 5 reach 800 Kbps with 1Mbps PHY!?&lt;/p&gt;[/quote]
&lt;p&gt;You can change the connection event length, to transfer multiple packets per connection event.&lt;br /&gt;I recommend that you read through &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/throughput-and-long-range-demo"&gt;this blog post by my colleague&lt;/a&gt; for further detail.&lt;br /&gt;Please also have a look at the example project and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/62363/nrf52832-throughput-test-with-nordic-uart-service"&gt;the reply by my colleague Edvin in this ticket&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if anything should be unclear!&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: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/272566?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 13:27:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75d43af0-36bb-4140-a929-35c4cd688e6a</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;thank you a lot for your fine explanation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/272238#272238"] what is the possible replies that the peripheral can reply to a command? [/quote]
&lt;p&gt;there is replies that require a peripheral work, as you explained, ad now it make sense.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But that raises for me another question:&lt;/p&gt;
&lt;p&gt;In one second we have 1/0.0075 = 133.33 connection events, if the connection interval is 7.5 ms.&lt;/p&gt;
&lt;p&gt;and the biggest MTU is 244 bytes, then the biggest data rate can be 133.33 * 244 = 32533 Bps= 31.7 KB ps = &lt;span&gt;2&lt;/span&gt;&lt;span&gt;54.16&lt;/span&gt;&lt;span&gt;&amp;nbsp;Kbps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So how can BLE 5 reach 800 Kbps with 1Mbps PHY!?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Reagrds&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/272238?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2020 10:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19c7999c-1b89-4203-950f-043e0af88b1f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello JK,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="jawadk"]So the lowest connection interval will let me get the biggest BLE data rate yes ?[/quote]
&lt;p&gt;This is correct, lowest connection intervals increase throughput.&lt;/p&gt;
[quote user="jawadk"]This cant work with this application, can&amp;#39;t wait for data until it fill the biggest MTU, it&amp;#39;s a real time .application.[/quote]
&lt;p&gt;The data does not need to fill the biggest MTU size before it is sent. The MTU size just designates how big a packet maximally may be.&lt;br /&gt;A packet is sent&amp;nbsp;&lt;em&gt;every&lt;/em&gt; from and to the master each connection event ( if you are not using slave latency ). If there is no data ready when the connection event occurs, an empty packet is sent to maintain the connection. If too much data is ready, then some of it is postponed to the next connection event.&lt;/p&gt;
[quote user="jawadk"]the communication is a Master - slave communication, where the dongle sends a command to the device and waits for the reply and only when a reply received the dongle sends the next command. The device accept the command and send back a reply.[/quote]
&lt;p&gt;Understood, thank you for clarifying.&lt;/p&gt;
[quote user="jawadk"]When you say 2 connection intervals you mean that the minimum latency between sending the command and getting the reply is 2*7.5ms = 15ms ?[/quote]
&lt;p&gt;Yes, I should have said &amp;quot; 2 times the connection interval&amp;quot;, sorry for the inaccuracy. Indeed I would expect it to at worst take 2 * 7.5 ms in order to send a command, and receive a reply ( since your command needs to be processed, as I understand it ). This is the worst case scenarios - if you command is queued for sending right before an upcoming connection event, it will take 7.5 ms to send and receive a reply.&amp;nbsp;&lt;br /&gt;Please know that every packet is acknowledged in an BLE link, so if the central only needs to know that the command packet has been&amp;nbsp;&lt;em&gt;received&amp;nbsp;&lt;/em&gt;( not actively accepted by the peripheral application ), then you may know this &amp;#39;immediately&amp;#39; ( without waiting for the next connection event ).&lt;/p&gt;
[quote user="jawadk"]what is the latency of the same connection event !? 0 ms ?[/quote]
&lt;p&gt;Close, but not quite. Any type of transfer will take some time, and again, it depends on the PHY. Please take a look at the Online Power Profiler I linked earlier, to see how long time it takes to send / receive a message in a connection. The length of a connection event depends on many things, including PHY and TX / RX payload size, but I would expect it to be&amp;nbsp;in the 100&amp;#39;s of&amp;nbsp;&lt;em&gt;us&lt;/em&gt; range.&lt;/p&gt;
[quote user="jawadk"]&lt;p&gt;I mean as I mention above that the communication is master-slave, the master sends commands ad waits for the reply, the slave gets the command and send a reply.&lt;/p&gt;
&lt;p&gt;I did measure the latency time after the dongle sends the command until it got the reply back from the device, his latency range from 10 ms to 13 ms, and once every 4-5 commands the latency is something in range 50 ms - 60 ms.&lt;/p&gt;[/quote]
&lt;p&gt;Again, this depends on whether or not your&amp;nbsp;&lt;em&gt;application&lt;/em&gt; needs to accept the central&amp;#39;s command, or if it is enough for the central to know that the command was received.&lt;br /&gt;For example, what is the possible replies that the peripheral can reply to a command? Is it possible for the peripheral to reply with anything other than accepting the command?&lt;br /&gt;&lt;br /&gt;The latencies in the 10 - 13 ms range sounds fine - since it depends on when the command is queued for sending from the central.&lt;br /&gt;I would think that the latencies in the 50 - 60 ms range is caused by the application running on the peripheral side - i.e the command is received just as quickly, but not processed.&lt;br /&gt;&lt;br /&gt;Are you familiar with the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer tool&lt;/a&gt;? It would be helpful to see the 50 - 60 ms instances captured in a sniffer trace.&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: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/272097?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 14:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc6a026c-1bf9-40ce-b583-508d2c6fc0a8</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;Thank you again for your reply and help.&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]No, this is not correct. The BLE protocol is a master-slave protocol, so the master sends a packet and the slave responds with a packet, during every connection event[/quote]
&lt;p&gt;So the lowest connection interval will let me get the biggest BLE data rate yes ?&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]What do you think about this?[/quote]
&lt;p&gt;This cant work with this application, can&amp;#39;t wait for data until it fill the biggest MTU, it&amp;#39;s a real time .application.&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]&lt;p&gt;I am not sure that I have understood your application needs correctly, if I have not, please elaborate.&lt;/p&gt;
&lt;div class="quote-header"&gt;&lt;/div&gt;&lt;blockquote class="quote"&gt;&lt;div class="quote-user"&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;the communication is a Master - slave communication, where the dongle sends a command to the device and waits for the reply and only when a reply received the dongle sends the next command. The device accept the command and send back a reply.&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]I would expect it to take 2 connection intervals to get the reply from the peripheral device, if the command entails that the peripheral needs to do something that it is not already prepared for [/quote]
&lt;p&gt;When you say 2 connection intervals you mean that the minimum latency between sending the command and getting the reply is 2*7.5ms = 15ms ?&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]then it may reply within the same connection event[/quote]
&lt;p&gt;what is the latency of the same connection event !? 0 ms ?&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]I do not understand the last part of your statement, sorry. What do you mean when you say &amp;quot;and one packet every 4-5 packets took 60 ms&amp;quot;?[/quote]
&lt;p&gt;I mean as I mention above that the communication is master-slave, the master sends commands ad waits for the reply, the slave gets the command and send a reply.&lt;/p&gt;
&lt;p&gt;I did measure the latency time after the dongle sends the command until it got the reply back from the device, his latency range from 10 ms to 13 ms, and once every 4-5 commands the latency is something in range 50 ms - 60 ms.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271360#271360"]Do you mean, that you need the lowest possible latency between an issued command from the central and a message returned from the peripheral?[/quote]
&lt;p&gt;Yes, this is exactly what I mean, I need to have the lowest latency between sending a command till receiving the reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again for your help.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/271360?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2020 13:31:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c718a6b-7b3b-4d0e-80ba-98c39af60b8d</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello JK,&lt;/p&gt;
[quote user="jawadk"]Thanks for your reply.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="jawadk"]the command data size sent from the dongle to the device and the reply data size sent from the device to the dongle is not bigger than 25 bytes. (think that the default PHY is fine no?)[/quote]
&lt;p&gt;Regardless of the payload size you will reduce power consumption by using the 2 Mbps PHY since it reduces the necessary active radio time - if it is supported by both your devices then there is little reason not to switch to 2 Mbps PHY.&lt;br /&gt;But, of course, if you are content with the performance of 1 Mbps PHY then you may very well stick to using it, this is just a recommendation on my part and while the transmission time will be doubled when using 1 Mbps PHY instead of 2 Mbps, but the difference here will be very small ( a payload of 25 bytes at 1 Mbps takes 280 us, and at 2 Mbps takes 140 us ). So the difference is 140 us in transfer speed.&lt;/p&gt;
[quote user="jawadk"]I know that during the connection interval the BLE can send 6 packets yes ? that means that I can send command and get a reply 6 times ? or 3 times ?[/quote]
&lt;p&gt;No, this is not correct. The BLE protocol is a master-slave protocol, so the master sends a packet and the slave responds with a packet, during every connection event. Either side can toggle the &amp;quot;More data&amp;quot; field, which tells the other device to keep listening for additional packets from the same sender, but you may not have multiple exchanges (master-slave-master-slave-master-slave-master-slave) in a single connection interval.&lt;br /&gt;However, what you may do instead in concatenate all the 6 ( or 3 ) commands you would like to send, into 1 packet, and then parse those commands on the peripheral side when they are received. What do you think about this?&lt;br /&gt;&lt;br /&gt;I am not sure that I have understood your application needs correctly, if I have not, please elaborate.&lt;/p&gt;
[quote user="jawadk"]the MTU is already the biggest MTU ( 247), and I am using the default 1Mbps PHY, using the biggest phy isn&amp;#39;t really help in this senario right?[/quote]
&lt;p&gt;As mentioned earlier, you stand to reduce the active radio time with 140 us by switching from 1 Mbps to 2 Mbps.&lt;br /&gt;This will also reduce power consumption somewhat. If you are additionally using the shortest possible connection interval, these mere 140 us will add up quickly, for how much active radio time you are saving.&lt;br /&gt;You can check the impact of these parameters on your power consumption in our &lt;a href="https://devzone.nordicsemi.com/nordic/power/w/opp/2/online-power-profiler-for-ble"&gt;Online Power Profiler&lt;/a&gt;, I highly recommend taking a look at this tool.&lt;/p&gt;
[quote user="jawadk"]but the issue here that the central never stops sending the commands to the devices,&amp;nbsp;[/quote]
&lt;p&gt;Could it be an option to concatenate the commands, like I suggested above?&lt;br /&gt;Perhaps this could relax your constraints a bit, further reducing power consumption.&lt;/p&gt;
[quote user="jawadk"]I measured the time takes to the dongle to send command until it receives the reply from the device, this time ranges is 10-13 ms, and one packet every 4-5 packets took 60 ms.[/quote]
&lt;p&gt;I would expect it to take 2 connection intervals to get the reply from the peripheral device, if the command entails that the peripheral needs to do something that it is not already prepared for ( i.e &amp;quot;sample the SAADC&amp;quot; ).&lt;br /&gt;If you instead do something that the device is prepared for, then it may reply within the same connection event - such as if you want to read a characteristic, or receive a notification.&lt;br /&gt;&lt;br /&gt;I do not understand the last part of your statement, sorry. What do you mean when you say &amp;quot;and one packet every 4-5 packets took 60 ms&amp;quot;?&lt;/p&gt;
[quote user="jawadk"]I need to get the lowest send command and get a reply duration.[/quote]
&lt;p&gt;I do not understand this either, sorry. What do you mean by this?&lt;br /&gt;Do you mean, that you need the lowest possible latency between an issued command from the central and a message returned from the peripheral?&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&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: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/271250?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2020 08:14:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18e61f41-df5a-46ac-bbaf-714049c3a47a</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the command data size sent from the dongle to the device and the reply data size sent from the device to the dongle is not bigger than 25 bytes. (think that the default PHY is fine no?)&lt;/p&gt;
&lt;p&gt;I know that during the connection interval the BLE can send 6 packets yes ? that means that I can send command and get a reply 6 times ? or 3 times ?&lt;/p&gt;
&lt;p&gt;the MTU is already the biggest MTU ( 247), and I am using the default 1Mbps PHY, using the biggest phy isn&amp;#39;t really help in this senario right?&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/66312/better-ble-data-rate-between-two-nrf52840/271219"]On the question if this is going to work, that depends on what your peripheral devices are configured to support.[/quote]
&lt;p&gt;I am allowing only two devices to connect to the central(dongle), as I mentioned before the data packets is not big, but the issue here that the central never stops sending the commands to the devices,&amp;nbsp;&lt;br /&gt;I measured the time takes to the dongle to send command until it receives the reply from the device, this time ranges is 10-13 ms, and one packet every 4-5 packets took 60 ms.&lt;/p&gt;
&lt;p&gt;I need to get the lowest send command and get a reply duration.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: better BLE data rate between two NRF52840</title><link>https://devzone.nordicsemi.com/thread/271219?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2020 06:30:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:855f5e12-bcb5-4206-81c3-34ede19961c6</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]1.&amp;nbsp;Am I doing it right ? this will improve the BLE data rate yes ? if No what is the optimal connection interval for a better data rate!?[/quote]
&lt;p&gt;Yes, a shorter connection interval will give more frequent connection events in which data is transferred - which increases throughput. Without knowing more about how much data you will be transferring and how fast it is generated, it is impossible for me to tell you what the &lt;em&gt;optimal&lt;/em&gt; connection interval is.&lt;/p&gt;
[quote user=""]2. Is there anything else can be done to improve the BLE data rate ?[/quote]
&lt;p&gt;You should also make sure that you are using the 2 Mbps PHY to transfer your data. This lets you transfer more data in less time.&lt;br /&gt;Depending on what / how much data you are transferring in each connection event, you may also benefit from increasing the MTU size ( sending more data per transmission ).&lt;/p&gt;
[quote user=""]3. Is setting&amp;nbsp; the connection intervals to 6 ms as I mentioned above is gonna work for both of the connected devices to the dongle? how it will affect the data rate when two device is connected ?[/quote]
&lt;p&gt;Please be advised that the shortest possible connection interval is 6 in units of 1.25 ms, which translates to 7.5 ms.&lt;br /&gt;You may set the minimum connection interval to 6, but this then means 7.5 ms.&lt;br /&gt;On the question if this is going to work, that depends on what your peripheral devices are configured to support. You central will be the one to determine the connection interval, but your peripherals may only support a certain range to choose from.&lt;br /&gt;If you configure your centrals connection interval _MIN and _MAX to 7.5 ms, you force the central to choose 7.5 ms connection interval. If the connected peripheral devices then support 7.5 ms, the connection will use 7.5 ms. If they do not support 7.5 ms, the connection will be terminated.&lt;br /&gt;7.5 ms should be fine when working with 2 devices, but if you connect more devices with 7.5 ms connection interval, your central might face problems keeping up with all the peripherals.&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>