public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot]  Problems with NetConsole II
@ 2009-10-08  7:41 alex889
  2009-10-08  7:50 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: alex889 @ 2009-10-08  7:41 UTC (permalink / raw)
  To: u-boot


Hi,
I'm trying to run NetConsole, listen for incoming messages for 1 sec, and
continue according to the message type.
On the other side (PC) i'm sending a broadcast message on port 6666 every
250 ms.
What i see is a very unstable behaviour
Sometimes i get nothing, sometime only part of the message, and sometimes it
fails to continue..
I also tried to listen for 5 sec, and it looks a little better, but still
unstable behaviour

The code i use is:
setenv("stdin", "nc");
printk("waiting for network message...\n");
		
timeStart = get_timer(0);
while(1)
{
	c = getc();
	if(c != 0)
	{
		printk("%c", c);
		buffer[index++] = c;
	}
	if(index > 127)
		break;
	if((get_timer(0) - timeStart) > 5000)
		break;
}

Thanks,
Alex


-- 
View this message in context: http://www.nabble.com/-U-Boot--Problems-with-NetConsole-II-tp25799667p25799667.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

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

* [U-Boot] Problems with NetConsole II
  2009-10-08  7:41 [U-Boot] Problems with NetConsole II alex889
@ 2009-10-08  7:50 ` Wolfgang Denk
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2009-10-08  7:50 UTC (permalink / raw)
  To: u-boot

Dear alex889,

In message <25799667.post@talk.nabble.com> you wrote:
> 
> Hi,
> I'm trying to run NetConsole, listen for incoming messages for 1 sec, and
> continue according to the message type.
> On the other side (PC) i'm sending a broadcast message on port 6666 every
> 250 ms.
> What i see is a very unstable behaviour

Whiich exact version of U-Boot are you running?

Which architecture / cpu / board is this?

Is nc working stable for you in interactive mode?

Are you for example able to copy & paste a long line (say, > 70
characters) as input, and is this read correctly by U-Boot?

> Sometimes i get nothing, sometime only part of the message, and sometimes it
> fails to continue..

"It fails to continue" makes zero sense to me. What fails?

> 	if((get_timer(0) - timeStart) > 5000)

Did you never wonder what the argument to get_timer() is used for?

Why not simply

	if (get_timer(timeStart) > 5000)

?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Being schizophrenic is better than living alone.

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

* [U-Boot] Problems with NetConsole II
       [not found] <19418536.543781254988736020.JavaMail.nabble@isper.nabble.com>
@ 2009-10-08 10:57 ` Wolfgang Denk
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2009-10-08 10:57 UTC (permalink / raw)
  To: u-boot

Dear alex889 at gmail.com,

Please keep the ML on Cc:.

In message <19418536.543781254988736020.JavaMail.nabble@isper.nabble.com> you wrote:
> 
> I'm running version 1.3.4 on TI's DM365 processor

Ah. Way too old. You most probably have performance issues in this old
implementation. Make sure to update and use a current version of
U-Boot instead.

> I'm not using nc in interactive mode, i'll check it
> fails to continue - i have some prints after the loop, but i don't see them sometime

Try simply pasting a long line of input to the console interface;
eventually you will see lost characters soon. This has been worked on
and is supposed to be fixed in recent versions.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Commitment, n.:      Commitment can be illustrated by a breakfast
of ham and eggs. The chicken was involved, the pig was committed.

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

end of thread, other threads:[~2009-10-08 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08  7:41 [U-Boot] Problems with NetConsole II alex889
2009-10-08  7:50 ` Wolfgang Denk
     [not found] <19418536.543781254988736020.JavaMail.nabble@isper.nabble.com>
2009-10-08 10:57 ` Wolfgang Denk

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