Compile OpenThread CLI example for SED device

229 views
Skip to first unread message

jack....@gmail.com

unread,
May 12, 2017, 10:57:06 AM5/12/17
to openthread-users
Hi,
I would like to compile OpenThread CLI example for SED device. 
SED devices don't have mesh functionality so they should take less memory (RAM). How to compile the CLI example for SED device?

And how a node can get SED role? Should I disable routerrole and is it enough?

Cheers,

Jonathan Hui

unread,
May 12, 2017, 12:58:06 PM5/12/17
to jack....@gmail.com, openthread-users
If you are building the application examples using the convenience Makefiles, the Full Thread Device (FTD) and Minimal Thread Device (MTD) applications should be built for you together.  For example:

    $ make -f examples/Makefile-posix

will output both an `ot-cli-ftd` and `ot-cli-mtd` binary.

An MTD does not have router functionality compiled in.  As a result, it is not necessary to configure the routerrole on an MTD.

At the same time, an MTD may or may not be sleepy.  To configure sleepy behavior, you need to configure the `mode`.

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 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/e0174dcb-adb1-461b-82c2-01601bc9736d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jack Mingaw

unread,
May 15, 2017, 6:15:21 AM5/15/17
to Jonathan Hui, openthread-users
Thanks for your answer, it helps yes! I see the difference, we just
need to use libopenthread-ftd.a or libopenthread-mtd.a and a SED is a
sleeping MTD. Great!

Could you detail each mode:

mode [rsdn]
Set the Thread Device Mode value.
r: rx-on-when-idle
s: Secure IEEE 802.15.4 data requests
d: Full Function Device
n: Full Network Data

I don't really see the difference between these 4 four modes? Sleepy
End Device means that the transceiver should sleep and so RX is OFF
(as well as TX) so which mode should I choose to make the transceiver
sleeps and which mode should I choose when I want to send data over
the network? I saw that a SED should sync with a router at WakeUp
before sending data, is it done automatically and how?

Cheers,

Mike Morschbert

unread,
May 15, 2017, 7:36:09 AM5/15/17
to openthread-users, jon...@nestlabs.com
As I'm currently looking into the same thing, I suggest you get the Thread Spec @ http://threadgroup.org/ThreadSpec
And have a look at Mode TLV 4.5.2:

R (Receiver) on when idle
Set to ‘1’ if the sender has its receiver on when not transmitting; otherwise, set to ‘0’.  Only an MTD acting as a SED will set this bit to ‘0’.

S (Secure) data requests
Set to ‘1’ if the sender will use 802.15.4 [IEEE802154] to secure all data requests; otherwise, set to ‘0’.

D (Device type)
Set to ‘1’ if the sender is a Full Thread Device (FTD); set to ‘0’ if a Minimal Thread Device (MTD).

N (Network data)
Set to ‘1’ if the sender requires the full Network Data; set to ‘0’ if the sender only needs the stable Network Data.

Cheers,
Mike

jack....@gmail.com

unread,
May 15, 2017, 9:26:54 AM5/15/17
to openthread-users, jon...@nestlabs.com
Thanks Mike.
So RS is enough for a SED when Transceiver RX is on and S only to disable Transceiver RX (go to sleep mode). 
I'll make some test.

Mike Morschbert

unread,
May 15, 2017, 9:52:17 AM5/15/17
to openthread-users, jon...@nestlabs.com
Yeah that should be all right. You can see the impact if you edit the cli.cpp by removing the "/1000" divider from the `pollperiod` command (to switch it from seconds to milliseconds).
Make a constant ping every 100ms (e.g. `sudo ping6 -i 0.1 IP6-address`) and then change the poll period over the CLI. Try itterating from 100 to 1000 and you can nicely see the impact on the delay in ms. (of course as you said in `s` only mode).
Reply all
Reply to author
Forward
0 new messages