<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>data streaming application. reception problem in nrf connect app (android)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93637/data-streaming-application-reception-problem-in-nrf-connect-app-android</link><description>Hi, I am coding an application on nrf connect sdk 1.9.1. which requires to send some data at 25packets per second. and each packet will be ~37 bytes. On the receiver side in my particular use case, it may not be possible to update mtu size everytime So</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Nov 2022 06:23:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93637/data-streaming-application-reception-problem-in-nrf-connect-app-android" /><item><title>RE: data streaming application. reception problem in nrf connect app (android)</title><link>https://devzone.nordicsemi.com/thread/396543?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 06:23:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7b1c5aa-d3af-4532-a45d-5cfd51cd1d9e</guid><dc:creator>shiva74638</dc:creator><description>&lt;p&gt;Hi Edvin, I was able to solve the issue by directly calling the bt_nus_send()&amp;nbsp;and checking the return values instead of pushing data to&amp;nbsp;&lt;span&gt;fifo_uart_rx_data. But,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When I checked the connection intervals of mobile application and eval board, noticed that the eval board as central uart has a 7.5ms interval right after the connection and after about 5secs gets updated to 30ms. and with mobile application sometimes it settles to 37.5ms sometimes to 45ms.&amp;nbsp;&lt;br /&gt;At first it didn&amp;#39;t seem to be any big difference, and both are expected to behave the same way, but when I changed the central uart&amp;#39;s connection interval to 37.5 ms and 45ms, it started to behave the same way as the mobile application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Although I haven&amp;#39;t dealt with the connection intervals directly, just putting this observation for anyone&amp;#39;s reference.&lt;/p&gt;
&lt;p&gt;thankyou.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: data streaming application. reception problem in nrf connect app (android)</title><link>https://devzone.nordicsemi.com/thread/394717?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 13:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f023c8ba-750a-467e-b550-731fabb026c8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Make sure that you check the return value of bt_nus_send(), and print something in the log if it returns anything other than 0. A connection may fail to queue packets, but all the packets that are queued successfully should never be dropped, as that is part of the SoftDevice Controller, and the Bluetooth Low Energy stack.&lt;/p&gt;
&lt;p&gt;Therefore, all messages that are queued using bt_nus_send() and bt_nus_send() returns 0 will be sent at some point. If it returns something other than 0, it means that the packet was not successfully queued, possibly because the queue was full, meaning you need to queue it again later.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: data streaming application. reception problem in nrf connect app (android)</title><link>https://devzone.nordicsemi.com/thread/394460?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 14:07:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a78a412-9f2a-4926-9ba2-091158db67e6</guid><dc:creator>shiva74638</dc:creator><description>&lt;p&gt;Thanks for the quick reply. I also expected some message on log if any packet missing happens, but it doesn&amp;#39;t print any message like that. Memory overflow warnings are also not seen.&lt;br /&gt;Will try with shortening the connection interval.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: data streaming application. reception problem in nrf connect app (android)</title><link>https://devzone.nordicsemi.com/thread/394450?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 13:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76600dc8-5a7c-440c-b2db-34492b9986c1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Does the log at any point print: &amp;quot;Failed to send data over BLE connection&amp;quot; when you start missing packets?&lt;/p&gt;
&lt;p&gt;Your requirements seems a bit too strict to work with any BLE device without changing the MTU. Remember that it is always the BLE central that dictates the BLE connection parameters. That means that if the phone decides on a connection interval other than what you use on a DK as a central, it may behave differently.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, the application should tell you that it was not able to queue more packets, because the TX queue is full, and it should print &amp;quot;Failed to send data over BLE connection&amp;quot; in the log.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By the way, you don&amp;#39;t need to send the data through the fifo_uart_rx_data structure. You can use bt_nus_send() directly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Typically, the mobile phones will use a larger connection interval, so if you send a lot of small packets, they will not be able to keep up (this is a bit simplified, but that is what is happening). You can then either send longer packets, or try to shorten the connection interval (but I suspect the phone will not allow for it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>