<?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>Grabbing on air mac address from advertising messages</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62771/grabbing-on-air-mac-address-from-advertising-messages</link><description>I am creating a device that grabs on air mac addresses from advertising channels. I know that that macs can rotate and change. Im able to pull out bytes 3:8 of the payload and get the mac from a fitbit, which has a static mac, and the message type is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Jun 2020 21:14:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62771/grabbing-on-air-mac-address-from-advertising-messages" /><item><title>RE: Grabbing on air mac address from advertising messages</title><link>https://devzone.nordicsemi.com/thread/256012?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2020 21:14:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0772330c-ed4b-4a2e-bd42-37fbc8ec23dc</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;The data format of all the BLE on-air packets are given in the Core Specification Volume 6, Part B: Link Layer Specifcation. The advertising packets are explained in section 2.3 (page 2871) with ADV_IND in 2.3.1.1. As you can see in 2.3, all advertising packets have a 16 bit header, and in an ADV_IND that is followed by a 6 B advertising address, which is again followed by the actual advertising data (which is described in Volume 3, Part C, chapter 11).&lt;/p&gt;
&lt;p&gt;Section 2.3, about advertising PDUs in general:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1592601122496v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2.3.1.1, about ADV_IND:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1592601207341v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So in short, yes, an ADV_IND will always have the advertising address in bytes 3:8.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grabbing on air mac address from advertising messages</title><link>https://devzone.nordicsemi.com/thread/255994?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2020 14:05:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95ee4dec-be2b-415b-95f4-2c9bde850f6b</guid><dc:creator>user3344</dc:creator><description>&lt;p&gt;Im doing this on bare metal (no sdk), so forgive the miscommunication.&amp;nbsp; After reading your reply, let me rephrase my initial question.&lt;/p&gt;
&lt;p&gt;Is the advertising address (rotated or not), always the first six bytes of the payload for advertising packets?&lt;/p&gt;
&lt;p&gt;Specifically, ADV_IND,ADV_DIRECT_IND, ADV_NONCONN_IND,SCAN_REQ,SCAN_RSP,CONNECT_REQ, and ADV_SCAN_IND?&lt;/p&gt;
&lt;p&gt;I seem to be able to find examples, but not a concrete definition.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grabbing on air mac address from advertising messages</title><link>https://devzone.nordicsemi.com/thread/255939?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2020 10:16:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1743ab8-39a1-4e9f-8316-aab6a1e05ac4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The advertising address (what you call mac address) is not part of the advertising packet payload, so I am not sure exactly what you mean when you say that the address will be bytes 3:8. How do you read out these?&lt;/p&gt;
&lt;p&gt;Check out the attached project, which will print out the advertising address and the payload of the advertisements.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Advertising packets are built up by sections. Each section will start with the length of the section (1 byte). The next byte is the section type, and the remaining bytes in the section is the payload. We don&amp;#39;t have any good figures, but this silabs page is quite descriptive:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/10/bluetooth_advertisin-hGsf"&gt;https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/10/bluetooth_advertisin-hGsf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is a list of all the advertising types:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/"&gt;https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-64440f573f4a403dae1b147ce2699c6a/ble_5F00_app_5F00_uart_5F00_c_5F00_scan_5F00_addr.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_c_5F00_scan_5F00_addr.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Written for SDK 16. Please note line 407 in main.c.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>