<?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>Received data doesn&amp;#39;t match data sent</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66753/received-data-doesn-t-match-data-sent</link><description>Hi, 
 I modified the LBS service to experiment sending more than a byte of data. 
 On the peripheral side, modified from ble_peripheral/ble_app_blinky 
 typedef struct { uint8_t data[8]; /* 8 bytes data */ } ble_button_t; 
 ... 
 memset(&amp;amp;add_char_params</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Oct 2020 23:14:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66753/received-data-doesn-t-match-data-sent" /><item><title>RE: Received data doesn't match data sent</title><link>https://devzone.nordicsemi.com/thread/273330?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 23:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d402de6c-cc11-44c3-bb66-ce8f7496625a</guid><dc:creator>jshen</dc:creator><description>&lt;p&gt;I found the bug in my application code.&lt;/p&gt;
&lt;p&gt;I passed address of structure in below call&lt;/p&gt;
&lt;p&gt;&lt;span&gt;err_code = ble_lbs_on_button_change(m_conn_handle, &amp;amp;m_lbs, &amp;amp;m_button_data);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and in that function the address of the pointer was passed to&amp;nbsp;params.p_data, which had caused problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now both side data matches!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please close this issue, and sorry for the trouble.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>