<?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>Some issues about direction-finding</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81665/some-issues-about-direction-finding</link><description>Hi, I am Marcous. Currently, I am working on the direction-finding demos. To be specific, I am developing my own application with locators connecting with multiple beacons meanwhile. 
 Here are two questions I counter recently, 
 1. When I just connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Nov 2021 13:32:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81665/some-issues-about-direction-finding" /><item><title>RE: Some issues about direction-finding</title><link>https://devzone.nordicsemi.com/thread/339659?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 13:32:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c6ad1c5-47da-41a4-91b4-c64be7aeb907</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Good news. This issue has already been encountered by one of my colleagues &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/39405"&gt;here&lt;/a&gt;, and it has been fixed in&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/39444"&gt; the upstream Zephyr main branch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some issues about direction-finding</title><link>https://devzone.nordicsemi.com/thread/339362?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 09:20:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:819b8f4a-bc8c-4532-9a1f-96bef2d2960c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Sorry about the late reply, but I agree that this sounds strange and that the CTE report here should follow the PER_ADV_SYNC. I have asked the developers internally and I&amp;#39;m waiting for a reply as I don&amp;#39;t have a good explanation for you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some issues about direction-finding</title><link>https://devzone.nordicsemi.com/thread/338999?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 11:44:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86af41b9-caf8-464a-8388-754644f7220b</guid><dc:creator>Marcous</dc:creator><description>&lt;p&gt;1. For this question, I do lay the two beacons close to each other. I am sorry to hear that you don&amp;#39;t officially provide any solution to the connection problems. But I do try to change the code and testbench (I mean the environment ) to improve the situation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. This question is somehow made by a bug in my individual code, and I have already fixed it. And it is true that &lt;strong&gt;recv_cb&lt;/strong&gt; and &lt;strong&gt;cte_recv_cb &lt;/strong&gt;should callback together.&lt;/p&gt;
&lt;p&gt;And I get a new question here:&lt;/p&gt;
&lt;p&gt;When I do multi-sync Direction Finding ( say three beacons simultaneously), I printf the log information about&lt;strong&gt;&amp;nbsp;recv_cb&lt;/strong&gt; and &lt;strong&gt;cte_recv_cb&lt;/strong&gt; in the terminal window.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PER_ADV_SYNC[&lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/span&gt;]: [DEVICE]:&lt;strong&gt; E3:7F:07:20:00:0B (0x70)&lt;/strong&gt;, tx_power 127, RSSI -29, CTE AOA, data length 0, data: &lt;br /&gt;CTE[&lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/span&gt;]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -290&lt;/p&gt;
&lt;p&gt;PER_ADV_SYNC[&lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/span&gt;]: [DEVICE]: &lt;strong&gt;E2:7F:07:20:00:0B (0x84)&lt;/strong&gt;, tx_power 127, RSSI -30, CTE AOA, data length 0, data: &lt;br /&gt;CTE[&lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/span&gt;]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -300&lt;/p&gt;
&lt;p&gt;PER_ADV_SYNC[&lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/span&gt;]: [DEVICE]:&lt;strong&gt; E0:7F:07:20:00:0B (0x98)&lt;/strong&gt;, tx_power 127, RSSI -32, CTE AOA, data length 0, data: &lt;br /&gt;CTE[&lt;span style="background-color: #ffff00;"&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/span&gt;]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -320&lt;/p&gt;
&lt;p&gt;Here I show each of the three beacons&amp;#39; data_cb and cte_cb callback&amp;#39;s response, note the highlighted numbers, in &lt;strong&gt;recv_cb,&amp;nbsp;&lt;/strong&gt;when I do the function&amp;nbsp;&lt;strong&gt;bt_le_per_adv_sync_get_index(sync)&lt;/strong&gt;, I do can get the correct index of the synchronized device which is sending the data. However, in the cte_cb, when I do the same function, no matter how many devices I have already created synchronization, the results are always &lt;strong&gt;zero&lt;/strong&gt;. But I can guarantee that the &lt;strong&gt;cte_recv_cb&lt;/strong&gt; callback following the&lt;strong&gt; recv_cb&lt;/strong&gt; is just from the same device&amp;#39;s broadcasting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Following is my code with recv_cb and cte_recv_cb&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void recv_cb(struct bt_le_per_adv_sync *sync,
                    const struct bt_le_per_adv_sync_recv_info *info,
                    struct net_buf_simple *buf)
{
    char le_addr[BT_ADDR_LE_STR_LEN];
    char data_str[BT_GAP_ADV_MAX_EXT_ADV_DATA_LEN];

    bt_addr_le_to_str(&amp;amp;(info-&amp;gt;addr), le_addr, sizeof(le_addr));
    bin2hex(buf-&amp;gt;data, buf-&amp;gt;len, data_str, sizeof(data_str));

    printk(&amp;quot;PER_ADV_SYNC[%u]: [DEVICE]: %s, tx_power %i, &amp;quot;
	       &amp;quot;RSSI %i, CTE %s, data length %u, data: %s\n&amp;quot;,
	       bt_le_per_adv_sync_get_index(sync), le_addr, info-&amp;gt;tx_power,
	       info-&amp;gt;rssi, cte_type2str(info-&amp;gt;cte_type), buf-&amp;gt;len, data_str);
}

static void
cte_recv_cb(struct bt_le_per_adv_sync *sync,
            struct bt_df_per_adv_sync_iq_samples_report const *report)
{
  printk(&amp;quot;CTE[%u]: samples count %d, cte type %s, slot durations: %u [us], &amp;quot;
           &amp;quot;packet status %s, RSSI %i\n&amp;quot;,
           bt_le_per_adv_sync_get_index(sync), report-&amp;gt;sample_count,
           cte_type2str(report-&amp;gt;cte_type), report-&amp;gt;slot_durations,
           packet_status2str(report-&amp;gt;packet_status), report-&amp;gt;rssi);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some issues about direction-finding</title><link>https://devzone.nordicsemi.com/thread/338824?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 14:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b35bf06a-9778-4e33-8ed2-667c3e40ba9c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Marcous&lt;/p&gt;
&lt;p&gt;1. How is the environment you&amp;#39;re testing in? Are the two beacons you are using laying close to each other? If so they are prone to interfere with one another I would think if they advertise over one another. I&amp;#39;m sorry, but we don&amp;#39;t have too much information or specific suggestions to strengthen a connection in a multiple-sync scenery as of yet. It could be that your antenna array is prone to multipath fading as well, and if so you will have to take care of that in the SW.&lt;/p&gt;
&lt;p&gt;2. These can&amp;#39;t be expected to be called together as they come from different places in the code. At least in the connectionless_rx sample project. The sync callback will only be called when the scanner syncs up to an advertiser I think, while the data_cb reports whenever there is a data callback.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>