<?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>Assistance Needed with BLE Application Development on nRF5340 Development Board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112825/assistance-needed-with-ble-application-development-on-nrf5340-development-board</link><description>Hello Nordic Team, 
 I am writing because I encountered an issue while developing a BLE application on the nRF5340 development board. Currently, I have set up this callback to receive commands from the nRF Connect app: 
 
 
 
 
 
 I send 16-bit data from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Jul 2024 15:32:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112825/assistance-needed-with-ble-application-development-on-nrf5340-development-board" /><item><title>RE: Assistance Needed with BLE Application Development on nRF5340 Development Board</title><link>https://devzone.nordicsemi.com/thread/492781?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 15:32:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a57b78d-7d05-4b6b-b818-f51b48fc160e</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Cristian,&lt;/p&gt;
&lt;p&gt;You will need to take offset into account when reading the data. Could you please update the callback handler to only copy len, offset, and ~10 bytes from buf to a different location and set a flag; and then in another thread or the main loop, act upon that flag and print out the value?&lt;/p&gt;
&lt;p&gt;I would like to look at what the data is like. Printing can take time, and the handler &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/zephyr/connectivity/bluetooth/api/gatt.html"&gt;should be quick&lt;/a&gt;, thus I suggest copying the value out and print in a different context.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assistance Needed with BLE Application Development on nRF5340 Development Board</title><link>https://devzone.nordicsemi.com/thread/492777?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 15:16:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdecfc62-62a7-4c58-a894-daf255889bed</guid><dc:creator>Cristian</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;I am currently absolutely sure that the data from the nrF APP is being sent correctly, and the error is reproducible consistently. However, I need to notify you that the len and offset are not always zero. Specifically, the length is 3 and the offset is zero, but sometimes the offset changes and becomes different from zero.&lt;/p&gt;
&lt;p&gt;Cristian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assistance Needed with BLE Application Development on nRF5340 Development Board</title><link>https://devzone.nordicsemi.com/thread/492725?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 13:21:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b78e4018-454c-4985-9fa2-d7b746c2f47b</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Cristian,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Data corruption&amp;nbsp;all the way to the application layer is not something that should happen at all.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you checked if the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;len&lt;/span&gt; and &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;offset&lt;/span&gt; parameters are all 0?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, are you able to verify that the correct data is sent from the app?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you able to reproduce the issue consistently?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hieu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>