From: Wolfgang Denk Date: Fri, 12 Mar 2004 01:51:30 +0100 Subject: [U-Boot-Users] Command line parsing question In-Reply-To: Your message of "11 Mar 2004 18:41:08 EST." <1079048468.9835.35.camel@localhost.localdomain> Message-ID: <20040312005135.66EB9C0655@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Jeff, in message <1079048468.9835.35.camel@localhost.localdomain> you wrote: > > When I type in commands at the command prompt and hit enter, some of the > commands are getting run twice. U-Boot just executes the commands it gets told. > One thing to note about my setup is that I am accessing the serial > console using telnet over a remote serial devices server. So the whole > telnet end-of-line issue and the processing of CR,LF, and NUL come into > play. I know this problem well. I have seen it before. Your terminal server is misconfigured. We use a couple of terminal servers ourself, and for example I never got a MAXSERVER running correctly. > Snooping the network and watching the character counts on the seriver > server's serial port, I can see that each time I hit there are > two characters going over the serial line (CR-LF or CR-NUL) to the > target. Yes, this is what I've seen, too. > 1) Has anybody else encountered this problem? I already googled for an > answer but came up with nothing. I know this problem all too well. > 2) Does anybody have any idea why some commands are working and others > are not? I would expect that either all would be repeated or none of > them would be repeated. U-Boot knows at least 3 different ways to respond to an empty input line: * after "non-critical" commands like "version": repeat the command * after "critical" commands like "erase": do nothing * after some special commands like "md", "mm" etc.: repeat command for the next address(es) In your case, the '\0' character confuses U-Boot. You can try playing with telnet options (try setting "mode character" in your telnet session), but you will have to repeat this for each new session. In my case I never was able to get such a system working as intended. I finally gave up and bought a different (known to be working) type of terminal servers. Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de "... freedom ... is a worship word..." "It is our worship word too." -- Cloud William and Kirk, "The Omega Glory", stardate unknown