-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoRa Communication can't handle large packets #69
Comments
This is almost certainly due to the limits on packet size imposed by Radiohead's (the library we use for LoRa) RF95 implementation which maxes out at 251 bytes. Some possible solutions include:
For the time being, we are going to have to recommend that users do their best to check that the data they are shipping out is the minimum viable if packet size is proving to be the limiting factor while our team figures out the best path forward and works to provide a fix. |
…ape hatch for SitkaNet to address #69
This problem will be addressed specifically in SitkaNet code by using an external process to compress the JSON into the minimum values needed before transmission. I created a pull request that allows the sketch to send/receive raw payloads for this purpose (#73), and will be working with @maxchu765 on SitkaNet individually. This will not address this problem in the general case, and a general solution is something Loom will need to consider in the future. |
Currently, there is an example code called Transmit_Raw and Receive_Blocking_Raw in the LoRa example that is based on the JSON translation function for all users for different projects. You can find this code in the SerialSensor Branch for now. We need to test it before we close the issue. It should be good. There are many comments that guide what to do so that people won't get lost with it. If there any help, they are going to make an issue on the GitHub page. Updates! |
It will now able to send the larger package size over Radio communication in the Commplat branch. Currently, there are some parts that need to be added into the code to make the performance better such as two nodes into one hub sending with larger package size or with batch sending, but the main problem of sending a larger package will be available. The maximum size is now can send up to 2048 bytes rather than 251 bytes. This will be updated on master in the next coming month. |
Updates for the changes that will happen for this issue and solve the main problem. Current Situation
If you are planning to send a large size package over LoRa or any kind of radio communication, please use this branch rather than the master branch because this will solve this current issue. Future plans
Developer Notes
If you have any ideas on how to answer these questions, please let me know! That would be great! |
The problem occurs when you measure the size of the received msgpack packet using this strlen call. Strlen is designed to iterate over a string until a null terminator ( |
After disgusting with other team members, we decided to let the end-user to limit the size of the JSON package sending and receiving. However, as I said before, the size has improved than before this was integrated. This will be merged into master soon! |
This is now in the master branch, |
Describe the bug
LoRa communication will fail when trying to transmit data from more than 3 sensors. The packet is too large for the receive to parse.
Hardware in Use
Feather M0 LoRa
Hypnos Board
I2C Multiplexer
I2C and Teros sensors
To Reproduce
Transmit data with 3 or more I2C sensors over LoRa. The receiver will show a "Failed to parse MsgPack" error.
Code
https://github.com/OPEnSLab-OSU/SitkaNet-2/blob/master/Node/Node.ino
Config
https://github.com/OPEnSLab-OSU/SitkaNet-2/blob/master/Node/config.h
The text was updated successfully, but these errors were encountered: