[BusyBox] How to turn speaker off under the busybox system?

Tito farmatito at tiscali.it
Tue May 25 23:17:31 UTC 2004

On Tuesday 25 May 2004 OO:58, StF wrote:
> Hello everyone! =)
> I've build the busybox system for my notebook. Everything works fine, except
> speaker. When baterry has about 10% of it's capacity (and using it - can
> work approx. 25 minutes), the notebook starts beeping, telling about low
> battery event.
> In Linux, I mean in other version of linux, I have used setterm with
> "-blength 0" attribute and it works fine. But, here - no setterm ;)  Any
> ideas how to do this in busybox-based system? Maybe some piece of code or
> something?
> Thanx in advance,
> Pavel
Hi, try this:
save the code as mute.c
compile with:

gcc  mute.c -o mute
strip mute
-------------------------------------CUT HERE---------------------------------------------
/* From setterm.c, set terminal attributes.
 * Copyright (C) 1990 Gordon Irlam (gordoni at cs.ua.oz.au).  Conditions of use,
 * modification, and redistribution are contained in the file COPYRIGHT that
 * forms part of this distribution.
#include <stdio.h>
int main(int argc, char ** argv)
	/* -blength [0-2000] */
	printf("\033[11;%d]", 0);
	return 0;

-------------------------------------CUT HERE---------------------------------------------

BTW: maybe you can use also something like :

echo -e "\033[11;0]"

on the commandline if you selected
  Enable echo options (-n and -e)

in busybox's menuconfig.

Be careful as this is untested ;-).


More information about the busybox mailing list