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?
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?
The following modification worked for me:
In advertise.c, set_default_broadcast_configuration() change radio_mode to use RADIO_MODE_NRF_62K5BIT instead of RADIO_MODE_BLE_1MBIT.
In scanner.c, scanner_config_reset() change scanner_config_radio_mode_set() to use RADIO_MODE_NRF_62K5BIT instead of RADIO_MODE_BLE_1MBIT.
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.
The following modification worked for me:
In advertise.c, set_default_broadcast_configuration() change radio_mode to use RADIO_MODE_NRF_62K5BIT instead of RADIO_MODE_BLE_1MBIT.
In scanner.c, scanner_config_reset() change scanner_config_radio_mode_set() to use RADIO_MODE_NRF_62K5BIT instead of RADIO_MODE_BLE_1MBIT.
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.
I got back to the MESH today. I have tested inside on our production floor with good results. I still need to do outdoor range testing. Hopefully this afternoon.
Hi Jeff,
@Jeff We are about to test this as well. Any more result available on your testing? Did you see a real improvement in range?
Great job @Hung Bui! Works as expected. + 5-10m through concrete and glass. We were testing on nrf52840 DK and nrf52840 dongles, nrf5SDKforMeshv310.
Unfortunately for relays we are pushed to use Zephyr to support friend feature and Zephyr is not relaying messages. Maybe you have ideas in which direction we should dig in to apply same on Zephyr relays?
I have troubling running the code after making this change. I wasn't able to receive any "mesh complete tx" message after making this change. I've tried increasing the wait time, didn't work either. Has anyone come across similar problems and know how to solve it?
Hi, is this method still working on Mesh v4?, Im not getting good results, I get like 3 or 4 meters with 1 wall, with zigbee i was getting like 12 meters with 2 or 3 walls.