public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Command line parsing question
@ 2004-03-11 23:41 Jeff Angielski
  2004-03-12  0:51 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Angielski @ 2004-03-11 23:41 UTC (permalink / raw)
  To: u-boot

u-boot-1.0.0/MPC8260 custom board

When I type in commands at the command prompt and hit enter, some of the
commands are getting run twice.

For instance, version gets run twice while an md runs only once.

=> version
version
 
U-Boot 1.0.0 (Mar 11 2004 - 12:24:15)
=>
 
U-Boot 1.0.0 (Mar 11 2004 - 12:24:15)
=> md 0x0 1
md 0x0 1
00000000: ff000000    ....
=>

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.

Snooping the network and watching the character counts on the seriver
server's serial port, I can see that each time I hit <Enter> there are
two characters going over the serial line (CR-LF or CR-NUL) to the
target.

My questions are:

1) Has anybody else encountered this problem?  I already googled for an
answer but came up with nothing.

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.


Thanks,
Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Command line parsing question
@ 2004-03-12  0:30 Rune Torgersen
  0 siblings, 0 replies; 4+ messages in thread
From: Rune Torgersen @ 2004-03-12  0:30 UTC (permalink / raw)
  To: u-boot

I just had the same problem today.
In our case, turning off CR/LF and only sending ^M helped.

As to why only some commands get run twice:
The longer commands stops the serial port polling long enough that uboot
drops the the LF after getting the CR.
The shorter ones finish faster, and the last character gets interpreted
as a nev return.


> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net 
> [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf 
> Of Jeff Angielski
> Sent: Thursday, March 11, 2004 17:41
> To: u-boot-users
> Subject: [U-Boot-Users] Command line parsing question
> 
> 
> 
> u-boot-1.0.0/MPC8260 custom board
> 
> When I type in commands at the command prompt and hit enter, 
> some of the commands are getting run twice.
> 
> For instance, version gets run twice while an md runs only once.
> 
> => version
> version
>  
> U-Boot 1.0.0 (Mar 11 2004 - 12:24:15)
> =>
>  
> U-Boot 1.0.0 (Mar 11 2004 - 12:24:15)
> => md 0x0 1
> md 0x0 1
> 00000000: ff000000    ....
> =>
> 
> 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.
> 
> Snooping the network and watching the character counts on the 
> seriver server's serial port, I can see that each time I hit 
> <Enter> there are two characters going over the serial line 
> (CR-LF or CR-NUL) to the target.
> 
> My questions are:
> 
> 1) Has anybody else encountered this problem?  I already 
> googled for an answer but came up with nothing.
> 
> 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.
> 
> 
> Thanks,
> Jeff
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President 
> and CEO of GenToo technologies. Learn everything from 
> fundamentals to system 
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Command line parsing question
  2004-03-11 23:41 [U-Boot-Users] Command line parsing question Jeff Angielski
@ 2004-03-12  0:51 ` Wolfgang Denk
  2004-03-12  2:47   ` Cam
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2004-03-12  0:51 UTC (permalink / raw)
  To: u-boot

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 <Enter> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] Command line parsing question
  2004-03-12  0:51 ` Wolfgang Denk
@ 2004-03-12  2:47   ` Cam
  0 siblings, 0 replies; 4+ messages in thread
From: Cam @ 2004-03-12  2:47 UTC (permalink / raw)
  To: u-boot

Wolfgang

>>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.

[...]

> 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.

I don't have a solution but have seen exactly the same problems with 
uboot-1.0.0, custom 8270 based board. The terminal server in question is 
the one built into the otherwise excellent BDI2000 probe.

We chose to put up with the quirks as they are only ever seen in 
development (not deployment).

Regards,

-Cam

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-12  2:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11 23:41 [U-Boot-Users] Command line parsing question Jeff Angielski
2004-03-12  0:51 ` Wolfgang Denk
2004-03-12  2:47   ` Cam
  -- strict thread matches above, loose matches on Subject: below --
2004-03-12  0:30 Rune Torgersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox