Comments (3)
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.
from node-nrf24.
@ludiazv Thank you very much for the detailed in-depth answer.
FYI:
I'm trying to make an audio transmitter that transmits the microphone signal from a raspberry pi to another raspberry pi. Currently I'm trying to transmit the raw signal, but maybe that won't work.
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.
from node-nrf24.
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,
from node-nrf24.
Related Issues (20)
- Traing to llisten to slave, or prhebs make some radio scanner HOT 7
- Does not work with node 12 HOT 7
- test_simple.js Syntax error HOT 1
- [Question] installation of NRF24 libs HOT 8
- Most settings not being displayed correctly HOT 4
- NPM Install fails HOT 4
- Hardware Not Found HOT 2
- Advanced features - Dyn Payloads + Ack payload HOT 3
- Reading strings and converting C++ structs HOT 2
- build with RPi driver : radio not working or in use HOT 12
- Channel 0 doesn't work HOT 2
- Changing Channel After Initialization HOT 1
- GettingStarted.js cannot read more than the first 4 bytes on the buffer HOT 2
- ASUS Tinker board CE HOT 2
- Error writing to pipe depending on scope HOT 2
- Writing fail on nRF24L01+ with raspberry pi zero W and arduino pro mini HOT 2
- Installation failure on lastest nodejs version (v16) HOT 1
- Sending fails, wrong pin? HOT 1
- Installation falilure HOT 3
- usb adapter HOT 1
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 node-nrf24.