Communicating with Border Router using RLOC16 address

211 views
Skip to first unread message

ka...@tokateam.com

unread,
Oct 13, 2017, 3:37:18 AM10/13/17
to openthread-users
Hi,

I'm trying to setup some CoAP communication path from Thread Node to an Linux application running on Border Router device, talking with Thread over spinel/wpantund. So, on BR device (lets assume posix implementation here) I run wpantund with vanilla NCP application from OpenThread. That obviously creates some interface on my machine, like wpan0. It gets some mesh local addresses as expected. Then I have linux app listening on 0.0.0.0 bound to wpan0, and listening on some CoAP server there. So, if some other node sends CoAP request to my BR machine using multicast address or mesh local address, I nicely get the packets on the linux side and can answer them.

But, when thread node is sending CoAP requests to my BR using RLOC16 addresses, they are not visible on the linux side. Seems like NCP/spinel/wpantund trio doesn't forward such traffic to the linux side. Is that expected? Is it possible to change it easily?

If not, what would be the best option to achieve such thing? Use customized NCP application, which would listen on CoAP and forward request over spinel? (Not sure how to do the spinel part).

Thanks in advance. 

Jonathan Hui

unread,
Oct 13, 2017, 3:04:33 PM10/13/17
to ka...@tokateam.com, openthread-users
There is an outstanding PR (openthread/wpantund#239) that allows wpantund to add RLOC address to its network interface.

To have the NCP pass up IPv6 datagrams destined to the NCP RLOC address, you will also need to set the THREAD_RLOC16_DEBUG_PASSTHRU property.

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-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/b646d2a8-7585-4544-a3a8-69509df57ed7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ka...@tokateam.com

unread,
Oct 14, 2017, 9:26:16 AM10/14/17
to openthread-users
Thanks! That was very helpful, indeed. Will the PR will be merged eventually? I would love to go on without manual patching ;) It seems to be OK for me, though apparently failed on some Travis issue. 


W dniu piątek, 13 października 2017 21:04:33 UTC+2 użytkownik Jonathan Hui napisał:
There is an outstanding PR (openthread/wpantund#239) that allows wpantund to add RLOC address to its network interface.

To have the NCP pass up IPv6 datagrams destined to the NCP RLOC address, you will also need to set the THREAD_RLOC16_DEBUG_PASSTHRU property.

Hope that helps.

--
Jonathan Hui

On Fri, Oct 13, 2017 at 12:37 AM, <ka...@tokateam.com> wrote:
Hi,

I'm trying to setup some CoAP communication path from Thread Node to an Linux application running on Border Router device, talking with Thread over spinel/wpantund. So, on BR device (lets assume posix implementation here) I run wpantund with vanilla NCP application from OpenThread. That obviously creates some interface on my machine, like wpan0. It gets some mesh local addresses as expected. Then I have linux app listening on 0.0.0.0 bound to wpan0, and listening on some CoAP server there. So, if some other node sends CoAP request to my BR machine using multicast address or mesh local address, I nicely get the packets on the linux side and can answer them.

But, when thread node is sending CoAP requests to my BR using RLOC16 addresses, they are not visible on the linux side. Seems like NCP/spinel/wpantund trio doesn't forward such traffic to the linux side. Is that expected? Is it possible to change it easily?

If not, what would be the best option to achieve such thing? Use customized NCP application, which would listen on CoAP and forward request over spinel? (Not sure how to do the spinel part).

Thanks in advance. 

--
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.

ka...@tokateam.com

unread,
Nov 2, 2017, 1:06:32 PM11/2/17
to openthread-users
So, I'm able to receive traffic from ALOC addresses over wpantund, but only if I disable https://github.com/openthread/openthread/blob/master/src/core/net/ip6.cpp#L576-L579 manually in the code.

Few questions:

a) Is it possible to disable the filter via wpantund/wpanctl? If so, how? I'm not sure how to change the value of THREAD_RLOC16_DEBUG_PASSTHRU property from wpantund level.
b) It seems, that I would like to disable the filter only partially. Only for SRV ALOCs, actually. Right now, when disabling the filter, I'm also apparently passing through RLOC16, UDP, ICMP and other stuff. The code currently is obviously not configurable at all now. Is that something you would welcome PR for? 


W dniu piątek, 13 października 2017 21:04:33 UTC+2 użytkownik Jonathan Hui napisał:
There is an outstanding PR (openthread/wpantund#239) that allows wpantund to add RLOC address to its network interface.

To have the NCP pass up IPv6 datagrams destined to the NCP RLOC address, you will also need to set the THREAD_RLOC16_DEBUG_PASSTHRU property.

Hope that helps.

--
Jonathan Hui

On Fri, Oct 13, 2017 at 12:37 AM, <ka...@tokateam.com> wrote:
Hi,

I'm trying to setup some CoAP communication path from Thread Node to an Linux application running on Border Router device, talking with Thread over spinel/wpantund. So, on BR device (lets assume posix implementation here) I run wpantund with vanilla NCP application from OpenThread. That obviously creates some interface on my machine, like wpan0. It gets some mesh local addresses as expected. Then I have linux app listening on 0.0.0.0 bound to wpan0, and listening on some CoAP server there. So, if some other node sends CoAP request to my BR machine using multicast address or mesh local address, I nicely get the packets on the linux side and can answer them.

But, when thread node is sending CoAP requests to my BR using RLOC16 addresses, they are not visible on the linux side. Seems like NCP/spinel/wpantund trio doesn't forward such traffic to the linux side. Is that expected? Is it possible to change it easily?

If not, what would be the best option to achieve such thing? Use customized NCP application, which would listen on CoAP and forward request over spinel? (Not sure how to do the spinel part).

Thanks in advance. 

--
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.

Jonathan Hui

unread,
Nov 6, 2017, 4:58:21 PM11/6/17
to ka...@tokateam.com, openthread-users
I don't think support for the THREAD_RLOC16_DEBUG_PASSTHRU property has been added to wpantund/wpanctl.

Adding additional filtering control seems reasonable to me.  I suggest creating a wpantund GitHub issue with your proposal.

--
Jonathan Hui

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/648186c6-11cb-40ae-b26c-4d498b72c83d%40googlegroups.com.

xvh xvh

unread,
Jan 29, 2018, 10:58:47 AM1/29/18
to openthread-users
Hi,
can I ask how did you bind wpan0 interface to 0.0.0.0 and coap-server listening on it? I need to implement the same use case. Thank you.
Reply all
Reply to author
Forward
0 new messages