two arduinos, two nRF24L01 modules, one large file

Hi, I have a project which involves an Arduino connected to an SPI camera module. The camera generates image that are 40ish k in size.

Using the arduino, I can grab that image, 32bytes at a time from the cameras buffer. I would then like to send the 32b over to a spark core with a nRF24L01 attatched. The spark cores job is to FTP those 32b to a server.

So, I decided not to use any libraries for the nRF24L01 because I want to communicate between two dissimilar micro boards. I read up on the nRF24L01 and watched some youtube videos and now have a system working(ish)

The thing is this, I have a loop on the arduino which :

1) reads 32bytes from the camera 2) sends the 32b to the spark core via the nRF24L01.

the loop then itterates until all the bytes have been read from the camera and sent via the nRF24L01.

On the recieving side, the spark core also has a loop, this loop :

1) polls the RX_DR register bit, ie the one that says there was data recieved. 2) if there was, it grabs the 32b recieved and ftps it. It then continues to poll RX_DR

The problem is that I am in a bit of confusion as to how to control the timing of these two loops.

The Spark core has to do the ftp bit but maybe the arduino will continue to fire 32b irrespective of whether the spark is busy or not.

I thought that maybe a soluton was to utilize the shockburst feature of the nRF24L01 but that would only tell the arduino that the data was sent succesfully, not that its ok to send further data as the spark has finished processing the previouse lot.

I would like to know if I should design my own protocol to enable these two to play nice, ie, the following :

1) the tx sends data 2) the rx recieves the data 3) the rx processes the data 4) the rx sends the tx the "ok, send more data" flag 5) the tx sends more data and so on.

Does anyone have any advice on this, I am quite new to these nRF24L01 and just learning to use them via setting registers was difficult but through perserverence I have got there, debugging is a pain too as I can never be sure if a problem is on the tx side or the rx side slowing my progress somewhat.

Thanks for reading, Rick.

Ok, so I've decided that I should manage the transfer myself. I want to send a sort of ack to the sender once the reciever has finished processing the previouse data.

I am using pipe one with a 32byte payload to send/recieve the data itself. I could, I thought, use the same pipe to send the ack back to the sender but then the ack would have to be 32bytes or I'd have to resize the payload size of pipe one.

Instead, I think I will use pipe 2 with a payload size of maybe three bytes. That way I can calculate some kind of crc and send it as an ack over pipe 2 in three bytes.

I have the code typed up but my ack isnt firing the RX_DR flag for some reason. Just thought I'd fill in the thread with my current thinking so people can advise if possible :), thanks for reading guys.

Guess too late to even share views now, but confronting the same issue (FTP over nrf24L01p), I think I will carry forward your method by calling RF24::stoplistening() at the receiver every time a packet is received and enable RF24::startlistening once the data is written to the SD card. Meanwhile the transmitter with acknowledgement enabled and retires set for a max of say 6 over a gap of 500ms i.e RF24::setRetries(6,2).

Definitely this approach will slow down the transfer but for my purpose all i need is a transfer

There is an example for large file transfers included with tmrh20's library

Guys, this Thread was 3 years dead. :)

...R

Are you able to share the code you made in the first place? I know this thread is super old, but i am gathering info for compile a working solution similar to yours...

SamIAm93: There is an example for large file transfers included with tmrh20's library

Can't find that. Are you able to point me in the right direction?

alkuentrus: Are you able to share the code you made in the first place?

Did you not read Reply #4?

This thread is now 5 years dead. I you have more questions just start your own Thread (Topic).

...R Simple nRF24L01+ Tutorial

Robin2: Did you not read Reply #4?

This thread is now 5 years dead. I you have more questions just start your own Thread (Topic).

...R Simple nRF24L01+ Tutorial

Sorry Robin2, i didn't mean to seem lazy ou not concerned about this subject, it's just that I'm trying to gather as much information as I can. I will carefully read your code and in case I need anything, will open a new topic. Thanks again for your help!