Hello,
In our product, we would like to be able to detach from the current ('Old') Thread network, initiate a Joining *attempt* on a second ('New') Thread network, but if the Joining process fails, revert to the Old Thread network. The feature is needed to support the customer use case where a device is moved to another location with different Thread network credentials. Reverting to the old network is a required feature in case the Joining process is inadvertently initiated. For sake of discussion, assume there is a "JOIN" button on the product that kicks off this process.
We are testing this scenario using OpenThread CLI (on nRF52840 DK) and finding that we cannot do it as planned. Unless we issue a '>factoryreset' (which erases the Old network credentials), the previously-connected device cannot Join. Join attempts return '> Join failed [NotFound]'.
Steps to reproduce (requires at least 3 devices):
- Form a Thread Network 'old' on one device
- Form a Thread Network 'new' on a second device with different credentials
- Start a wildcard commissioner on 'old' using PSKd '0A1B2C3D'
- On a third device 'target', do the following:
factoryreset
ifconfig up
joiner start 0A1B2C3D
...after '> join success'
thread start // commits to nonvolatile
...confirm connectivity with state, ipaddr, etc. - Stop the commissioner on 'old'
- Start a wildcard commissioner on 'new' using PSKd '0A1B2C3D'
- On 'target', do the following:
thread stop
ifconfig down // trying everything short of factoryreset here
ifconfig up
joiner start 0A1B2C3D
... returns '> Join failed [NotFound]' // <---- THIS IS THE SYMPTOM
dataset active
... list of 'old' network credentials that are still valid is displayed here...
Done
>
factoryreset
>
dataset active
Error 23: NotFound // <---- AT THIS POINT WE CAN'T GO BACK TO THE OLD NETWORK (THE PROBLEM)
joiner start 0A1B2C3D
> join success
thread start
...confirm connectivity with state, ipaddr, etc.
We need to be able to avoid the 'factoryreset' command, so that if the joining process fails, we are able to reconnect to the previous network. Any idea why 'joiner start' is failing? Is there something we can do short of clearing the active dataset to allow successful joining?
Thanks,
Rob