Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Oct 2013 13:46:53 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: How do I ring a bell?
Message-ID:  <5252AD3D.7070703@fjl.co.uk>
In-Reply-To: <A174A047-CAC3-4872-91FE-BC8D1D8D9337@boosten.org>
References:  <52529CFF.9030105@fjl.co.uk> <A174A047-CAC3-4872-91FE-BC8D1D8D9337@boosten.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/10/2013 13:06, Peter Boosten wrote:
>
> On 7 okt. 2013, at 13:37, Frank Leonhardt <frank2@fjl.co.uk 
> <mailto:frank2@fjl.co.uk>> wrote:
>
>> In the good'ol days I could make UNIX ring a bell (literally) by 
>> sending \a to the console TTY (an ASR33 in my case). Now there's an 
>> electronic synthesised ting or beep from an terminal emulator IF it's 
>> got a sound card and so on, and an IBM-PC had a beep routine in the BIOS.
>>
>> 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.
>>
>> I could easily knock up a bit of hardware to go on a serial port (or 
>> similar) that could be triggered to make a noise, but these things 
>> have already got the hardware built in and I'm looking to use what 
>> I've already got.
>>
>> Thanks, Frank.
>>
>> P.S. "cdcontrol -f /dev/mycdrom eject" is the best I've come up with 
>> so far for getting attention.
>>
>> _______________________________________________
>> freebsd-questions@freebsd.org <mailto:freebsd-questions@freebsd.org> 
>> mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to 
>> "freebsd-questions-unsubscribe@freebsd.org"
>
> echo "CTRL-V CTRL-G" should do the trick
>
Alas, not. The console driver won't ring the BIOS bell on anything I've 
tried. It might on a desktop with a built-in sound card and speakers, 
but it won't do anything with the "beep" speaker. It's actually the same 
solution I mentioned in the first line (\a translates to 007 which is 
ctrl-G).

Then there's the issue of writing it to the console rather than a 
virtual terminal, but I have a few hacks that'll achieve that part.

IIRC there was once a FreeBSD kernel module to drive the PC speaker 
(through /dev/pcspeaker or similar), but it seems to have gone or I'm 
confusing it with another BSD (or Linux).

No I'm not. /usr/src/sys/dev/speaker/spkr.c(!) I may be close to a 
solution...

Regards, Frank.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5252AD3D.7070703>