<?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>Can&amp;#39;t receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105542/can-t-receive-packets-at-125kbps</link><description>Hello, I am having some issues when trying to test long range, here is my setup: 
 Hardware: 
 
 x2 NRF52833 DK 
 x1 Windows 11 PC 
 
 I have both boards connected to my PC, with a Python script I can write/read from registers, I am trying to work at</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Nov 2023 14:27:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105542/can-t-receive-packets-at-125kbps" /><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455341?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 14:27:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c44521ee-ecd1-4911-80da-e2377c35dc49</guid><dc:creator>Grard</dc:creator><description>&lt;p&gt;Yes, I am setting the first byte to 8:&lt;/p&gt;
&lt;p&gt;&lt;img style="height:191px;max-height:191px;max-width:518px;" alt=" " height="166" src="https://devzone.nordicsemi.com/resized-image/__size/1036x382/__key/communityserver-discussions-components-files/4/pastedimage1699885343285v1.png" width="517" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, I do receive one byte (the length byte) but only that one and from time to time, the data is 0, I am sending every 500ms.&lt;/p&gt;
&lt;p&gt;I expect to see the counter also in the receiver side, so that I know how many packets I&amp;#39;ve dropped.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;
# 0x8&amp;lt;&amp;lt;24 is the length of the packet, we can only have a counter up to 24 bits, no problem for tests
self.write_reg(REGS.PKT_BUFF_ADDRESS, 0x8 &amp;lt;&amp;lt; 24 | pckt_counter)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the python code where I am loading the counter, this data is&amp;nbsp;being copied to the buffer where the packet pointer is pointing at.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Grard&lt;br /&gt;&lt;br /&gt;EDIT: After further research I&amp;#39;ve found that this last issue is likely in the python side, so I believe it doesn&amp;#39;t belong here anymore.&lt;/p&gt;
&lt;p&gt;Thank you for your help! I really appreciate it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Grard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455324?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 14:13:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aae8e8a1-0c57-47ce-96e1-5670e3a6f40d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Grard"]However, I do not get the content I expect, could it be that this data is shifted?[/quote]
&lt;p&gt;Note that the first byte of the user payload is the length of the payload.&lt;/p&gt;
&lt;p&gt;Do you have any example of expected vs. received data?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455317?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 14:00:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c04721c8-9522-4d48-b26b-d613fa6e3180</guid><dc:creator>Grard</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;H&amp;aring;kon, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Indeed I pasted the wrong configuration, with the one you linked to and some tweaks to adapt it to my code I am successfully receiving packets. However, I do not get the content I expect, could it be that this data is shifted? I am writing and reading from&amp;nbsp;&lt;/span&gt;PACKETPTR in the same way I was doing with&amp;nbsp;&lt;span&gt;802.15.4 PHY. Maybe I have to take into account other fields thar are not present in 802.15.4 PHY?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you so much for your support,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Grard&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455296?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 13:07:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e10fee1-bce3-4032-a37c-47473c77c438</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Grard,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you try the exact same configuration as posted in the thread that I linked to? You seem to have configurations specifically towards 802.15.4 PHY (CRC and channel-wise) at this time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455101?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 11:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7b544dd-0c4e-4bb0-b43b-ce5456dd23a9</guid><dc:creator>Grard</dc:creator><description>&lt;p&gt;True! I fixed that but still can&amp;#39;t receive, I&amp;#39;ve made some changes on the code:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const nrf_radio_packet_conf_t radio_performance_packet_configuration = {
    .lflen = 8,
    .plen = 0x03,
    .crcinc = false,
    .maxlen = 128,
    .statlen = 0,
    .balen = 0,
    .big_endian = false,
    .whiteen = false,
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void radio_performance_nrf52_rx_init(uint8_t channel) {

    if(channel &amp;lt; MIN_RADIO_CHANNEL_802_15_4 ||
       channel &amp;gt; MAX_RADIO_CHANNEL_802_15_4) {
        channel = MIN_RADIO_CHANNEL_802_15_4;
    }

    nrf_radio_power_set(false);
    nrf_radio_power_set(true);

    /* Disable all interrupts */
    nrf_radio_int_disable(0xFFFFFFFF);
    nrf_radio_mode_set(NRF_RADIO_MODE_BLE_LR125KBIT);
    nrf_radio_packet_configure(&amp;amp;radio_performance_packet_configuration);
    nrf_radio_modecnf0_set(true, RADIO_MODECNF0_DTX_Center);
    nrf_radio_crc_configure(RADIO_CRCCNF_LEN_Disabled, NRF_RADIO_CRC_ADDR_IEEE802154, 0x11021);
    nrf_radio_frequency_set(CHANNEL_TO_FREQ_802_15_4(channel));
    nrf_radio_shorts_enable(NRF_RADIO_SHORT_RXREADY_START_MASK |
                            NRF_RADIO_SHORT_END_DISABLE_MASK);

    nrf_radio_packetptr_set(nrf52_radio_buffer_rx);

    // Enable radio interrupts
    nrf_radio_int_enable(NRF_RADIO_INT_END_MASK);
    npl_freertos_hw_set_isr(RADIO_IRQn, nrf52RadioInterruptHandler);

    NVIC_SetPriority(RADIO_IRQn, 3);
    NVIC_ClearPendingIRQ(RADIO_IRQn);
    NVIC_EnableIRQ(RADIO_IRQn);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have tried using IEEE802154 and it does work, changed the mode and the preamble to BLE 125kbit and it stopped receiving.&lt;/p&gt;
&lt;p&gt;Sorry for bothering too much, I can&amp;#39;t wrap my head around the issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you, best regards.&lt;/p&gt;
&lt;p&gt;Grard.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455072?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 09:05:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b00473c-93db-404e-8921-e6c2f4886986</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Grard"]Thing is, I have read from this register right after configuring it by calling&amp;nbsp;&lt;em&gt;radio_performance_nrf52_rx_init&lt;/em&gt; as shown in my previous message, and loading up the&amp;nbsp;&lt;em&gt;radio_performance_packet_configuration&lt;/em&gt; which specifies that plen should be&amp;nbsp;&lt;em&gt;NRF_RADIO_MODE_BLE_LR125KBIT.&lt;/em&gt;[/quote]
&lt;p&gt;PLEN only has 2 bits, and &amp;quot;NRF_RADIO_MODE_BLE_LR125KBIT&amp;quot; is defined to value &amp;#39;5&amp;#39;. This define is for the NRF_RADIO-&amp;gt;MODE register, and not the PCNF0 register.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The side-effect of setting &amp;#39;5&amp;#39; here makes you set .CRCINC=1 as well, although you have specifically set this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    nrf_radio_crc_configure(RADIO_CRCCNF_LEN_Three, NRF_RADIO_CRC_ADDR_SKIP, 0x11021);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You want to set it to &amp;quot;RADIO_PCNF0_PLEN_LongRange&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/455069?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 08:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:081d46d3-aa59-4ca5-b4c4-91ce979eda29</guid><dc:creator>Grard</dc:creator><description>&lt;p&gt;Hi, thank you for your answer,&lt;/p&gt;
&lt;p&gt;PCNF0 is at&amp;nbsp;0x45410108, this is:&lt;br /&gt;&lt;img style="height:387px;max-height:387px;max-width:662px;" height="344" src="https://devzone.nordicsemi.com/resized-image/__size/1324x774/__key/communityserver-discussions-components-files/4/pastedimage1699606154462v1.png" width="661" alt=" " /&gt;&lt;br /&gt;Apparently, PLEN is being set to 16 bit instead of BLE long range.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The other fields are indeed set to what I have configured in the packet_configuration structure&lt;/p&gt;
&lt;p&gt;Thing is, I have read from this register right after configuring it by calling&amp;nbsp;&lt;em&gt;radio_performance_nrf52_rx_init&lt;/em&gt; as shown in my previous message, and loading up the&amp;nbsp;&lt;em&gt;radio_performance_packet_configuration&lt;/em&gt; which specifies that plen should be&amp;nbsp;&lt;em&gt;NRF_RADIO_MODE_BLE_LR125KBIT.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I will now read the post you linked to, maybe there is something that needs to be set in order to edit the preamble length?&lt;/p&gt;
&lt;p&gt;Thank you for your help, it&amp;#39;s really appreciated.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Grard.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't receive packets at 125Kbps</title><link>https://devzone.nordicsemi.com/thread/454950?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2023 14:41:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8454321-1ad1-41fa-b50a-b042673c5b54</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;LR 125k isn&amp;#39;t straight forward to configure, and will require a bit of &amp;quot;special care&amp;quot; compared to the other radio modes.&lt;/p&gt;
&lt;p&gt;What is your PCNF0 register being set to? If you look at this thread, you can see other users that has had similar issues:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46049/bringing-up-125kbps-coded-phy-on-nrf52840"&gt;Bringing  up 125Kbps Coded PHY on NRF52840&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>