Pages: [1]   Go Down
Author Topic: File transfer over xBee  (Read 634 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46042
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46042
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: