<?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 data is sent</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94310/how-data-is-sent</link><description>As far as I can see, when sending data via Bluetooth, the data is first stored in the buffer and then sent out together when the buffer is full. Is this the right idea? But now I want to implement real-time data transfer, is it possible to not use this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Dec 2022 08:26:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94310/how-data-is-sent" /><item><title>RE: How data is sent</title><link>https://devzone.nordicsemi.com/thread/398696?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2022 08:26:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93989386-0c8b-43f3-a1ee-be3ec232c650</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
[quote user="ell_pass"]The connection interval is 7.5ms, but the delay that I observed is more than 80ms.[/quote]
&lt;p&gt;If you experience such a large delay then either you must have a very poor link, or there is something in the application that is holding up the processing and forwarding of data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you made sure that both the links have a connection interval of 7.5ms?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is the relaying device the central for one of the links and the peripheral of the other?&amp;nbsp;&lt;/p&gt;
[quote user="ell_pass"]I want to be able to send 1056 bits of data in 4ms.[/quote]
&lt;p&gt;That would be 132 bytes, which fits in one packet, but sending it in 4ms can not be guaranteed when you have a connection interval of 7.5ms. Still, a delay of 80ms points to something else being the issue rather than just the connection interval.&amp;nbsp;&lt;/p&gt;
[quote user="ell_pass"]If I cannot modify the rules for sending data at the software level, can I modify the protocol at the link layer? Does your company have an interface that can be provided for us to modify the link layer protocol?[/quote]
&lt;p&gt;There is an open source controller in Zephyr which can be modified at will, but if you do that you will no longer be Bluetooth compliant.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If being Bluetooth compliant is not a requirement I would recommend doing something proprietary instead. Then you can get around a lot of the complexities of the Bluetooth implementation, and implement a smaller and more application specific protocol.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How data is sent</title><link>https://devzone.nordicsemi.com/thread/398426?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 00:55:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ff6918-b50f-41d6-b2fe-db68054948d5</guid><dc:creator>ell_pass</dc:creator><description>[quote userid="2116" url="~/f/nordic-q-a/94310/how-data-is-sent/398257"]How big is your connection interval, and how long is the delay that you observe?[/quote]
&lt;p&gt;The connection interval is 7.5ms, but the delay that I observed is more than 80ms.&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/94310/how-data-is-sent/398257"]It is impossible to forward the data without any delay, the question is how much delay you can accept?&amp;nbsp;[/quote]
&lt;p&gt;I want to be able to send 1056 bits of data in 4ms.&lt;/p&gt;
&lt;p&gt;If I cannot modify the rules for sending data at the software level, can I modify the protocol at the link layer? Does your company have an interface that can be provided for us to modify the link layer protocol?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How data is sent</title><link>https://devzone.nordicsemi.com/thread/398257?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 09:02:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:925bc954-a28e-4ee3-a697-20cfccaaecbd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
[quote user="ell_pass"]Now there is a piece of DK that needs to receive data and forward the received data at the same time, and I want to make the transmission as real-time as possible.&amp;nbsp;But in reality, what is observed with sniffer is that there is a long delay after a period of normal data forwarding.&amp;nbsp;[/quote]
&lt;p&gt;How big is your connection interval, and how long is the delay that you observe?&lt;/p&gt;
[quote user="ell_pass"]I&amp;#39;m wondering if it&amp;#39;s because a DK has only one antenna and can&amp;#39;t send and receive data at the same time?&amp;nbsp;[/quote]
&lt;p&gt;It is true that the nRF radio can not send and receive at the same time, it will switch rapidly between TX and RX under normal operation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Architecturally you can&amp;#39;t do anything with an incoming packet until you have received the full packet into RAM, checked if the CRC is OK, and then triggered the corresponding event that signals to the CPU that a new packet is ready. Then you can make the decision what to do with the packet, such as forwarding it to someone else.&amp;nbsp;&lt;/p&gt;
[quote user="ell_pass"]Is there something that can be done at the software level to enable real-time forwarding of data?[/quote]
&lt;p&gt;It is impossible to forward the data without any delay, the question is how much delay you can accept?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In other words, what is your definition of &amp;#39;real time&amp;#39;? &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Is using Bluetooth a requirement, or would using a proprietary protocol also be an option?&lt;br /&gt;Then you have more flexibility regarding packet timing, but since you are not following a standard anymore you are limited to using Nordic devices only in your network.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How data is sent</title><link>https://devzone.nordicsemi.com/thread/398165?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 15:19:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d58579e-b93a-4ec7-9c0a-77efdc29be86</guid><dc:creator>ell_pass</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now there is a piece of DK that needs to receive data and forward the received data at the same time, and I want to make the transmission as real-time as possible.&amp;nbsp;But in reality, what is observed with sniffer is that there is a long delay after a period of normal data forwarding.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m wondering if it&amp;#39;s because a DK has only one antenna and can&amp;#39;t send and receive data at the same time?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there something that can be done at the software level to enable real-time forwarding of data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How data is sent</title><link>https://devzone.nordicsemi.com/thread/398093?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 12:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce3d63c-c6ce-48a5-a67c-9f6d3f92cf5b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
[quote user=""]the data is first stored in the buffer and then sent out together when the buffer is full. Is this the right idea?[/quote]
&lt;p&gt;Not quite, the data will be sent as soon as possible, which normally means on the next connection event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In a Bluetooth LE connection it is always the central that starts communication, by sending a packet at a fixed rate set by the connection interval.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the peripheral has data in the buffers when the packet from the central arrives, it will then include the first packet in the buffer when it responds to the central.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the peripheral has multiple packets in the buffer it will set a bit in the packet header telling the central that is has more data to send. In this case the central and peripheral can exchange multiple packets back to back without having to wait for the next connection event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In other words the peripheral to central latency is mainly determined by the connection interval, and you should scale the connection interval according to your application requirements.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The minimum connection interval supported by the specification is 7.5ms, while the maximum is 4 seconds, and it is worth mentioning that it is the central that has final say regarding which connection interval to use (many mobile phones for instance will not allow you to go as low as 7.5ms).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>