Go Down

Topic: File transfer over xBee (Read 803 times) previous topic - next topic

fnsnoop

I am looking for a script that demonstrates transferring a basic text file over xbee and storing it to SD.  I have started programming some lines and I am seeing a huge challenge here working with ram and the order of packets arriving. 

PaulS

Quote
I am looking for a script that demonstrates transferring a basic text file over xbee and storing it to SD.  I have started programming some lines and I am seeing a huge challenge here working with ram and the order of packets arriving. 

What is sending the file? Are you using the XBee library, or simple AT mode?

The XBee should handle putting the packets it gets on the serial port in the correct order, if you are using AT mode, so that shouldn't be a concern.

fnsnoop

I am trying to transfer a small file from one arduino to another over xBee. I am using the xBee library.  The file would need to be broken up into smaller chunks as the xBee payload isn't that large.  One of my concerns is that packets may not arrive in the same order if other xBees are forwarding the packets.  Or one packet could be dropped. 

PaulS

Quote
Or one packet could be dropped. 

No. The XBees keep trying to resend packets until the packet gets through.

You could have the receiver send a confirmation before sending another packet. That way, the order of the packets would be guaranteed. It's not as fast, but it eliminates a worry.

fnsnoop

That was my thinking. I feel like this has been done before.  I am not trying to reinvent the wheel here.  Is there code out there already?

Go Up