Transfer big packets with nrf24l01

Hey,
any idea how to transfer an array of uint16_t with 400 elements via nrf?
break down to small packets doesnt help because it usually failed after a few transfers and also takes too much time for my project

thanks

break down to small packets doesnt help

You need to fix the underlying problem, then.

and also takes too much time for my project

You need:

  1. faster radios,
  2. faster code,
  3. and/or more realistic expectations.

I'd try to figure out why it fails, or find another medium.

takes too much time for my project

That means something to you, but virtually nothing to us
Milliseconds? Hours? Months?.

I want to transfer an AC code, which is something like 300 elements long.
The code is inside an uint16_t array, which means its 600 bytes.
I need to divide it to 32 bytes packets, which means i need 19 packets. Lets say 500 milliseconds delay between each packets (I have to wait for an ack or it wont be reliable), it means 9.5 seconds for one operation (!!)
There has to be an other way

There has to be an other way

Why do you need to send the array of data? The array represents one button on a remote. You should figure out what that button is, and send one value - which button was pushed. The other device should know what to blink at the AC to do whatever button 3 means, while you only need to send 3 over the radio link.

smarthings:
I need to divide it to 32 bytes packets, which means i need 19 packets. Lets say 500 milliseconds delay between each packets

Where does the 500 millisecs come from? An nRF24 message plus its auto-ack should take less than 5 millisecs.

Make sure to include in each message some means to know where it should be positioned within the 19 messages.

If you need more help post your programs.

...R
Simple nRF24L01+ Tutorial

PaulS:
Why do you need to send the array of data? The array represents one button on a remote. You should figure out what that button is, and send one value - which button was pushed. The other device should know what to blink at the AC to do whatever button 3 means, while you only need to send 3 over the radio link.

I can't send just the specific button, because each button has its own code, and in ACs each button sends all the data to the AC, ie turn on, cold, 3 fan, and else..

Robin2:
Where does the 500 millisecs come from? An nRF24 message plus its auto-ack should take less than 5 millisecs.

Make sure to include in each message some means to know where it should be positioned within the 19 messages.

If you need more help post your programs.

...R
Simple nRF24L01+ Tutorial

When i try to send multiple packets, say 10 packets without even an ack, i'm losing like 2 or 3 on the way..

I can't send just the specific button, because each button has its own code, and in ACs each button sends all the data to the AC, ie turn on, cold, 3 fan, and else..

What the receiving device sends to the AC does NOT have to match what the sender sends to the receiving device.

If you matched what you receive from the remote to what you expect from button n, all you need to send is n. The other device, when it gets n, needs to know to send a whole lot of data. It does NOT need to get that data from the radio.

PaulS:
What the receiving device sends to the AC does NOT have to match what the sender sends to the receiving device.

If you matched what you receive from the remote to what you expect from button n, all you need to send is n. The other device, when it gets n, needs to know to send a whole lot of data. It does NOT need to get that data from the radio.

What you are trying to say is to save all the AC codes on the arduino and just send a number or a letter to let the arduino pick and send the specific code?
if yes, than its not possible because the arduino doesnt have enough memory for that.. and thats beside the fact that every AC has its own codes..
if not, i didn't understand you.. can you explain again?

if yes, than its not possible because the arduino doesnt have enough memory for that

This is (mostly) constant data, which would live in flash memory.
Are you sure you have tried as hard as you can to store it only on the Arduino?

I suspect not.

You can add external eeprom and the likes to store your 'AC' codes. Is 256kByte enough? If not, you can double it by using two or you can expand using some logic and the sky will be the limit :wink:

Actually i've already thought of your solutions, but the problem is that those solution would work only if im planning on using the same AC all the time, but what i would like to do is to make it universal for all ACs so i have to send the codes from the cloud to the arduino

I don't get why time is so critical.
You buffer on the receiver until you have a valid code, then send it.
You shouldn't be sending it as it is being received.
I bet there's a huge saving you could make - most of the IR codes I've seen could be easily factored, but no-one ever seems to bother.

When you get a code from an arbitrary AC's remote you cant perform too much savings, because you dont know what to expect.. what is the max pick? what is the min? what is the length?

smarthings:
When you get a code from an arbitrary AC's remote you cant perform too much savings, because you dont know what to expect.. what is the max pick? what is the min? what is the length?

How do you know? What have you tried?

smarthings:
When i try to send multiple packets, say 10 packets without even an ack, i'm losing like 2 or 3 on the way..

How do you expect us to comment on that when you have not posted your code.

...R

Robin2:
Where does the 500 millisecs come from? An nRF24 message plus its auto-ack should take less than 5 millisecs.

Make sure to include in each message some means to know where it should be positioned within the 19 messages.

If you need more help post your programs.

...R
Simple nRF24L01+ Tutorial

5 millisecs?? where did you get that from?

smarthings:
5 millisecs?? where did you get that from?

Measurement.

Record the value of micros() immediately before you send a message and immediately after the auto-acknowledgement is received.

...R

TolpuddleSartre:
How do you know? What have you tried?

What do you mean how do i know? I'm investingeting this project for almost 6 month.. believe me, i know what i'm saying

Robin2:
How do you expect us to comment on that when you have not posted your code.

...R

I'm not using any special code, just the examples code to transmit and receive

Robin2:
Measurement.

Record the value of micros() immediately before you send a message and immediately after the auto-acknowledgement is received.

...R

I don't think you understand what i've meant.. The transmit packeges are sending very fast but at least one or two from ten are failed

smarthings:
What do you mean how do i know?

I think those words are pretty self-explanatory, but I'll try to paraphrase - "What approaches have you attempted, how did they fall short of your expectations, can you demonstrate to us some of these attempts?"

Clear now?