1

I have to send a file via serial port to my program that is running on an embedded device using HyperTerminal and XMODEM protocol. The serial communication is OK (9600 baud, 1 StopBit, No parity, 8 data bits, no flow control), because both sending commands and receiving answers work properly.

When I send the command "upload", the device answers when it's ready and waits for the file. In HyperTerminal, I then go to Transfer->Send File..., select a file and XMODEM protocol, then click "Send". After clicking send, the upload doesn't begin and appears a timeout message.

While debugging, I see that the program doesn't receive any byte from the serial port, but if I send a byte clicking a key the program receives it. Can I assume that the problem is that HyperTerminal doesn't send anything? Why is that?

Daniele Nardi
  • 35
  • 1
  • 6
  • You may want to re-word this question so that it is explicitly about software development. If you are developing the embedded device XMODEM code this may be a legitimate question, but on the face of it it is off-topic for SO, and likely to be closed. – Clifford Nov 14 '14 at 15:12
  • What do you mean with "re-word"? – Daniele Nardi Nov 15 '14 at 16:00
  • I mean re-write it in the manner described to make the question fit in the scope of StackOverflow. See http://stackoverflow.com/help/on-topic and http://stackoverflow.com/help/dont-ask. So far you have attracted one close vote, but that user unhelpfully chose not to comment to explain his objection. – Clifford Nov 16 '14 at 08:58
  • On reflecion, the question is probably OK, the phrase "While debugging, ..." indicates that this is a software development question, but that was perhaps lost amongst your paragraph-free text. – Clifford Nov 16 '14 at 09:03

1 Answers1

0

XMODEM transfer is initiated by the receiver rather than the sender. The transfer starts when the receiving device sends an SOH (XMODEM) or 'C' (XMODEM-CRC/1K). If the receiving end does not initiate the transfer, no transfer will occur.

You may find that you have to start the transfer from the sending end, then initiate the transfer at the receiver. Alternatively when waiting for the transfer the receiving end may repeatedly send teh start character until it gets a response (or times-out).

Clifford
  • 88,407
  • 13
  • 85
  • 165