Containerising OpenThread Border Router (OTBR) for OpenThread [WIP]

The story continues…

OK so thanks to @majorz help over on this related question I think we’ve established the problem was I can’t setup a network without giving it an IPv4 address or the daemon gets unhappy

ref: Problems using "network" section in docker-compose.yml - #11 by ajlennon

So I am nearly there now I think

  • I have an OTBR block that runs up
  • I have an MQTT-SNGateway block that runs up

Now the OTBR runs up, talks to a connected USB dongle running OpenThread RCP firmware (the radio support) and establishes a wpan0 interface for the mesh comms.

The MQTT-SNGateway can be built for a range of sensor network options such as udp, udp6 and so forth. I aim to run the udp6 build which I’ve successfully talked to from nodes on the the mesh network with a vanilla non-containerised RPi installation.

Currently when the mqtt-sngateway container runs up it’s erroring as the udp6 build can’t open a socket for some reason.

What I need to understand is how to setup a custom network between the containers so that the wpan0 interface that’s been established to talk to the mesh can allow the mesh packets to forward to whatever the mqtt-sngateway container has MQTT-SNGateway (udp6) application listening on.

I’ve always been a bit unclear on how the non-host mode networking actually works so this is a good opportunity to find out.

If anybody can advise or sign-post to useful weblinks I would be most grateful!

[Edit: I suppose I could put the MQTT-SN gateway in the same container as the OTBR, and I might have to, but I would rather keep them separate if I can manage it as I can see use cases for both containers that don’t involve the other]

Cheers, Alex