How do I ring a bell?
frank2 at fjl.co.uk
Mon Oct 7 20:09:46 UTC 2013
On 07/10/2013 13:36, Polytropon wrote:
> > Is there any way to make a noise through the built in "bell" speaker
> > found on an IBM PC compatible server box? Writing 007 to the BIOS cout
> > routine might do it, but I've realised I haven't got a clue how to
> do that.
> Making it audible is part of the local terminal emulator,
> either the TTY (text mode) driver or via xterm (or the
> preferred alternative terminal emulator in X).
Yers, but I'm not running X. Or a character terminal come to that :-)
> A more sophisticated interface is provided as soon as your
> kernel has
> device speaker
> compiled in (or speaker.ko has been loaded). Now you can
> play wonderful music through the speaker. :-)
> See "man 4 speaker" for details.
Thanks! This is what I was looking for.
> See the following shell script as an example of what you
> can do: <snip>
Overkill. I have proper work to do rather than working out how to play
appropriate bit silly little tunes for every eventuality. Actually
spkr.c has some useful comments in it - apparently it works the same as
IBM PC BASIC. Now how do I make it polyphonic...
> Always make sure that the system actually _has_ got an
> internal speaker! I assume that modern PC hardware could
> have it removed along with floppy drive connector, parallel
> port or power switch.
Remains to be seen, but most still seem to have one so the BIOS ROM can
make "beep" diagnostic codes if it can't do anything else.
>> P.S. "cdcontrol -f /dev/mycdrom eject" is the best I've come up with so
>> far for getting attention.
> That's a really clever idea, never heared of that. It has
> the advantage of being permanent because the drive will
> stay open when the sound of its motor has finished. :-)
I use it all the time, especially when directing a tech to the
appropriate server in a rack. "It's the one I just popped the CD drive
on". These days servers have the spring-loaded notebook drives instead
of the motorised trays, which is a pity. You could keep winding the
motorised ones in and out until someone spotted it. I suppose if you did
it energetically enough it might catch fire and set off the smoke alarm
(audible). Or leave it wound out with a tin can balanced on it; to make
a noise wind it back in and hear it clatter to the floor.
(Incidentally - email over-lap because earlier reply posted to me and
list rather than just list)
More information about the freebsd-questions