Move FTD from one Thread Network to another using Joining - without Factory Reset

116 views
Skip to first unread message

Rob Crouthamel

unread,
Sep 27, 2019, 12:09:55 PM9/27/19
to openthread-users
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):
  1. Form a Thread Network 'old' on one device
  2. Form a Thread Network 'new' on a second device with different credentials
  3. Start a wildcard commissioner on 'old' using PSKd '0A1B2C3D'
  4. 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.
  5. Stop the commissioner on 'old'
  6. Start a wildcard commissioner on 'new' using PSKd '0A1B2C3D'
  7. 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


Jonathan Hui

unread,
Sep 30, 2019, 3:41:25 PM9/30/19
to Rob Crouthamel, openthread-users
OpenThread's Thread Joiner implementation allows the joiner to filter on PAN ID. By default, an uncommissioned device is initialized to the broadcast PAN ID (0xffff).

You can try setting the PAN ID to the broadcast PAN ID (0xffff). That should allow your device to succeed in the joining process you described below.

Hope that helps.

--
Jonathan Hui

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/19f59782-c025-4992-bbe7-151b2ab2750f%40googlegroups.com.

Rob Crouthamel

unread,
Sep 30, 2019, 4:04:34 PM9/30/19
to openthread-users
Jonathan,

That makes sense.  I'll give it a try and report back.

Thanks,
Rob
To unsubscribe from this group and stop receiving emails from it, send an email to openthre...@googlegroups.com.

Rob Crouthamel

unread,
Oct 1, 2019, 8:51:23 AM10/1/19
to openthread-users
I confirmed Jonathan's advice to set the PAN ID to broadcast (0xffff) solved the issue.  Here are the steps to allow a joining attempt, but fall back to the existing setting if it doesn't work.

Use Case: 
Customer wishes to move a device to another location with different Thread network credentials.  Supplier wants to make sure the device will revert to the old network if joining to the new network is unsuccessful (in case the Joining process is inadvertently initiated).

Simulate using OpenThread CLI (requires at least 3 devices):

Test Case 1 - Successful Move to Another Network
  1. Install CLI on 3 nodes and connect terminals to each
  2. Factory reset all nodes using CLI
  3. Form a Thread Network 'old' on one device using panid '0x1111' and unique credentials
  1. Form a Thread Network 'new' on a second device with different credentials
  2. Start a wildcard commissioner on 'old' using PSKd '0A1B2C3D'
  1. On a third device 'target', do the following:
  1. ifconfig up
    joiner start 0A1B2C3D
    ...after '> join success'
    thread start
  1. ...confirm connectivity with state, ipaddr, etc.
  1. Stop the commissioner on 'old'
  2. Start a wildcard commissioner on 'new' using PSKd '0A1B2C3D'
  1. On 'target', issue 'panid' and record the existing panid ('0x1111') somewhere (i.e., write it down)
  1. On 'target', do the following:
    thread stop
  1. panid 0xffff // sets the device to the broadcast address so it can "hear" any commissioners

  1. joiner start 0A1B2C3D
    ...after '> join success'
  1. ...confirm connectivity with state, ipaddr, etc.
  1. Confirm you are on the 'new' network
    networkname
    new
Test Case 2 - Unsuccessful Move; Revert to Old Network
  1. Factory reset all nodes using CLI
  2. Form a Thread Network 'old' on one device using panid '0x1111' and unique credentials
  1. Form a Thread Network 'new' on a second device with different credentials
  2. Start a wildcard commissioner on 'old' using PSKd '0A1B2C3D'
  3. 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.
  4. Stop the commissioner on 'old'
  1. DO NOT start another commissioner (so that joining will fail)
  2. On 'target', issue panid and record the existing panid ('0x1111') somewhere (i.e., write it down)
  1. On 'target', do the following:
    thread stop
  1. panid 0xffff // sets the device to the broadcast address so it can "hear" any commissioners
    joiner start 0A1B2C3D
    ...> Join failed [NotFound]
  2. The joining process has failed, but your panid is still set to 0xffff.  Fix it and reconnect to the old network:
    panid 0x1111 (the value you saved earlier)
    thread start
  3. Confirm you are back on the 'old' network
    networkname
    old
  1. ...confirm connectivity with state, ipaddr, etc.

Jonathan Hui

unread,
Oct 1, 2019, 1:22:59 PM10/1/19
to Rob Crouthamel, openthread-users
Great to hear that it works! Thank you for sharing your testing processes and results.

When reverting to the old network, an alternative to remembering and restoring the old PAN ID is simply to reboot the device. The old PAN ID should be restored from non-volatile memory.

--
Jonathan Hui

To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/699935ee-2031-47e0-a996-d699a8f70795%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages