nRF51-ble-bcast-mesh
nRF51-ble-bcast-mesh copied to clipboard
Restarting the mesh with a new mesh access address inside a program.
Does calling rbc_mesh_init() with new init_param(i.e. mesh access address) 2nd time restart the mesh with new access adress?
If not, is there a way to do it?
Hi, sorry for the delay. You can't call rbc_mesh_init() again, but you can change the parameter in transport control's function tc_radio_params_set(uint32_t access_address, uint8_t channel)
. This will trigger a reset of the radio, and will cause your device to change access address within a couple of milliseconds.
Can I call it from say, main.c(by including transport_control.h) without any problem?
That should be fine, but you'll have to find a way to synchronize it across the mesh if you want to have all devices switching. They won't be able to relay messages on the old access address once you switch (unless you switch back of course)