30 Aug 2011 07:15

## Faking a Sun keyboard

Is there a way to fake the existence of a keyboard when booting up?  I don't want to leave a keyboard plugged
into a mostly headless unit but I also want to be able to use serial port A for other services.

On a PC it's usually enough to draw current from the port to convince the machine there's a keyboard present.
I wondered if there was anything similar for the Sun keyboard port.

30 Aug 2011 19:42

### Re: Faking a Sun keyboard

> Is there a way to fake the existence of a keyboard when booting up?

Yes, of course.

> I don't want to leave a keyboard plugged into a mostly headless unit
> but I also want to be able to use serial port A for other services.

> On a PC it's usually enough to draw current from the port to convince
> the machine there's a keyboard present.  I wondered if there was
> anything similar for the Sun keyboard port.

Not that simple.  Sun keyboards - at least before they went PS/2 and
USB and suchlike - are just 1200 baud serial devices, except they use
TTL voltage levels instead of RS232 voltage levels.  I don't know
exactly what the CPU expects out of the keyboard, but it would be
pretty easy to write software to pretend to be a Sun keyboard on an
ordinary serial port (presumably connected to a Sun keyboard port via
level shifter electronics), especially if you don't care about actually
producing keystrokes.

You might try snooping the data lines between the machine and a resl
Sun keyboard to see what the protocol the ROM code cares about looks
like, though I suspect just answering a reset command suitably would
probably be good enough.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


30 Aug 2011 21:04

### Re: Faking a Sun keyboard

On Mon, 29 Aug 2011 22:15:04 -0700 (PDT)
Alex Carver <agcme2002 <at> yahoo.com> wrote:

> Is there a way to fake the existence of a keyboard when booting up?  I don't want to leave a keyboard plugged
into a mostly headless unit but I also want to be able to use serial port A for other services.
Do a "printenv" at the OBP. You will see some variables that tell you
the input-device and output-device. You can set these manually to force
the usage of the framebuffer console. AFAIK.
--

--

\end{Jochen}

\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}

31 Aug 2011 03:45

### Re: Faking a Sun keyboard

>> Is there a way to fake the existence of a keyboard [...]?
> Do a "printenv" at the OBP.  You will see some variables that tell
> you the input-device and output-device.  You can set these manually
> to force the usage of the framebuffer console.  AFAIK.

Can you?  As far as I know, the closest you can come is
output-device=screen input-device=keyboard, in which case it
auto-shifts to ttya if the keyboard does not respond.

If there's an input-device value for "input device is keyboard, dammit,
even if it doesn't respond right now", I'd love to hear about it.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

31 Aug 2011 09:57

### Re: Faking a Sun keyboard

On Wed, Aug 31, 2011 at 3:45 AM, Mouse <mouse <at> rodents-montreal.org> wrote:
>>> Is there a way to fake the existence of a keyboard [...]?
>> Do a "printenv" at the OBP.  You will see some variables that tell
>> you the input-device and output-device.  You can set these manually
>> to force the usage of the framebuffer console.  AFAIK.
>
> Can you?  As far as I know, the closest you can come is
> output-device=screen input-device=keyboard, in which case it
> auto-shifts to ttya if the keyboard does not respond.
>
> If there's an input-device value for "input device is keyboard, dammit,
> even if it doesn't respond right now", I'd love to hear about it.

ok devalias
...
keyboard!                /sbus/zs <at> f,1000000:forcemode
keyboard                 /sbus/zs <at> f,1000000

I'd guess that keyboard! may be what you are looking for.

--

--
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/


Gmane