<?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>How does ble beacon example work?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116288/how-does-ble-beacon-example-work</link><description>Hello everyone, 
 I&amp;#39;m trying to understand the code from this example, but one thing that i can&amp;#39;t seem to process is how or where does the following structure get hte keys according to its values: 
 
 
 Specifically, when I see the beacon on my phone</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Nov 2024 15:57:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116288/how-does-ble-beacon-example-work" /><item><title>RE: How does ble beacon example work?</title><link>https://devzone.nordicsemi.com/thread/510165?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 15:57:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:502a3d4b-d3d9-4b6b-90e9-aaf2d60dde40</guid><dc:creator>julian24</dc:creator><description>&lt;p&gt;so there&amp;#39;s no information in the code of about what each parameter means, nRF Connect just decodes it in the same way for every possible beacon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does ble beacon example work?</title><link>https://devzone.nordicsemi.com/thread/510140?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 14:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cf6f96d-e311-4b91-9e31-d66a1f5afec4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;A beacon is an advertiser, so the nRF Connect app only receives the&amp;nbsp;advertising packet,&amp;nbsp;decodes and and displays it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does ble beacon example work?</title><link>https://devzone.nordicsemi.com/thread/510137?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 14:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9957102b-40d4-471d-94e8-3e159a31a15b</guid><dc:creator>julian24</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure if i correctly understood you. Does nRF Connect just process the beacon? I initially thought the example beacon sent each value with it&amp;#39;s key in some way, but is nRF Connect just getting the whole message and deciding which one is each (according to a standard)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does ble beacon example work?</title><link>https://devzone.nordicsemi.com/thread/510106?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 13:12:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e8eef4e-d8c2-4829-bb4f-7b8746175d2e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The beacon sample is based on Apple iBeacon, so you can refer to &lt;a href="https://developer.apple.com/ibeacon/"&gt;Apple&amp;#39;s documentation&lt;/a&gt; for details. Other than that, the comments where the array is populated that you copy-pasted in your original post describe it in detail.&lt;/p&gt;
[quote user=""]Specifically, when I see the beacon on my phone, I can read which parameter is the UUID, which one is Major, which one is Minor, etc, but I cant find how my code knows which parameter is each one.[/quote]
&lt;p&gt;The format of this beacon (iBeacon type) is always the same, and as you see in the code. That hard codes everything. It is a standard legacy advertising packet with manufacturer specific data and length fields for that, which follows the Bluetooth specification. The content of the manufacturer specific data is that of iBeacon, and you need to know the format in order to decode it (which you do from the comments in the code or Apple&amp;#39;s documentation).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>