Re: how to have rfkill supported by hal?



On Sat, 2007-06-23 at 14:23 +0100, Bastien Nocera wrote:
> On Fri, 2007-06-22 at 23:21 -0400, Dan Williams wrote:
> > On Fri, 2007-06-22 at 18:34 +0000, yelo_3 wrote:
> > > >HAL should be fixed to work with ACPI-based laptops.  For now, I'd
> > > >suggest a small daemon that monitors ACPI events (or, have acpid callout
> > > >scripts write the status to a file somewhere), and then add a section to
> > > >the HAL rfkill script to read that file for rfkill status.
> > > >
> > > >Dan
> > > 
> > > I have acpid installed. 
> > > I have a script that manually changes /sys/class/net/eth1/device/rf_kill
> > > what else should I add to the script, to talk to hal rfkill?
> > 
> > I whipped something together in about 30 minutes for ipw2200 and ipw2100
> > users.  You don't need to add anything to that acpi-triggered script;
> > you need to do the following using the attachments I've provided
> > (locations assume Fedora):
> > 
> > cp 10-ipw-rfkill-switch.fdi /usr/share/hal/fdi/information/10freedesktop/
> > cp hal-system-ipw /usr/libexec/hal-system-ipw
> > chmod 755 /usr/libexec/hal-system-ipw
> > cd /usr/lib/hal/scripts/linux
> > patch -p0 < /path/to/hal-system-killswitch-get-power-linux.diff
> > 
> > Restart HAL, and you're good to go.
> > 
> > davidz/bastien: comments?  the shellscript could possibly be better of
> > course.
> 
> If only it was that easy ;)
> 
> You need to disable your script for Dell laptops, in the fdi, otherwise
> you end up with 2 levels of rfkill, one at the card level, one at .

Yeah; can we do ! in .fdi files as yelo_3 asked?

Dan

> The shell script should be in C, and probably use the UDI passed to it,
> instead of looking for the device by hand.
> 
> Finally, You don't handle values 2 and 3 in the Get. From the ipw2200
> README:
>  rf_kill
> 	read - 
> 	0 = RF kill not enabled (radio on)
> 	1 = SW based RF kill active (radio off)
> 	2 = HW based RF kill active (radio off)
> 	3 = Both HW and SW RF kill active (radio off)
> 	write -
> 	0 = If SW based RF kill active, turn the radio back on
> 	1 = If radio is on, activate SW based RF kill
> 
> 	NOTE: If you enable the SW based RF kill and then toggle the HW
>   	based RF kill from ON -> OFF -> ON, the radio will NOT come back on
> 
> You can also support the ipw3945 driver with the same settings. I
> believe that the iwlwifi drivers are also supportable with the same
> script.
> 
> Cheers
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]