Forum

XModem transfer
 
Notifications
Clear all

XModem transfer

0 Posts
2 Users
0 Reactions
597 Views
(@Rogov)
Active Member
Joined: 14 years ago
Posts: 3
Topic starter  

Hello. I use an Absolute telnet 9.12 Lite and have a problem with transmitting XModem files.
My receiver is the ARM board, connected with PC via RS232.
Transmitting is sometimes breaked due to a lot of NAK from receiver, sometimes finished, but with repeat packets.
Transmitting using HyperTerminal is always OK.

From the log it can be seen that AT sends 1st packet, then repeat it without ACK from the receiver.
Transmittion is always OK, if after Send->XModemCRC I quickly (<1sec) choose a file to transmit.
In this time receiver sends 'C' with 1sec period. So, may be AT perceives 'C' as answer on 1st packet? And because it is not a ACK, send repeat packet.

Log in attached file.

Sorry for my english. [file name=errlog_AT.txt size=6125] http://www.celestialsoftware.net/images/fbfiles/files/errlog_AT.txt [/file]


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

Sure, I'll look into it.

Thanks for the excellent logfile!

Brian


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

Who implemented the code on the receiver side?

Brian


   
ReplyQuote
(@Rogov)
Active Member
Joined: 14 years ago
Posts: 3
Topic starter  

Receiver's code is written by me, so it can contain bugs. But it's behavior looks correct in logs.


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

Generally, the receiver should not worry about packets being sent multiple times. That is why they are sequenced. You can just discard the second one. Remember, XModem is written to be used across an unreliable medium, such as RS232. Your code should be able to deal with both lost and duplicated packets.

Hyperterminal may give you the ideal scenario where you get each packet once, but you can hardly rely on that behavior, especially with larger files and longer transmission times.

Brian


   
ReplyQuote
(@Rogov)
Active Member
Joined: 14 years ago
Posts: 3
Topic starter  

Receiver's code ignore repeat packet after correct packet. But problem is that transmitter send repeat packet without waiting answer. My code is not send ACK, while handling packet.


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

In a robust implementation, it shouldn't matter. Just discard the duplicate and move on.

Brian


   
ReplyQuote
Share: