<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Read Tx Power from a iBeacon Device with Wipy2]]></title><description><![CDATA[<p dir="auto">Hello Guys</p>
<p dir="auto">I want to calculate the distance to an iBeacon.<br />
So I need the Rssi and the Tx Power at 1m.</p>
<p dir="auto">For the RSSI I use this code:</p>
<pre><code>import binascii
from network import Bluetooth
bluetooth = Bluetooth()

bluetooth.start_scan(20)
while bluetooth.isscanning():
    adv = bluetooth.get_adv()
    if adv:
       print(&quot;device mac = {}&quot;.format(binascii.hexlify(adv.mac)))
       print(&quot;device RSSI = {}&quot;.format(adv.rssi)) 
</code></pre>
<p dir="auto">How do I get the TX Power at 1m from my device?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.pycom.io/topic/1144/read-tx-power-from-a-ibeacon-device-with-wipy2</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 13:02:06 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/1144.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 May 2017 05:36:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Read Tx Power from a iBeacon Device with Wipy2 on Wed, 03 May 2017 05:36:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello Guys</p>
<p dir="auto">I want to calculate the distance to an iBeacon.<br />
So I need the Rssi and the Tx Power at 1m.</p>
<p dir="auto">For the RSSI I use this code:</p>
<pre><code>import binascii
from network import Bluetooth
bluetooth = Bluetooth()

bluetooth.start_scan(20)
while bluetooth.isscanning():
    adv = bluetooth.get_adv()
    if adv:
       print(&quot;device mac = {}&quot;.format(binascii.hexlify(adv.mac)))
       print(&quot;device RSSI = {}&quot;.format(adv.rssi)) 
</code></pre>
<p dir="auto">How do I get the TX Power at 1m from my device?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.pycom.io/post/7057</link><guid isPermaLink="true">https://forum.pycom.io/post/7057</guid><dc:creator><![CDATA[redimo]]></dc:creator><pubDate>Wed, 03 May 2017 05:36:12 GMT</pubDate></item><item><title><![CDATA[Reply to Read Tx Power from a iBeacon Device with Wipy2 on Sat, 06 May 2017 02:20:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1266">@redimo</a> Probably the best way to do this is to actually measure the RSSI as you move the beacon away from the receiver.  That is, measure RSSI at 1 meter separation, 2m, 3m, and so on, and then a table (or function) that, based on the measured data, will allow you to look up range based on RSSI.  You'll need different tables for different beacons (if they have different output power or antennas), and things will be very different whenever obstructions (e.g. furniture, walls, people) are between the beacon and the receiver.</p>
]]></description><link>https://forum.pycom.io/post/7171</link><guid isPermaLink="true">https://forum.pycom.io/post/7171</guid><dc:creator><![CDATA[pwest]]></dc:creator><pubDate>Sat, 06 May 2017 02:20:00 GMT</pubDate></item><item><title><![CDATA[Reply to Read Tx Power from a iBeacon Device with Wipy2 on Sat, 06 May 2017 08:31:51 GMT]]></title><description><![CDATA[<p dir="auto">You need some kind of signal propogation model. Some of the parameters within this model you would then empirically determine.</p>
<p dir="auto">E.g. <a href="https://en.wikipedia.org/wiki/Free-space_path_loss" target="_blank" rel="noopener noreferrer nofollow">https://en.wikipedia.org/wiki/Free-space_path_loss</a></p>
]]></description><link>https://forum.pycom.io/post/7174</link><guid isPermaLink="true">https://forum.pycom.io/post/7174</guid><dc:creator><![CDATA[RobTuDelft]]></dc:creator><pubDate>Sat, 06 May 2017 08:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to Read Tx Power from a iBeacon Device with Wipy2 on Sat, 27 May 2017 09:11:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/225">@pwest</a><br />
We've found out how. On iBeacon, when you read the data you get an Array. You need to do int(lastHexValue, 16) and then -256. This results in the set TxPower the BLE Beacon has</p>
<p dir="auto">Edit: this site explains very well how the iBeacon protocoll is built, aswell as to where to find the TxPower:<br />
<a href="http://www.warski.org/blog/2014/01/how-ibeacons-work/" target="_blank" rel="noopener noreferrer nofollow">http://www.warski.org/blog/2014/01/how-ibeacons-work/</a></p>
]]></description><link>https://forum.pycom.io/post/7794</link><guid isPermaLink="true">https://forum.pycom.io/post/7794</guid><dc:creator><![CDATA[redimo]]></dc:creator><pubDate>Sat, 27 May 2017 09:11:58 GMT</pubDate></item></channel></rss>