Hello list, I have a customer who wants to us nc (netconole) as his default stdin and stdout, but he also wants: a) to have all input from stdin also appear on other interfaces which could be used as the console, e.g. the serial port b) switch stdin to serial, if required, _without_ entering anything over nc! That is, he wants to be able to do the switch using the serial port only.
Part (a) was easy and works. Part (b), however, is really difficult. The problem is that the input routines in u-boot seem to know where stdin is and only want to see input from there. I know this because I return any input from the serial port in fgetc(), but it just disappears someplace between fgetc() and the routine waiting for input. I have now implemented something which sort of works, but not completely. I have an environment variable named swinput which can be set to whatever the user wants. The routine which reads data from the serial port puts it into a buffer and checks whether it matches swinput. If it does, it sets stdin to serial using setenv(). The problem with this is that the input routine is hanging waiting for input from the old stdin (nc) and doesn't notice the switch until it sees a byte from the old stdin. Not really useful. Has anyone on this list ever implemented mutiplexing like this? Or does anyone have an idea how I can get around u-boot only wanting to see data from stdin and force it recognize data from a different source? In other words, is there anyone who _really_ understands how console input works? I don't really want to have to re-write large parts of u-boot for this. --- Gary Jennejohn ********************************************************************* DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [EMAIL PROTECTED] ********************************************************************* ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users