A few questions about the LoRa mesh
-
Hi @catalin,
The documentation for LoRaMesh doesn't seem to be available any more, but the example has been enough to get me most of the way where I want to be. I do have a question about how to bind an outgoing socket to an EID IP address. I've tried using
s.bind((mesh.ip_eid, myport))
, but bind doesn't accept an IPv6 address onsocket.socket(socket.AF_LORA, socket.SOCK_RAW)
sockets.Should I give up on this and just use multicast groups? Or RLOC-based addresses? Or I suppose I could stop paying attention to source addresses.
Also I'm running into some limitations around using a single socket. Is there a way to listen on multiple ports? There doesn't appear to be right now and there probably won't without a little more sophistication from the socket implementation.
Thanks,
Matthias
-
hi @mgranberry,
Thanks for your PR. I will take a closer look later this week, now I'm into some funky openthread behaviour.
There are lots of stuff for the Mesh I need to add, but for multisocket I did not wrote any code.
-
@catalin I created a PR to allow binding to an address in order to support sending from a specific address. Please see https://github.com/pycom/pycom-micropython-sigfox/pull/234
I was looking into adding support for multiple sockets, but I haven't come up with a clean way to do that yet. My best guess at it would require a packet queue per socket and I don't really want to do that without variable-length messages in the queue and that would involve mutexes and some error-prone code. That may still be a reasonable thing to do, but looks like it is more than an evening's effort.
-
hi @mgranberry, and thanks for your interest on Lora Mesh!
While the new doc gets fully updated, the old docs can still be found here: https://development.pycom.io/v/development_release/tutorials-and-examples/lora/lora-mesh
Bind does not support an IP address, by default all openthread network interfaces(unicast and multicast) are listening to the incoming packages.
Also, I did not consider multiple sockets, this is on my list.
Depends how development goes, I might release new mesh features until end of 2018.