Example of using wpantund on-mesh commissioning

486 views
Skip to first unread message

Robby Madruga

unread,
Dec 6, 2017, 9:20:10 PM12/6/17
to openthread-users
I'm trying to commission a device via the wpantund with no success.
I followed the CodeLab example here: https://codelabs.developers.google.com/codelabs/openthread-simulation/#4
This uses the cli interface for both the commissioner and the joiner.
Is there a step by step example for using the wpantund/wpanctl as the commissioner and cli as the joiner? (both simulated)

Jeffrey Bumgardner

unread,
Dec 7, 2017, 3:12:54 PM12/7/17
to Robby Madruga, openthread-users
Hi Robby -

I don't think this NCP scenario is fully documented anywhere right now (only external commissioning with the Thread app), but it should be.  I'll be adding it to openthread.io, but here's what you do:

1. Get the eui64 from the FTD joiner device:

> eui64
18b4300000000001
Done

2. Using wpanctl on the NCP, set network credentials, form the network, and start the commissioner:

wpanctl:utun6> setprop Network:PANID 0xDEAD
wpanctl:utun6> setprop Network:XPANID DEAD1111DEAD2222
wpanctl:utun6> setprop Network:Key 11112233445566778899DEAD1111DEAD
wpanctl:utun6> config-gateway -d "fd11:22::"
Using prefix "fd11:22::"
Gateway configured.
wpanctl:utun6> form "OpenThreadGuide"
Forming WPAN "OpenThreadGuide" as node type "router"
Successfully formed!
wpanctl:utun6> commissioner -e
Commissioner command applied.

3. Set up commissioning with a unique joiner credential (J01NU5) for our specific joiner (18b4300000000001):

wpanctl:utun6> commissioner -a J01NU5 18b4300000000001
Joiner added.

4. Switch to the FTD joiner device and start the joiner role with the joiner credential.  After a few seconds you should get a "Join success" confirmation:

> ifconfig up
Done
> joiner start J01NU5
Done
> Join success

5. Start thread on the FTD joiner and it will join the NCP's network:

> thread start
Done
> networkname
OpenThreadGuide
Done
> extpanid
dead1111dead2222
Done


Let me know if you have any problems getting it to work.  The default commissioner timeout is 60 seconds I believe so if you don't do it fast enough you'll have to set up commissioning for the specific joiner again (commissioner -a).

Jeff

--
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 post to this group, send email to openthre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/27e67c58-cab3-4892-9e7e-a9bad59abf2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robby Madruga

unread,
Dec 7, 2017, 4:05:06 PM12/7/17
to openthread-users
Works great Jeff! Thanks a bunch. Now I just have to make it work with real devices.
Reply all
Reply to author
Forward
0 new messages