-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
How to send big buffers (4000 bytes) #2
Comments
32 bytes is hardware limit for a single frame. There is no way to send more than that in a single frame. This is typically called MTU in network protocols. For this radios the MTU is 32. For sending 4K you need to implement fragmentation of the data in 32bytes chunks/fragments. A simple way could be to add a 2-byte header in your payload with the packet number & data length. On transmission, split the original buffer in 30 byte chunks, pack each pakcket with the header and write each packet to the radio. You shold implement controlled retry sending each chunk On the receiver, defragment the sequence controlling the order and the size of each chunk. |
@ludiazv Thank you very much for the detailed in-depth answer. FYI: The maximum speed of this module is 2 Mbps = 250 kB/s am I right? That means 25000 / 32 Byte = ~781 Frames per Second. The raw signal currently is ten times this big. Conclusion; I have to compress the signal. |
Audio streaming is possible with this radios. I think that a better approach is not compressing but down-sampling the audio signal and send over the radio allowing some packets to be loss. With compression this could more complex. In principle an audio signal from 13-40khz could be transmited depending on the speed. Check this information: https://tmrh20.github.io/RF24Audio/ Regards, |
Hi @ludiazv,
I'm having a problem. I need to transmit buffers with a size of 4000 bytes. This package can't transmit more than 32 bytes.
Do you have any idea or hint how to transmit bigger buffers?
The text was updated successfully, but these errors were encountered: