Coder Social home page Coder Social logo

Comments (3)

brentru avatar brentru commented on July 19, 2024

There are many ways to deal with this. We could have sendData make a local copy of the message, but that is a potential waste of up to 252 bytes.

Thank you for reminding me about this, I remember we spoke about this issue a few weeks back.

I opened a new branch for this issue (https://github.com/adafruit/TinyLoRa/tree/fix-encrypt) which copies over the packet to in lora.sendData(data) to a new character array which is fed as an argument to the Encrypt_Payload function and doesn't modify the original Data value sent through sendData().

Tested on my Feather 32u4 and TTN and received the same payload back every frame, instead of garbled like before.

from tinylora.

jerryneedell avatar jerryneedell commented on July 19, 2024

In the "fix-encrypt" branch the tmpData can only handle a fixed size 10 byte message. This needs to handle any message length up to the maximum of 252 byte (I think).
I'm still not convinced that sendData needs to be changed to make a copy- I think it better to have the user take responsibility for creating a fresh packet for every transmission. I don't think this is a real burden since most uses would likely involve changing data from sensors and would be different for every packet anyway.

from tinylora.

brentru avatar brentru commented on July 19, 2024

A patch for this issue has been merged into master. Closing...

from tinylora.

Related Issues (18)

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.