<?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>Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24191/optimising-for-serialisation-throughput</link><description>Hi,
we are currently testing the nRF52 DK as a reciever for several BLE devices. 
 For a fist test we implemented some datarate measuring in the: 
 PC -&amp;gt; nrf Connect -&amp;gt; Bluetooht Low Energy App 
 The device firmware version is 1.1.0 (is suppose it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Oct 2017 14:39:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24191/optimising-for-serialisation-throughput" /><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95279?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 14:39:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73fb136b-a544-4fba-bf7d-c8ef313ceb11</guid><dc:creator>Frederik</dc:creator><description>&lt;p&gt;So as shown in the other post: setting MAX_PEER_COUNT to 6 seems to work for 4 devices.&lt;/p&gt;
&lt;p&gt;Sadly nearly the same problem. Now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3 peripherals sending @ 100Hz -&amp;gt; 3x 100Hz @ UART (pc-ble-driver)&lt;/li&gt;
&lt;li&gt;4 peripherals sending @ 100Hz -&amp;gt; 4x ~75Hz @ UART (pc-ble-driver)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So there seems to be a bottleneck in the device firmware / controller.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95278?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 12:27:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5df05a24-cb57-4d57-b957-4f09d5112c1d</guid><dc:creator>Frederik</dc:creator><description>&lt;p&gt;Thanks Terje,
just tested switching to 1M - seems to work now with 3 devices - not sure why - have tested it before and driver failed to initialize...&lt;/p&gt;
&lt;p&gt;anyway now the 4 devcie connection problem is kicking in ;) Can you  have a look at it ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95276?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 12:09:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bc8bd1e-c37c-48b0-b2a6-bc6bdd0b4134</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;It came to my attention earlier this month that the version used with nRF Connect is actually using 1M baud, despite that the default in the connectivity patch for pc-ble-driver is 115k. Changing to 1M should give similar performance as for nRF Connect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95277?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 12:01:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19ef37d6-b452-4e9f-8aff-1dc4423d17cd</guid><dc:creator>Frederik</dc:creator><description>&lt;p&gt;Hey Terje,
took me some time to setup my own connectivity FW with increased baudrate.
Sadly it&amp;#39;s even worse now and I absolutely don&amp;#39;t know why.&lt;/p&gt;
&lt;p&gt;FW: SDK 12.1 with patch @ 230400 baud
SW: pc-ble-driver heartrate example - modified to measure datarate from 4 devices&lt;/p&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2 connections =&amp;gt; 2 devices @ full data rate (100Hz)&lt;/li&gt;
&lt;li&gt;3 connections =&amp;gt; 3 devices @ ~70Hz&lt;/li&gt;
&lt;li&gt;4 connections =&amp;gt; 4th devcie won&amp;#39;t even connect (see &lt;a href="https://devzone.nordicsemi.com/question/170867/pc-ble-driver-connection-request-failed-reason-4/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sadly I&amp;#39;m not sure where the problem comes from. Why does nRFConnect perfrom a bit better with the defaul *.hex? Maybe SW handshaking is one problem (overhead) - how to disable?. Another reason could be different init parameters (see other post regarding 4 devices) .&lt;/p&gt;
&lt;p&gt;Still the biggest question is: Is it even possible with the nRF52382???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95275?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2017 14:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1bc6316-554c-4ad7-ada4-d4ffa47a0d74</guid><dc:creator>Frederik</dc:creator><description>&lt;p&gt;Great to know.&lt;/p&gt;
&lt;p&gt;Seems the baud rate is set to 115200 with that patch - as per some basic calculations with HCI overhead that might be one bottleneck at ~4 devices. So I assume the 1M told by nRF Connect is jsut the PC side setup.&lt;/p&gt;
&lt;p&gt;What will SER_MAX_CONNECTIONS 8 do?&lt;/p&gt;
&lt;p&gt;Anything more to the above?&lt;/p&gt;
&lt;p&gt;thanks for the fast reply!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95274?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2017 14:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d694238-c027-4cac-ac76-5b7081f4d53c</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;nRF Connect uses &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt;, which uses a slightly modified version of nRF5_SDK_12.1.0_0d23e2a\examples\ble_central_and_peripheral\ble_connectivity\pca10040\ser_s132_hci\ as per the &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/blob/master/hex/sd_api_v3/sdk121_connectivity.patch"&gt;sdk121_connectivity.patch&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95273?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2017 14:27:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:509036f4-c602-4149-9964-10bb23b0d57b</guid><dc:creator>Frederik</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;100 HZ = 100 packets/s with 18bytes packetsize&lt;/p&gt;
&lt;p&gt;CI 30 = 37,5ms&lt;/p&gt;
&lt;p&gt;=&amp;gt; 100 packets / (1s / 37,5ms) =&amp;gt; ~ 3,76 packets/CI&lt;/p&gt;
&lt;p&gt;Total payload data per device per second = 18byte * 100/s = 1800 byte/s&lt;/p&gt;
&lt;p&gt;So with 3-4 Packets / CI can you estimate how many devices I could connect?&lt;/p&gt;
&lt;p&gt;(I will also check the link you mentioned)&lt;/p&gt;
&lt;p&gt;Currently the whole nRF52 is a backbox for me - I just see less packets at the UART in the end and know that our transmitters are sending all packets (tested with another reciever).
Thats why I assume I have to optimise the firmware somehow to recieve more than the 3,5 devices, e.g. RAM management, UART DMA transfer,... can you point in the right direction?&lt;/p&gt;
&lt;p&gt;Also can you confirm that the nrf Connect included firmware is based on
nRF5_SDK_XXX\examples\connectivity\ble_connectivity\pca10040\ser_s132_hci?&lt;/p&gt;
&lt;p&gt;regards Frederik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimising for serialisation throughput?</title><link>https://devzone.nordicsemi.com/thread/95272?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2017 07:56:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8a92a46-8e5f-4846-8067-2a3988ae30e5</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;What do you mean by 100Hz data rate? You also write connection interval of 30 (ms) and 18 bytes/packet. How many packets per connection interval?&lt;/p&gt;
&lt;p&gt;There is some overhead (due to serialization) and latency (at multiple points from the pc to the connectivity nRF) when using nRF Connect or any other pc-ble-driver based application, where you will see bottlenecks.&lt;/p&gt;
&lt;p&gt;If you have a central connected to many peripherals with the same connection interval on the connections, then the events are scheduled as shown in Figure 3 in the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fmultilink_scheduling%2Fcentral_connection_timing.html"&gt;Connection timing as a Central&lt;/a&gt; section of the SoftDevice specification. How many peripheral connections will fit depends on connection interval, packet size and number of packets per connection event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>