Hello everyone,
now that mesh devices are soon shipping (I can’t wait to receive mines), do we have any info about the mesh API ?
Thanks a lot
Antonio
Hello everyone,
now that mesh devices are soon shipping (I can’t wait to receive mines), do we have any info about the mesh API ?
Thanks a lot
Antonio
The mesh devices behave like existing Particle devices that you are familiar with.
Your Particle.xxxxxx()
methods will still work on the mesh devices.
As for Mesh specific API, i have heard (in the keynote) that there will be:
Mesh.publish()
Mesh.subscribe()
This should be for doing local pub/sub within a mesh network
Thank you @kennethlimcp for your reply.
If would be great to have mesh.publish() and mesh.subscribe() available.
But that would mean one of the devices will act as a pub/sub server. Or not ? The gateway will act as a server ? And what about mesh network without a gateway ? Where would be saved the repository of topics ? A distributed one ?
Perhaps I’m missing something, but I actually don’t catch the architecture.
The mesh protocol is dealing with this. The commands mentioned by @kennethlimcp are just the easy to remember APIs to hand off the work to the OpenThread stack.
If you want to know exactly how things work you can read up on the OpenThread papers.
In a mesh network there are devices that take the role of routers and which of these devices will actually send the message to the device that's known by the mesh to be interested in it is non-deterministic - so no single pub/sub server will have to take the whole brunt of all the cross transfers within the mesh.
Mesh.publish uses UDP multicast so it does not require a gateway or a server to function. It works even on an isolated network of mesh devices.
Reading through OpenThread, and the IEEE spec, this look surprisingly like old X.25 mesh underneath. I’m going to try to master Pub/Sub while I’m waiting for my pre-order parts, and my Adafruit featherwings.