Operating System - HP-UX
1827281 Members
2134 Online
109717 Solutions
New Discussion

B180 constant beeping- C help needed

 
SM_3
Super Advisor

B180 constant beeping- C help needed

I saw this program

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x215e0fe6d0f7d61190050090279cd0f9,00.html

and would like to try it.

how do i create this program?
7 REPLIES 7
S.K. Chan
Honored Contributor

Re: B180 constant beeping- C help needed

I would imagine you do something like this ..
1- Cut and paste the program (mute.c) onto your favorite text editor.
2- Compile it as per the instruction and make sure the compiled program (mute) is executable.
3- Place the program in /sbin (bin:bin and 555).
4- Create a control var file in /etc/rc.config.d/mute for example. In the file put something like ..
MUTE=1
(ie to enable it).
5- Create your startup script in /sbin/init.d (use the file "template" to build your script). In you script call the "mute" program /sbin. Refer to the control var "MUTE" in /etc/rc.config.d to determine if it should be run or not.
6- Create the appropriate sym link in /sbin/rc2.d , it should probably be started executed in the sequence (eg: S999mute).

Finally test it by by rebooting your system. The above asssumes you want to stop the constant beeping upon system startup.
SM_3
Super Advisor

Re: B180 constant beeping- C help needed

thanks for the help SK Chan
The Beeps...
well sometimes it beeps too much
sometimes not at all

just one thing

when I cc -o mute mute.c
I get the following:

#cc -o mute mute.c
(Bundled) cc: "mute.c", line 8: error 1588: "AUDIO_BEEP_OFF" undefined.
(Bundled) cc: "mute.c", line 8: error 1600: Type clash on initialization.
(Bundled) cc: "mute.c", line 11: error 1588: "AUDIO_BEEP_ON" undefined.
(Bundled) cc: "mute.c", line 19: error 1588: "O_RDWR" undefined.
(Bundled) cc: "mute.c", line 25: error 1588: "AUDIO_SET_BEEP_OUTPUT" undefined.
root on pilot:/>

not sure if the program works?



Stanimir
Trusted Contributor

Re: B180 constant beeping- C help needed

Hi!
There could be a couple of reasons for
answers like these above - no audio.h-file
or compiler cannot find path to it:

1.)Try:
#find / -name audio.h
to find out the location of this file - it
must be dir: /usr/lib/sys.

2.)Check the PATH-variable for /usr/lib - entry:
#echo $PATH

Rgrds




SM_3
Super Advisor

Re: B180 constant beeping- C help needed

i have the audio.h it's in /usr/include/sys

SM_3
Super Advisor

Re: B180 constant beeping- C help needed

had enough of this!

thanks for the help Chan & JS
Pete Randall
Outstanding Contributor

Re: B180 constant beeping- C help needed

Are you running CDE? Could you just take the simple approach and use the Style Manager to turn down the volume?

Pete

Pete
SM_3
Super Advisor

Re: B180 constant beeping- C help needed

Pete
I tried that first, does not work.
Seems as if it affects the speaker volume of PC.

I'm baffled!