<?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>iBeacon distance</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80509/ibeacon-distance</link><description>Hi, 
 We are using iBeacon to locate the relative position of mobile phone between two beacons.And the distance between mobile phone and beacons no more than 20m. 
 Is that feasible with ibeacon? And should we need adding PA in RF? 
 (sdk 14.2 with nRF52810</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Oct 2021 08:01:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80509/ibeacon-distance" /><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333843?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 08:01:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:770d30d1-ecc9-43ba-8622-4d8c736fd69f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ColorPen"]I didn&amp;#39;t use 32.768kHz crystal oscillator in 52810, but used in nRF52832.Is that question?[/quote]
&lt;p&gt;Yes, that will be a problem. If the FW attempts to start the LFXO and the crystal is not there SoftDevice initialization will block forever, waiting for the clock that does not exist to start.&lt;/p&gt;
&lt;p&gt;If you still use the beacon example in SDK 14.2 you need to&amp;nbsp;change the clock configuration in sdk_config.h to use internal LFRC instead, so that it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_XTAL_ACCURACY  - External crystal clock accuracy used in the LL to compute timing windows.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM 

#ifndef NRF_SDH_CLOCK_LF_XTAL_ACCURACY
#define NRF_SDH_CLOCK_LF_XTAL_ACCURACY 1
#endif&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333839?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 07:45:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0dccb9d-e835-4892-8f9e-abbf490ad466</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;I have downloaded the same softdevice and app in nRF52810 and nRF52832.And I don&amp;#39;t edit anything.&lt;/p&gt;
&lt;p&gt;I can find the beacon when use nRF52832, but can&amp;#39;t find in nRF52810.Here is the hardware of nRF52810.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/810.png" /&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t use 32.768kHz crystal oscillator in 52810, but used in nRF52832.Is that question?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333831?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 07:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fd589f9-9831-4b0a-bed4-8d4f9d0109ad</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ColorPen"]I have some problems about the&amp;nbsp; &amp;nbsp;example of beacon.(sdk 14.2)[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is from the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/lib_timer.html"&gt;app_timer&lt;/a&gt;&amp;nbsp;implementation in &amp;lt;SDK 14.2&amp;gt;\components\libraries\timer\app_timer.c. The app_timer is a SW library that lets you create an arbitrary number of timers using a single &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=4_2_0_24#concept_rvn_vkj_sr"&gt;RTC &lt;/a&gt;instance (RTC1). This library is central in the SDK and is used by most examples.&lt;/p&gt;
&lt;p&gt;You do not normally need to consider this implementation details of this library as it is provided read for use.&lt;/p&gt;
[quote user="ColorPen"]Why we should to close SWI_IRQ?[/quote]
&lt;p&gt;What do you mean by closing the SWI_IRQ? If you mean clear, then this is done to make sure that there is no pending SWI interrupt before enabling it (for instance in case that was used by some other code before staring the app_timer). Note that this code typically only run once during startup, so there is usually no point in optimizing away things you think is not needed.&lt;/p&gt;
[quote user="ColorPen"]Wha&amp;#39;t the rtcl_count means?[/quote]
&lt;p&gt;That is the counter value of RTC1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333807?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 01:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dc10e12-5ac7-4081-966c-1643585d3d47</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll test beacons after my new hardware back.&lt;/p&gt;
&lt;p&gt;I have some problems about the&amp;nbsp; &amp;nbsp;example of beacon.(sdk 14.2)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret_code_t app_timer_init(void)
{
    // Stop RTC to prevent any running timers from expiring (in case of reinitialization)
    rtc1_stop();

    // Initialize operation queue
    m_op_queue.first           = 0;
    m_op_queue.last            = 0;
    m_op_queue.size            = APP_TIMER_CONFIG_OP_QUEUE_SIZE+1;

    mp_timer_id_head            = NULL;
    m_ticks_elapsed_q_read_ind  = 0;
    m_ticks_elapsed_q_write_ind = 0;

#if APP_TIMER_WITH_PROFILER
    m_max_user_op_queue_utilization   = 0;
#endif

    NVIC_ClearPendingIRQ(SWI_IRQn);
    NVIC_SetPriority(SWI_IRQn, SWI_IRQ_PRI);
    NVIC_EnableIRQ(SWI_IRQn);

    rtc1_init(APP_TIMER_CONFIG_RTC_FREQUENCY);

    m_ticks_latest = rtc1_counter_get();

    return NRF_SUCCESS;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Why we should to close SWI_IRQ? Wha&amp;#39;t the rtcl_count means?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333510?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 12:32:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d528391a-5549-45ae-bb1e-af250ef7b8a7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;This does not seem like a good fit for using only RSSI. Based on what you write it seems you want a higher accuracy than what is possible with this method.&lt;/p&gt;
[quote user="ColorPen"]±5 meters offset is acceptable.&amp;nbsp;[/quote]
&lt;p&gt;If you are going to use this in an open field, then perhaps it is OK, and that is only if you calibrate for specific phones. If not, then this is far from what you can achieve in the real world. As mentioned, you can really just distinguish between &amp;quot;neer&amp;quot; and &amp;quot;far away&amp;quot; using RSSI.&amp;nbsp;&lt;/p&gt;
[quote user="ColorPen"]1.Could APP find two beacons at the time to calculate the D2 and D3?[/quote]
&lt;p&gt;You can scan and get RSSI data for several peripherals, yes. Perhaps not at the exact same instance, but that should not be a problem. You can use nRF Connect for mobile for testing just to get RSSI data from several advertisers.&lt;/p&gt;
[quote user="ColorPen"]2.If the beacons need PA, how could I design in hardware?&amp;nbsp;[/quote]
&lt;p&gt;I am not sure you need it, if you for instance us nRF52840, as that has&amp;nbsp;+8 dBm output power. If you do, then I suggest you&amp;nbsp; open a separate thread about your HW design.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333462?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 10:58:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d75d9c24-dc51-4cd2-80e1-0999252673dd</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;BTW,the distance of D2 or D3 will not too long, no more than 50m. Could I use the hardwware of refence design in datasheet? Is there any setting in SDK of TX power?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333441?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 10:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e0bca48-0eba-46ed-9710-0e9a1d219bc1</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t need very highly accuracy.Here is my application.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Be.png" /&gt;&lt;/p&gt;
&lt;p&gt;There are two beacons with 20 meters apart. If mobile phone enter the space, we&amp;nbsp; will calculate the position P.&lt;/p&gt;
&lt;p&gt;&amp;plusmn;5 meters offset is acceptable.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have two problems&lt;/p&gt;
&lt;p&gt;1.Could APP find two beacons at the time to calculate the D2 and D3?&lt;/p&gt;
&lt;p&gt;2.If the beacons need PA, how could I design in hardware?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iBeacon distance</title><link>https://devzone.nordicsemi.com/thread/333401?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 08:01:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a99e9a2-6e62-491f-9f7f-55286ce9f9cf</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The feasibility depends on your accuracy requirements. If you just need to know if something is &amp;quot;likely close by or probably far away&amp;quot;, then using a beacon an measure RSSI may be good enough. But for the most part, this does not work very well. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/61450/beacon-and-scanner-to-measure-distance/250502#250502"&gt;this post&lt;/a&gt;. Regarding PA, that would increase the power thus range. So you would be able to do the&amp;nbsp;distance estimation over a bit longer distance. But the&amp;nbsp;issue with low accuracy would remain the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>