Author Topic: YMODEM protocol problem with Virtual COM  (Read 11864 times)

Mikle

  • Member
  • ***
  • Posts: 4
YMODEM protocol problem with Virtual COM
« 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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: YMODEM protocol problem with Virtual COM
« Reply #1 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

Mikle

  • Member
  • ***
  • Posts: 4
Re: YMODEM protocol problem with Virtual COM
« Reply #2 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?
« Last Edit: April 29, 2012, 03:08:26 am by Mikle »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: YMODEM protocol problem with Virtual COM
« Reply #3 on: April 29, 2012, 10:31:09 am »
Ymodem requires responses from the receiver:

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

Jan

Mikle

  • Member
  • ***
  • Posts: 4
Re: YMODEM protocol problem with Virtual COM
« Reply #4 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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: YMODEM protocol problem with Virtual COM
« Reply #5 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

Mikle

  • Member
  • ***
  • Posts: 4
Re: YMODEM protocol problem with Virtual COM
« Reply #6 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
« Last Edit: April 30, 2012, 07:48:43 am by Mikle »