<?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>Receive random data after connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67251/receive-random-data-after-connect</link><description>Hi, 
 I&amp;#39;m using 51822 QFAC SDK11 S130. The 51822 will receive a group of 18 bytes data from the phone. I&amp;#39;m facing a strange issue: every time after the BLE is connected, I will first receive a 18 bytes data which was not sent from the phone. This group</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Oct 2020 20:32:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67251/receive-random-data-after-connect" /><item><title>RE: Receive random data after connect</title><link>https://devzone.nordicsemi.com/thread/277248?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 20:32:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53e4c60f-a619-4232-91df-2af4e8939433</guid><dc:creator>awneil</dc:creator><description>[quote userid="17294" url="~/f/nordic-q-a/67251/receive-random-data-after-connect/277245#277245"]it shows incompatible error[/quote]
&lt;p&gt;not sure what you mean by that?&lt;/p&gt;
[quote userid="17294" url="~/f/nordic-q-a/67251/receive-random-data-after-connect/277245#277245"] I just filter out the random value, everything else is fine[/quote]
&lt;p&gt;OK - jolly good&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7103._5F00_Verify_2D00_answer_2D00_nordic_5F00_2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive random data after connect</title><link>https://devzone.nordicsemi.com/thread/277245?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 19:54:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:568c893a-ebe9-4406-a7a6-62fe982bc772</guid><dc:creator>sonnyz</dc:creator><description>&lt;p&gt;Thank you awneil! Just got time to test with your suggestion, but it shows incompatible error. Never mind, I just filter out the random value, everything else is fine.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive random data after connect</title><link>https://devzone.nordicsemi.com/thread/275377?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 13:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34cadc0b-30ac-4a42-981f-8ad7ffb2156e</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Are you sure that write is to&amp;nbsp; your Service/Characteristic ?&lt;/p&gt;
&lt;p&gt;Check&amp;nbsp;p_ble_evt-&amp;gt;evt.gatts_evt.params.write.uuid&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive random data after connect</title><link>https://devzone.nordicsemi.com/thread/275369?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 13:00:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7716eaf6-6f8a-4da1-9141-cddde30f4860</guid><dc:creator>sonnyz</dc:creator><description>&lt;p&gt;Thank you Awneil!&lt;/p&gt;
&lt;p&gt;I use this to receive data from the phone:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;case BLE_GATTS_EVT_WRITE:     //receive data from the phone
{
    uint8_t * p_data = p_ble_evt-&amp;gt;evt.gatts_evt.params.write.data;
    //printf(&amp;quot;received data: %d  %d...&amp;quot;, p_data[0], p_data[1] ....);  //18 data
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It shouldn&amp;#39;t have&amp;nbsp;&lt;span&gt;uninitialized&amp;nbsp;variables issue. From the debug, I can see that the first data packet (18 data) is always something else then what I have sent from the phone, the real data start from the 2nd packet.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive random data after connect</title><link>https://devzone.nordicsemi.com/thread/275164?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 15:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79aec286-f660-4da0-a229-c112ef9143c1</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;a href="https://www.argenox.com/library/bluetooth-low-energy/ultimate-guide-to-debugging-bluetooth-smart-ble-products/" rel="noopener noreferrer" target="_blank"&gt;https://www.argenox.com/library/bluetooth-low-energy/ultimate-guide-to-debugging-bluetooth-smart-ble-products/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How are you sending the data ?&lt;/p&gt;
&lt;p&gt;What debugging have you done to see what&amp;#39;s going on?&lt;/p&gt;
&lt;p&gt;Have you checked for uninitialised variables?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>