<?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>Beacon advertising packet format</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47919/beacon-advertising-packet-format</link><description>I would like to use the beacon example to send some manufacturer specific data over BLE. 
 I am using the nrf52DK , nRF5_SDK_14.2.0_17b948a and s132. 
 My question is other than the raw data to be sent and size what should I change also ? 
 In other words</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jun 2019 12:51:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47919/beacon-advertising-packet-format" /><item><title>RE: Beacon advertising packet format</title><link>https://devzone.nordicsemi.com/thread/190517?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 12:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d770b37-5fe4-45e5-b1f8-f9ea18f53410</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;nRF Connect behaves differently depending on the platform it is running on. For instance, on iOS, you will not even see the MAC address of the device, but using nRF Connect for desktop you can get a lot of information. If you need to look at the raw packets you should instead us a sniffer. You can use &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer"&gt;nRF Sniffer&lt;/a&gt; if you don&amp;#39;t have access to a professional BLE sniffer.&lt;/p&gt;
[quote user="abyr"]Question2: if I want the source address to be advertised without the type and length before it i.e I only want 6 bytes of the address after the header can I do it and how ?&amp;nbsp;[/quote]
&lt;p&gt;You can build the payload as you like, and keep it empty if needed. The rest is handled by the link layer in the SoftDevice and you cannot modify it directly. This is because the SoftDevice is designed to enforce that you send valid BLE packets. If you want to hand-write the packets, then you could just use the radio directly. It is usually not a good idea though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beacon advertising packet format</title><link>https://devzone.nordicsemi.com/thread/190483?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 11:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d8fa83b-96e2-456d-bdef-61325fc919e7</guid><dc:creator>abyr</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did so but when I check the advertised data using NRF connect I find that the packet starts from the payload. the&amp;nbsp; Preamble , access address&amp;nbsp;, header and CRC calculation are not showing in raw data.&lt;/p&gt;
&lt;p&gt;What could be the reason and how can I fix this ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Question2: if I want the source address to be advertised without the type and length before it i.e I only want 6 bytes of the address after the header can I do it and how ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beacon advertising packet format</title><link>https://devzone.nordicsemi.com/thread/190422?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 07:05:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a348269b-627d-40d4-a80e-9e3dd0096027</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The stack handles the addresses automatically, yes. The default configuration is to use the static address, but you can choose to use a private resolvable address by calling &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=3_4_1_1_2_1_2_28#ga2203b7709d7178bc35e7f903bd0e913f"&gt;sd_ble_gap_privacy_set()&lt;/a&gt;. Note that this cannot be done while advertising, so you should do this before starting to advertise. By default, the address will change every 15 minutes when using a resolvable address, but this can be changed by adjusting &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/structble__gap__privacy__params__t.html?cp=3_4_1_1_2_1_4_11"&gt;ble_gap_privacy_params_t::private_addr_cycle_s&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beacon advertising packet format</title><link>https://devzone.nordicsemi.com/thread/190303?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 13:28:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1caac9a-9b1b-45d3-ba92-da749bc6d5a2</guid><dc:creator>abyr</dc:creator><description>&lt;p&gt;I have checked the ibeacon format &lt;a href="https://www.silabs.com/community/blog.entry.html/2016/04/25/bluetooth_ble_beacon-IGMb"&gt;here&lt;/a&gt;&amp;nbsp;and I want to insert another field between the PDU header and data payload which is source address. My application should support both Static source address and private resolvable address, how can I do so is this also added automatically by the stack ? if not how can I add it it is not a manufacturer specific data&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beacon advertising packet format</title><link>https://devzone.nordicsemi.com/thread/190174?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 07:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8de2c133-7d10-4d45-82b7-960d82ab83bb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since you&amp;nbsp;just need a simple beacon with manufacturer specific data, then you should probably use the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_beacon.html?cp=5_1_4_2_2_2"&gt;Beacon Transmitter Sample Application&lt;/a&gt;. The advertising data in the example matches the iBeacon format, but you can easily replace this with your own. Most of what you need to think about is handled by the&amp;nbsp;advertising_init() in the example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;/p&gt;&lt;p&gt;My question is other than the raw data to be sent and size what should I change also ?&lt;/p&gt;&lt;p&gt;In other words, is the preambles access address, header, and CRC handled by the API or should I take care of it?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The link layer in the BLE stack (SoftDevice) will handle preamble, access address, header, and CRC automatically, so that is not something you have to think about. You just need to encode the advertising &lt;em&gt;data&lt;/em&gt;&amp;nbsp;and then provide it to the stack which does the rest. You should do that as shown in the beacon example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Populate an array with your manufacturer specific&amp;nbsp;data.&lt;/li&gt;
&lt;li&gt;Make an&amp;nbsp;ble_advdata_t and set the required fields (refer to the example), and point to your manufacturer specific data array as in the example.&lt;/li&gt;
&lt;li&gt;Build the raw advertising packet by providing this to&amp;nbsp;ble_advdata_encode()&lt;/li&gt;
&lt;li&gt;Configure the SoftDevice to use this advertising data by calling&amp;nbsp;sd_ble_gap_adv_set_configure().&lt;/li&gt;
&lt;/ol&gt;
[quote user=""]I have read the advertising tutorial, tried to inspect the code and it is still not clear, also the included driver files I do not see anything related to security which confuses me even more[/quote]
&lt;p&gt;&amp;nbsp;There is no security in a normal beacon. It just&amp;nbsp;advertises&amp;nbsp;clear-text packets that can be received by anyone. if you need security, then a beacon is probably not what you want to use. Instead, you should consider a BLE connection or similar (depending on your requirements).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>