<?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>Not receiving the complete advertisement</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80265/not-receiving-the-complete-advertisement</link><description>I have a project where I use the nrf9160dk as a gateway between a BLE sensor and LTE. 
 The hci_lpuart sample is flashed tonrf9160dk_nrf52840 and the nrf9160dk_nrf9160_ns has code for scanning for advertisements and receiving the advertisement data. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Oct 2021 11:04:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80265/not-receiving-the-complete-advertisement" /><item><title>RE: Not receiving the complete advertisement</title><link>https://devzone.nordicsemi.com/thread/332299?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 11:04:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0b4f226-6644-4a52-ab42-059f6a48098e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;strcpy() copies a null-terminated string (c string) up until the terminating NULL character (0x00). Since you have a null byte (0x00) on byte 21 of your BLE data, it is expected that the portion copied by strcpy() is &amp;quot;02010617FFDE08FFFFFFFFFFFFFFFFFFFFDA6F0100&amp;quot;.&lt;/p&gt;
&lt;p&gt;For getting the full package, you can use memcpy:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;memcpy(advertisement, advbuf.data, advbuf.len);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>