From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] Redboot: [xyz]modem via TCP? Date: Wed, 18 Apr 2001 11:02:00 -0000 Message-id: <20010418130326.A20958@visi.com> References: <20010206193724.58B8B7A814@visi.com> <20010208163254.A3275@visi.com> X-SW-Source: 2001-04/msg00173.html > > 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