PORTS Forum

Ports and Interfaces => USB => Topic started by: Mikle on April 25, 2012, 02:25:14 am

Title: YMODEM protocol problem with Virtual COM
Post by: Mikle on April 25, 2012, 02:25:14 am
I encountered a strange problem that occurs when implementing a virtual com port.
Virtual port is functioning normally, but when I send a file from hyper terminal using YMODEM protocol, then nothing happens.
There is not any interrupt USB. HyperTerminal after the timeout sends a code of 0x18 (CAN).
And as with all other terminals. No change in what the options do not affect the result.
I used the example of the STM.
Title: Re: YMODEM protocol problem with Virtual COM
Post by: Jan Axelson on April 25, 2012, 10:22:28 am
If you can't send anything from hyperterminal, check all of the port settings in hyperterminal. 

Jan
Title: Re: YMODEM protocol problem with Virtual COM
Post by: Mikle on April 29, 2012, 03:02:23 am
I get the characters from the hyperterminal in my USB virtual COM application, but did not get any character when I send a file by YMODEM protocol.
А feeling that the transfer does not start at all.
Is it possible that the YMODEM try to reads the signals of modem that are not exist physically?
Title: Re: YMODEM protocol problem with Virtual COM
Post by: Jan Axelson on April 29, 2012, 10:31:09 am
Ymodem requires responses from the receiver:

http://www.techfest.com/hardware/modem/xymodem.htm

Jan
Title: Re: YMODEM protocol problem with Virtual COM
Post by: Mikle on April 29, 2012, 12:29:21 pm
The problem is that if I send a file from hyperterminal  using Ymodem protocol, at a reception I do not get a single character.
Тhere is no start file transfer. If the file is sent as text from hyperterminal to my embedded Apps is no problem.
Title: Re: YMODEM protocol problem with Virtual COM
Post by: Jan Axelson on April 29, 2012, 02:31:22 pm
I'm not an expert on ymodem, but take a look at the reference I suggested above, in particular:

6.3.2  Receive_Program_Considerations
The receiver has a 10-second timeout.  It sends   a <nak>   every time it
times out.  The   receiver's first timeout, which   sends a   <nak>, signals the
transmitter to start.  Optionally, the receiver   could send a <nak>
immediately, in   case the sender   was ready.

Jan
Title: Re: YMODEM protocol problem with Virtual COM
Post by: Mikle on April 30, 2012, 07:16:10 am
Hi Jan,
I read a bad description of the protocol.
Тhe receiver really needs to send at the beginning of the character "C" to the transmitter in case 1k ymodem
If it does not make the transmitter does not begin the session.
Thank you