We are using:
NCS v1.9.1
nRF52840
openthread
We expect to operate in an environment with other Thread networks. So, we would like to randomize the network credentials, and be able to change channels based on the environment.
Issue 1:
This application is for a commissioner, which will form the network. We would like to configure this project so that, initially and after a factory reset, the network credentials (panid, channel, network key) are random. In prf.conf, I can set
CONFIG_OPENTHREAD_NETWORKKEY="" CONFIG_OPENTHREAD_PANID=23709 CONFIG_OPENTHREAD_CHANNEL=25 CONFIG_OPENTHREAD_CHANNEL_MONITOR=y CONFIG_OPENTHREAD_CHANNEL_MANAGER=y CONFIG_OPENTHREAD_COMMISSIONER=y CONFIG_OPENTHREAD_FTD=y CONFIG_OPENTHREAD_THREAD_STACK_SIZE=8192 CONFIG_OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE=2048
otInstance *instance = openthread_get_default_instance(); otChannelManagerSetAutoChannelSelectionInterval(instance, 60); otChannelManagerSetSupportedChannels(instance, 0xFFFFFFFF); otChannelManagerSetAutoChannelSelectionEnabled(instance, true); printk("Openthread Channel Manager: delay = %d sec supportedCh = 0x%x favoredCh = 0x%x\r\n", otChannelManagerGetDelay(instance), otChannelManagerGetSupportedChannels(instance), otChannelManagerGetFavoredChannels(instance) ); //otChannelManagerRequestChannelChange(instance, 15); otChannelManagerRequestChannelSelect(instance, true);