Git Product home page Git Product logo

Comments (5)

RodrigoMateus avatar RodrigoMateus commented on August 20, 2024 1

Hi, Ruben,

I implemented a very similar solution. The only difference is that I use ZIP compression of the String, in addition to reducing the size of the message, I can check the integrity of the file on the target. It worked very well.

Best regards.

from xbee-java.

rubenmoral avatar rubenmoral commented on August 20, 2024

Hi @RodrigoMateus,

I'm not sure if this is a common use case for XBees. Anyway, a possible solution would be to encode the image to base64, split the resulting string, and send the chunks using one of the sendData() methods. Then, in the receiver module, you should combine the chunks to get the original string and finally decode the image.

Best regards.

from xbee-java.

brunoaduarte avatar brunoaduarte commented on August 20, 2024

Hi @RodrigoMateus , i need to provide a very similar functionality to my system, but instead of 100 Kb i need to transfer 30 MB images. Can you share the solution you created ? Thanks

from xbee-java.

RodrigoMateus avatar RodrigoMateus commented on August 20, 2024

Hi Bruno,

To send a large file, I serialize it to byte [] and divide into 250 byte parts (for XTend radios). Then I send each part using the method "DigiMeshDevice.sendExplicitData(remoteXBeeDevice, sourceEndpoint, destEndpoint, clusterID, profileID, date)" where:

DestEndpoint = defines the message id.
ClusterID = defines the number (sequence) of the part.
Data = byte [] part.

As messages are received, I will copy each part into a byte []. I use the above parameters to join the parts in the correct way. At the end, I deserialize this byte [] to get the original file.

There are several ways to implement this, depends on the number of radios, whether the messages are sent in sequence, whether there is error handling, etc., this is just a general idea.

I hope I have helped.

from xbee-java.

brunoaduarte avatar brunoaduarte commented on August 20, 2024

Thank you @RodrigoMateus !

from xbee-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.