Comments (3)
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.
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.
A patch for this issue has been merged into master. Closing...
from tinylora.
Related Issues (18)
- create object instantiator for CS and IRQ pins HOT 1
- information on disabling Frame Counter Check HOT 2
- Broken links HOT 2
- Starting LoRa...Failed HOT 3
- comment out all prints HOT 1
- TinyLora with Feather Mo LoRa - Starting LoRa...Failed HOT 30
- use SPI transactions HOT 1
- Lose packets LoRa 32u4 ll HOT 5
- AS923 Frequency table
- TinyLora Downlink functionality HOT 1
- power off/standby api before putting arduino to sleep? HOT 2
- "Starting LoRa...", "Failed" HOT 8
- DEEPSLEEP Arduino Pro mini
- Wrong australian frequencies
- allow multi/single channel selection via function not #define HOT 3
- add doxygen/travisCI HOT 1
- problems compiling for feather M0 Express HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinylora.