<?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>&amp;#39;CONFIG_BT_PER_ADV_SYNC_MAX&amp;#39; undeclared here (not in a function)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82117/config_bt_per_adv_sync_max-undeclared-here-not-in-a-function</link><description>Hi, 
 I met some problems when I tried the sample &amp;#39;direction_finding_connectionless_rx&amp;#39; in ncs v1.7.1 on nRF5340dk. I copied files to hci_rpmsg/boards as https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/bluetooth/direction_finding_connectionless_rx</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Nov 2021 11:41:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82117/config_bt_per_adv_sync_max-undeclared-here-not-in-a-function" /><item><title>RE: 'CONFIG_BT_PER_ADV_SYNC_MAX' undeclared here (not in a function)</title><link>https://devzone.nordicsemi.com/thread/341254?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 11:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77b0da54-2fbe-479a-a100-f09c00f1cbb2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Yes, the I and Q samples will all be similar when you only have one antenna, so this seems like a likely result. As for the CTE type being unknown, have you configured the beacon to include the overlay-aoa.conf as explained in &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_connectionless_tx/README.html"&gt;the documentation&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;I have notified our RSM in the Anhui province that you&amp;#39;d like to get in touch regarding the antenna array, so you should hear from them soon.&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: 'CONFIG_BT_PER_ADV_SYNC_MAX' undeclared here (not in a function)</title><link>https://devzone.nordicsemi.com/thread/341190?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 08:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:967e7355-bf0a-4359-a359-b68230f8724a</guid><dc:creator>Majoris</dc:creator><description>&lt;p&gt;Hi！&lt;/p&gt;
&lt;p&gt;Thanks for your&amp;nbsp;explanation of IQ data, exactly I was confused about this output:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CTE[59]: samples count 168, cte type Unknown, slot durations: 0 [us], packet status CRC OK, RSSI 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As I saw in Nathan&amp;#39;s ticket:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CTE[0]: samples count 45, cte type AOA, slot durations: 2 [us]&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;They are different, here&amp;#39;s my complete output:&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/df_5F00_rx.log"&gt;devzone.nordicsemi.com/.../df_5F00_rx.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I want to know Is it basically correct with only PCB antenna? Sorry to trouble you so much.&lt;/p&gt;
&lt;p&gt;Finally, it helps a lot if you can tell me how to get in touch with RSM. I live in Hefei City, Anhui Province, China.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Majoris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'CONFIG_BT_PER_ADV_SYNC_MAX' undeclared here (not in a function)</title><link>https://devzone.nordicsemi.com/thread/341184?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 07:26:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f288764b-eccb-4060-93ec-3e083bceb62c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;As Nathan says in the ticket you commented in. You can print the samples by adding something like the following to the CTE_recv_cb callback. The locator application does not print the IQ data by default as it will look like a bunch of random data without converting the data into a vector.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;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);

        printk(&amp;quot;IQ sample content : \n&amp;quot;);
        for(int i=0; i&amp;lt;report-&amp;gt;sample_count; i++){
                printk(&amp;quot;sample[%d] = I:%d Q:%d\n&amp;quot;, i, report-&amp;gt;sample[i].i, report-&amp;gt;sample[i].q);
        }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please note that raw IQ data won&amp;#39;t tell you much about the position of the beacon device. You should always use this data to convert into a vector that can be used to determine positioning. I have added some formulas to calculate IQ signals from polar to rectangular form:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Peak Amplitude A = (I²+Q²)½&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Phase Angle ϕ = tan⁻¹(Q/I)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;I = A⋅cos(ϕ)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Q = A⋅sin(ϕ)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Converting IQ Data to a plain signal: I is the original signal.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Euler form: A⋅eiϕ = A⋅(cos(ϕ) + i⋅sin(ϕ)) = I + Qi&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;See&lt;a href="https://www.pe0sat.vgnet.nl/sdr/iq-data-explained/"&gt; this page &lt;/a&gt;for more information.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regarding the antenna array, you will have to contact our sales department for more information on this, as it is not available for purchase publicly. If you don&amp;#39;t know who this is or need help getting in touch with the regional sales manager of your area, let me know, and I&amp;#39;ll help you get in touch.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'CONFIG_BT_PER_ADV_SYNC_MAX' undeclared here (not in a function)</title><link>https://devzone.nordicsemi.com/thread/341017?ContentTypeID=1</link><pubDate>Mon, 29 Nov 2021 09:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8aa7c9b-aacf-4ff4-b35e-f49bac618136</guid><dc:creator>Majoris</dc:creator><description>&lt;p&gt;Hi Simonr!&lt;/p&gt;
&lt;p&gt;Actually I am a beginner of nrf5340, and I just got used to working with zephyr version. Indeed I sovled this problem by adding&amp;nbsp;&lt;span&gt;CONFIG_BT_PER_ADV_SYNC=y in hci_rpmsg/boards/nrf5340dk_nrf5340_cpunet.conf, it&amp;#39;s really great.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now I met another problem, I&amp;#39;m working with AoA example without antenna matrix,&amp;nbsp;here&amp;#39;s my&amp;nbsp;output:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;PER_ADV_SYNC[0]: [DEVICE]: 06:A2:07:3E:26:C0 (random), tx_power 127, RSSI -28, CTE AOA, data length 0, data: 
CTE[59]: samples count 168, cte type Unknown, slot durations: 0 [us], packet status CRC OK, RSSI 0&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This seems something wrong, and I&amp;#39;d like to know if additional antenna matrix is necessary, if I need an antenna matrix(I know there is Nordic 12 patch antenna matrix), what&amp;#39;s it concrete name? I got nothing by searching on Chinese internet, Thanks for your reply!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 'CONFIG_BT_PER_ADV_SYNC_MAX' undeclared here (not in a function)</title><link>https://devzone.nordicsemi.com/thread/341012?ContentTypeID=1</link><pubDate>Mon, 29 Nov 2021 09:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1c01e82-c262-4887-868f-86cf87044970</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I notice you link to, and build the Zephyr version of the project. Is there a reason for not using the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/samples/bluetooth/direction_finding_connectionless_rx/README.html"&gt;nRF version of the DF locator sample&lt;/a&gt; instead? This version is possible to build and run on the DKs. Please note that you&amp;#39;ll need to use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_connectionless_rx/README.html"&gt;master branch&lt;/a&gt; for support on the nRF53 DK.&lt;/p&gt;
&lt;p&gt;Are you intending to use Angle-of-Departure? If you&amp;#39;re planning on using Angle-of-Arrival (AOA), the overlay-aod.conf file is not necessary to add, but you need to build with the hci_rpmsg as a child image for the network core, where the hci_rpmsg.conf file needs the following defines to enable BT_PER_ADV_SYNC_MAX&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Required to enable BT_BUF_CMD_TX_SIZE for LE Set Extended Advertising Data command
CONFIG_BT_EXT_ADV=y

# Required to enable BT_PER_ADV_SYNC_MAX
CONFIG_BT_PER_ADV_SYNC=y
CONFIG_BT_OBSERVER=y

CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y

CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_SYNC_PERIODIC=y

# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_CTLR_DF=y
CONFIG_BT_CTLR_DF_ANT_SWITCH_TX=n

# Disable Direction Finding TX mode
CONFIG_BT_CTLR_DF_ADV_CTE_TX=n
&lt;/pre&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></channel></rss>