Using UDP to transfer files between mesh gateway and end-nodes

I am looking into how best to transfer files - bitmap/.bmp - most likely 4K bytes in size from a gateway (could be Argon, Boron or Ethernet Xenon) to mesh end node devices. I am not sending files from the internet to the end node, only to the gateway and then I need a mechanism to safely transfer to the end nodes. This will be a broadcast type update. I can find software written in C for UDP file transfer but no libraries on Particle and wondered if the Community could provide any advice? Thanks

Have you seen this thread by @rickkas7? It may help...

2 Likes

No I hadn’t - thanks for pointing it out to me! Unfortunately, it is not a solution for sending/receiving between mesh devices, at least as I understand the tutorial. I could use multiple mesh.publish() - splitting the file into packages that can be base64 encoded and fitted in 255 bytes. Just wondered if anyone else had thought how best to do this.

Rick also illustrates how to communicate via UDP in that post.
You want to look at the bidirectional UDP sample to cut out the need for a node server.

@ScruffR I saw the bidirectional example - this requires a small node.js server. I am interested in a broadcast to the end node. I will ping Rick - using mesh.publish() is probably the best approach for now - is the data packet limited to 255 bytes or 622 bytes? Documentation says 255.

Currently it still is 255 but I think that's going to change

Thanks :slight_smile: