This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

change phy in mesh

I'm working with the nRF52840 PDK and I'm wondering how to change the PHY (preferably to CODED) in a Mesh. Has that been implemented yet? Or when can we expect this feature?

  • Yes I t just did not work. I got no error messages and no messages indicating an connection attempt. I was thinking the same thing over the weekend that I may have to adjust the receive time. the packets could be timingout and the packet receive time needs to be adjusted. That is what I am going to see if i can find this morning

  • @jeff Any chance to look further into this? Was there a timing issue?

  • I have requested that when the radio mode is set to a different radio mode, the timing should also be updated. This makes it easy to support whichever mode is needed, the timing to compute for coded PHY is a bit of work and it is more appropriate to do this automatically. No time commitments on this yet.

  • I have requested that when the radio mode is set to a different radio mode, the timing should also be updated. This makes it easy to support whichever mode is needed, the timing to compute for coded PHY is a bit of work and it is more appropriate to do this automatically. No time commitments on this yet.

  • The following modification worked for me:

    1. In advertise.c, set_default_broadcast_configuration() change radio_mode to use RADIO_MODE_NRF_62K5BIT instead of RADIO_MODE_BLE_1MBIT.

    2. In scanner.c, scanner_config_reset() change scanner_config_radio_mode_set() to use RADIO_MODE_NRF_62K5BIT instead of RADIO_MODE_BLE_1MBIT.

    3. In radio_config.c, radio_config_config() add the following code at the end:

       if (p_config->radio_mode==RADIO_MODE_NRF_62K5BIT )
      
       {
        NRF_RADIO->PCNF0 |=(
       
                       ((RADIO_PCNF0_PLEN_LongRange << RADIO_PCNF0_PLEN_Pos) & RADIO_PCNF0_PLEN_Msk) |
                       ((2 << RADIO_PCNF0_CILEN_Pos) & RADIO_PCNF0_CILEN_Msk) |
                       ((3 << RADIO_PCNF0_TERMLEN_Pos) & RADIO_PCNF0_TERMLEN_Msk) );
              
       }
      

    4.In broadcast.c, time_required_to_send_us() add:

        if (radio_mode == RADIO_MODE_NRF_62K5BIT)
        {
            packet_length_in_bytes += RADIO_PREAMBLE_LENGTH_LR_EXTRA_BYTES;
        }
    

    And define RADIO_PREAMBLE_LENGTH_LR_EXTRA_BYTES = 9.

    Change 5th element in radio_mode_to_us_per_byte[] from 128 to 64.

    Let us know if you don't achieve longer range with this patch.

Related