OpenThread and CoAP Server Endpoint

649 views
Skip to first unread message

Bruno Melo

unread,
Nov 24, 2016, 9:14:45 AM11/24/16
to openthread-users
Hello!

I'm very new to the Thread protocol, so forgive me if something I say is far from correct.

What would be the easiest way to reach a CoAP Endpoint inside OpenThread, from
an outside application (such as ping6 or a scapy script)?

I'm kinda lost and not sure if I should be using the wpantund tool [or how to], or
something like that; or even if there is some CoAP Endpoint to be reached inside
OpenThread's cli example (ot-cli-ftd or some other executable). From what I understood
looking at the repository, OpenThread is using CoAP to exchange control messages
regarding Joining/Commissioning; right?

Basically, what I want to do is just to be able to reach a CoAP Server so I can send
random stimuli to it (like a GET ./well-known/core; etc). Actual paths available on such
a CoAP Server/Endpoint are not relevant; I'm OK with only getting RSTs, as long as
I can see the packets going back and forth with Wireshark, for instance.

PS.: I'd like to do that using only one Native PC (Linux), but if not possible, I have one
samr21-xpro and 2 RPis as well.

Thanks & Regards,
Bruno Melo.

Jonathan Hui

unread,
Nov 28, 2016, 12:29:27 PM11/28/16
to Bruno Melo, openthread-users
Hi Bruno,

While the Thread protocol uses CoAP for its control messaging, the CoAP server instances within a Thread network are dedicated to Thread's control messaging (i.e. Thread's CoAP server uses a different port than the default CoAP port).

At the same time, OpenThread does expose a CoAP API that allows application to use the same CoAP implementation to send/receive CoAP messages.  If you want to test that out, you will need to set up a CoAP server, add a resource, and implement the appropriate higher-layer logic to send and process CoAP messages.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/d7b04930-ab89-482d-9145-08167cb7d6a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruno Melo

unread,
Nov 28, 2016, 1:40:00 PM11/28/16
to jon...@nestlabs.com, openthread-users
Hmm, I see... And which Port # would that be?

Or actually, more important: how can I send a packet from a Linux
process (Firefox Copper, for instance), to a process running ot-cli-ftd
(or another Thread process)?

Thanks a lot for the answer,
Bruno Melo.

Jonathan Hui

unread,
Dec 9, 2016, 1:48:04 PM12/9/16
to Bruno Melo, openthread-users
Hi Bruno,

The UDP port for Thread-specific is 61631.

Using wpantund along with a simulated network should quickly given you an environment where you can use Firefox Copper to perform some CoAP exchanges.

--
Jonathan Hui

KOUDA MOHAMED AMINE

unread,
Apr 4, 2017, 4:56:16 AM4/4/17
to openthre...@googlegroups.com
hi,
 i have another problem !! :)
when i create the coap server using the API :   otCoapServerStart(sInstance);  then i add resources...
its done without error "kThreadError_None", but when i want to test if the server is running there is nothing ( with coaping or copper )
(ps: i set the wpantund and the instance communicate with the pc via ping normally)
but coaping returns " no response after 1.0 second"
i dont find the problem .
should i use 61631 or 5683 as port for copper ?


aaaaaaaaaaaaaa.PNG
aaaaa.PNG
Reply all
Reply to author
Forward
0 new messages