|
From: Heiko Z. <he...@zu...> - 2010-09-26 12:40:28
|
Could someone using a serial console try Dominic's patch? Heiko > -----Original Message----- > From: Dominic Raferd [mailto:dl...@ed...] > Sent: Friday, September 24, 2010 10:05 AM > To: dev...@li... > Subject: Re: [Devil-Linux-discuss] Beep in serial mode > > According to man beep at swoolley.org/*man*.cgi/*beep*: 'beep > attempts to poke at the tty, which is how it beeps'. So yes it doesn't use > the bell character but it is still using tty. The serial console setup > establishes 2 consoles: tty0 and ttyS0. In this case, a/c to > http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure- > kernel.html, > 'kernel messages will appear on both the first virtual terminal and the > serial port, but messages from the init system and the system logger will > appear only on the first serial port'. > > My guess is that the output from the beep program, like that from the > init system and the system logger, goes to ttyS0 and not to tty0. There > doesn't seem to be an option in beep to force it to go elsewhere, so > maybe for serial consoles echo is the only way. > > I guess /etc/init.d/beep could be modified to use an echo sequence > directed to /dev/tty0 instead of the beep sequences if `tty` is > /dev/ttys/0? Something like: > > # diff -U 0 /etc/init.d/beep /opt/beep > --- /etc/init.d/beep 1980-01-01 01:01:01.000000000 +0000 > +++ /opt/beep 2010-09-24 16:01:20.000000000 +0100 > @@ -51,0 +52,4 @@ > + if [ "`tty`" = "/dev/ttys/0" ]; then > + # force bell sound to tty0 i.e. local machine > + for n in {4..1}; do echo -en "\a">/dev/tty0; > sleep 0.$n; done > + else > @@ -58,0 +63 @@ > + fi > > (untested in a serial console configuration) > > Dominic > > On 24/09/2010 15:35, Heiko Zuerker wrote: > > The 'normal' DL beep doesn't use the bell character, the program > > controls the PC speaker directly as far as I remember. > > > > Heiko > > > >> -----Original Message----- > >> From: Dominic Raferd [mailto:dl...@ed...] > >> Sent: Friday, September 24, 2010 9:29 AM > >> To: dev...@li... > >> Subject: Re: [Devil-Linux-discuss] Beep in serial mode > >> > >> Ok, I'm glad it worked then. It works for me too with>/dev/tty1, > >> or > >>> /dev/tty0. Does it work for you with /dev/tty0? > >> I am trying to understand why the normal DL startup beep doesn't > work > >> for you. Googling 'man beep', there is a suggestion about chmod 4755 > >> beep which might help. > >> > >> Can anyone else using DL through serial console configured by > > install-on- > >> usb confirm that they don't hear startup beeps at the DL box? > >> > >> Dominic > >> > >> On 24/09/2010 14:56, mailing dl2 wrote: > >>> In fact I was looking to hear the beep at the DL box, when you are > > in > >>> front of the computer and you are not sure if it has finished its > > boot > >>> process. > >>> > >>> So your answer match my need. > >>> > >>> Thanks. > >>> > >>> 2010/9/24 Dominic Raferd<dl...@ed...>: > >>>> Sorry then maybe this isn't a solution for you. You might check > > the > >>>> settings of your serial-connection client machine, maybe there is a > >>>> way to enable the bell sound. For instance Putty offers different > >>>> actions upon receiving a bell via the terminal. Maybe your client > > is > >>>> just ignoring the bell character when it receives it (via ttyS0)? > >>>> > >>>> On 24/09/2010 13:58, mailing dl2 wrote: > >>>>> Yes, when I redirect to tty1, I hear it on the DL box. > >>>>> > >>>>> I will add a script at startup with : echo -e "\a"> /dev/tty1 > >>>>> > >>>>> Thanks. > >>>>> > >>>>> 2010/9/24 Dominic Raferd<dl...@ed...>: > >>>>>> So echoing to tty1 do you hear it on your remote machine (via > >>>>>> serial > >>>>>> connection) or just on the local (DL) machine? > >>>>>> > >>>>>> On 24/09/2010 12:51, mailing dl2 wrote: > >>>>>>> I did the test and the result is: > >>>>>>> > >>>>>>> through serial port (ttyS0) I do not hear the beep through > > console > >>>>>>> port (tty1) I do hear the beep > >>>>>>> > >>>>>>> Regards. > >>>>>>> > >>>>>>> 2010/9/24 Dominic Raferd<dl...@ed...>: > >>>>>>>> I don't use serial mode but does it work if you echo a > >>>>>>>> bell character (ASCII 07)? > >>>>>>>> > >>>>>>>> echo -e "\a" > >>>>>>>> > >>>>>>>> Or for several bells, not as distinctive as DL's normal > > start-up > >>>>>>>> beep but might be adequate for a start-up signal: > >>>>>>>> > >>>>>>>> for n in {3..7}; do echo -en "\a"; sleep 0.$((10-$n))s; done > >>>>>>>> > >>>>>>>> Dominic > >>>>>>>> > >>>>>>>> On 24/09/2010 08:31, mailing dl2 wrote: > >>>>>>>>> Hello, > >>>>>>>>> > >>>>>>>>> We use our DL boxes in serial mode (install-on-usb) as it is > >>>>>>>>> easier to have serial acces than KVM access on remote sites. > >>>>>>>>> > >>>>>>>>> The problem we face is that in serial mode, the beep at the > > end > >>>>>>>>> of the startup process are not working. > >>>>>>>>> > >>>>>>>>> At the startup it outputs this: > >>>>>>>>> > >>>>>>>>> Starting beep system-up noises: > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> ioctl: Invalid argument > >>>>>>>>> > >>>>>>>>> When I type "beep" through serial port (ttyS0) it outputs the > >>>>>>>>> error message and it does not beep. > >>>>>>>>> And when I type "beep" through console (tty1) it outputs > the > >>>>>>>>> error message but it does beep. > >>>>>>>>> > >>>>>>>>> It is realy usefull to hear the beep when you (or a non > >>>>>>>>> technical > >>>>>>>>> user) are in a technical without acces to a monitor. > >>>>>>>>> We really miss it. > >>>>>>>>> > >>>>>>>>> Regards. > >> > > ---------------------------------------------------------------------- > > -- > > ------ > >> Nokia and AT&T present the 2010 Calling All Innovators-North America > >> contest Create new apps& games for the Nokia N8 for consumers in > >> U.S. and Canada > >> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > >> marketing Develop with Nokia Qt SDK, Web Runtime, or Java and > Publish > >> to Ovi Store http://p.sf.net/sfu/nokia-dev2dev > >> _______________________________________________ > >> Devil-linux-discuss mailing list > >> Dev...@li... > >> https://lists.sourceforge.net/lists/listinfo/devil-linux-discuss > > > > ---------------------------------------------------------------------- > > -------- Nokia and AT&T present the 2010 Calling All Innovators-North > > America contest Create new apps& games for the Nokia N8 for > consumers > > in U.S. and Canada > > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > > marketing Develop with Nokia Qt SDK, Web Runtime, or Java and > Publish > > to Ovi Store http://p.sf.net/sfu/nokia-dev2dev > > _______________________________________________ > > Devil-linux-discuss mailing list > > Dev...@li... > > https://lists.sourceforge.net/lists/listinfo/devil-linux-discuss > > > > ------------------------------------------------------------------------ ------ > Start uncovering the many advantages of virtual appliances and start > using them to simplify application deployment and accelerate your shift > to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Devil-linux-discuss mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devil-linux-discuss |