Ticket #24286

Sending with Y-Modem fails with u-boot (intermittent)

Open Date: 2011-01-31 22:31 Last Update: 2012-05-14 01:09

5 - Medium
5 - Medium
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)



sending a file with Y-MODEM is failing quite often when the target is u-boot (2010-12 version) but it is working all the time with HyperTerminal (to my great dismay).

With a serial port monitor, I noticed that TeraTerm is not waiting for the first 'C' to start sending the first block. It is looking like its not flushing its receive buffer before starting.

Ticket History (3/17 Histories)

2011-01-31 22:31 Updated by: damorin
  • New Ticket "Sending with Y-Modem fails with u-boot (intermittent)" created
2011-03-17 22:47 Updated by: (del#24082)
  • Owner Update from (None) to yutakapon

Hi damorin,

Would you please retrieve the YMODEM log to investigate your problem? Please turn on the YmodemLog entry in the teraterm.ini file. So, Tera Term will log the YMODEM data to the YMODEM.LOG file.

2011-03-18 23:10 Updated by: damorin

See attached file.

The download speed was 115200 bits/sec, 8n1.

2011-03-20 02:01 Updated by: (del#24082)

Thank you for your attached file. I have checked the file. It seems that the u-boot does not send the ACK(06h) to the Tera Term. First, Tera Term received the 'C'(43h) and sent the first block. Next, Tera Term received not ACK but 'C' character.

2011-03-20 12:41 Updated by: (del#1144)

I checked the source code of u-boot.

It seems to be able to output debug string.
If possible, could you show debug output of ymodem transfer, when TeraTerm and HyperTerminal?
Or the log file of PortMon(http://technet.microsoft.com/en-us/sysinternals/bb896644) might useful to check the difference between TeraTerm and HyperTerminal.

To yutakapon
u-boot のソースで、u-boot 側の動作が TeraTerm の動作とマッチしないところはありますか?

2011-03-21 18:23 Updated by: (del#24082)

Hi damorin,

I found a bug regarding sending block1 is timing, and then I have fixed the bug in the following archive:


Would you please evaluate the archive?

TO: Maya-san, u-bootのソースコードを参照し、それがヒントとなったようです。どうもありがとうございます。 これで対u-bootで貫通してくれればよいのですが。

2011-03-21 21:53 Updated by: damorin

Hi yutakapon,

I did 15 YMODEM "send" and no problem at all.

Looking like the bug is fixed.


2011-03-21 22:57 Updated by: (del#24082)
  • Milestone Update from (None) to Tera Term 4.70 (closed)
  • Ticket Close date is changed to 2011-03-21 22:57
  • Status Update from Open to Closed
  • Resolution Update from None to Fixed

Hi damorin,

Thank you for your quick response. I close this ticket.

2012-05-10 02:20 Updated by: None

This bug is still occurring in latest trunk of TeraTerm on Windows XP SP3, but not on Windows 7 / Vista.

Is there any way to make the snapshot available for re-download so the code fix can be reviewed and redone?

2012-05-10 03:54 Updated by: damorin

Reply To None

This bug is still occurring in latest trunk of TeraTerm on Windows XP SP3, but not on Windows 7 / Vista. Is there any way to make the snapshot available for re-download so the code fix can be reviewed and redone?


a few technicians complained about that but it's difficult to reproduce with the latest release.

I will give it a try with the latest snapshot.

2012-05-14 01:09 Updated by: (del#24082)

Hi everyone,

If Tera Term has your problem regarding the YMODEM transfering, I will fix the problem. Plase send the YMODEM log if your problem reproduce.


2012-05-23 01:19 Updated by: mightybatgar

I just added 2 attached YMODEM logs that show the failed WinXP and succeeded Win7 YMODEM transfer with uboot.

Unfortunately, these logs aren't conclusive and look clean.

When we pull logs from the uboot device, we find an extra null character at the end of the 1024 packet at hex 0x400 in the packet.

This doesn't occur with 128 byte transfers. It doesn't occur with 1K YMODEM transfers on Windows 7 using TeraTerm.

Is there something in the SetupComm or other Windows API calls to initialize the COM port which causes a null pad, then eventually leads to a checksum failure?

I will attach a screen shot of our Win7 / XP remote logs as well.

Thanks for any help, --MightyBatgar

2012-06-06 03:48 Updated by: None

It turns out that there was an XP hot fix that started to insert zero length packets into the USB stream if the bytes being transferred was an even multiple of 64 for the usbser.sys driver. http://support.microsoft.com/kb/943198

The default is to NOT insert zero length packets into the USB stream for XP and I think every other Windows OS (including 7 and Vista).

To fix, all I had to do was change the max packet size that TeraTerm sends from 1024 to 1023.

Attachment File List


You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login