This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Redboot: [xyz]modem via TCP?
- To: ecos-discuss at sources dot redhat dot com
- Subject: Re: [ECOS] Redboot: [xyz]modem via TCP?
- From: Grant Edwards <grante at visi dot com>
- Date: Wed, 18 Apr 2001 13:03:27 -0500
- References: <20010206193724.58B8B7A814@visi.com> <20010208163254.A3275@visi.com>
> > With Redboot, can you do [xyz]modem download via TCP instead of
> > serial port?
>
> I slapped together a Python program that uses "sx" to download
> an S record file via TCP using xmodem protocol. Small files
> (less than 2K or so) work fine, but when I get up to about 2K,
> RedBoot crashes. I can load thelarge files fine via TFTP and
> xmodem/serial.
I've been messing around with this intermittently for a few
days and haven't made any progress. I had to disable the
telnet command character processing in net_io.c so that x-modem
packets are allowed through "raw". After that I can download
some files, but not others. With DEBUG enabled in xyzModem.c,
I get errors because things (e.g. the ram_start variable) is
being overwritten by data from x-modem packets. With DEBUG
disabled, I get different error behavior. There must be a
buffer overflow somewhere, but I havn't been able to find it.
I've noticed that if the s-record code decides to give up, the
x-modem link isn't shut down gracefully and the other end keeps
sending retries that are interpreted by RedBoot as commands.
That's not very easy to fix since the s-record routines only
have a "getc()" routine to call and no way to shut down the
transfer when an error is detected.
Since x-modem won't work due to telnet command processing
anyway, I think I'm going to try a third "direct" mode where
the s-record file is accepted directly rather than being
encapsulated in x-modem packets.
--
Grant Edwards
grante@visi.com