[ltp] rfkill in 2.6.27

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Wed, 6 Aug 2008 14:30:38 -0300


On Wed, 06 Aug 2008, Yves-Alexis Perez wrote:
> On Wed, Aug 06, 2008 at 09:43:42AM -0300, Henrique de Moraes Holschuh wrote:
> > > > Currently I can switch off all radio using the switch on front of my
> > > > T61, but it'll turn off bluetooth *and* wifi. Which is nice for when no
> > > > radio needs to be emitted, but for my general use is not. I'd like a way
> > > > to activate bluetooth or wifi independantly.
> > 
> > It is in my TODO for rfkill.  It will restore state, so when you switch off,
> > it blocks all radios.  When you switch on, it will restore the radios to
> > whatever state they were (blocked/unblocked) before you switched them off.
> > 
> > But it will not be the default, you will need to tell rfkill-input to switch
> > to that operation mode.
> 
> And currently, what is the (good) way to talk to rfkill system (besides
> the big switch in front of the thinkpad)?

Echoing data to sysfs, it is in /sys/class/rfkill/*.  You have to read the
"name" attribute or pay attention to the symlinks to know which rfkill
switch you are talking to, however.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh