On 07/07/18 11:14, cabled wrote:
> Thanks for the pointer. I'll take a look at the Docker option on my pi
> on Monday. Probably take a while as I haven't played with it previously.
Well, I'll point out our border router is an x86 box, I did try Docker
once on armel, and it ended in tears. Never tried it on armhf, I'd be
inclined to run the CoAP server directly on the Pi rather than within
Docker.
> May I ask, since you managed to get it to work... conceptually, running
> a get command from NCP to end node is fine. What happens if I want to
> use the end node to put/post data back to the host?
Not quite sure what you mean by "get a command" or what you mean by "host".
If your OpenThread device knows the IP address of your NCP running a
CoAP server, you can send a request to the CoAP server, NCP will forward
the frame to wpantund, which will hand it to the Linux IPv6 stack, and
eventually, your CoAP server receives the UDP message.
Likewise, sending a request, if you know the address of your OpenThread
device, your application sends the UDP message, Linux stack forwards to
wpantund, which forwards to NCP, out to the 6LoWPAN network.
> Would the instance of the CoAP server on the host then have to be
> created with the necessary URIs? Or are we able to put data directly
> back into the filesystem on the host?
Depends on how your CoAP server is written, but most I've seen are
libraries, so you'd have to write a handler to do something with the
data you've just been sent.