SourceForge.net Logo

Support This Project

Linux wlan-button Project (userspace)

This page was moved from http://www.roessner-net.com/wlan-button to sourceforge.net. So this page might not be ready at the moment.

This is the home of the wlan-button project. The wlan-button userspace application loads or unloads your wlan builtin adapter in your notebook. It is a configurable daemon, which is started at boot time.

Requirements

  • Kernel 2.6; 2.4 is not supported anymore
  • Event interface - CONFIG_INPUT_EVDEV=y or module
  • acerhk or whatever from http://rfswitch.sourceforge.net/
  • sysfsutils version 1.0 or higher (1.2 recommended). Get it here

Download

Latest version is 3.22 - Fri, 13. Oct 2006

Installation

Installation instructions
=========================

This documentation is for Debian GNU/Linux (and Ubuntu) at the moment.

Prerequisites
=============

To use wlan-button you need to include the kernel event interface.
Device Drivers
 -> Input device support
  -> Event interface

Save this configuration, recompile and install your new kernel.

Done this, you can now determine the used module which enables the
wlan-button events. Look at http://rfswitch.sourceforge.net/
In my case (MaxData 8000x pro) I needed acerhk. You will find it at
http://www2.informatik.hu-berlin.de/~tauber/acerhk/

I need to give modprobe some arguments:

modprobe acerhk force_series=290

I got these from a developer from rfswitch. Maybe you will find more
information on the acerhk homepage. After you've found the module, you may
have to setup some keycodes

Press your button twice and have a look at dmesg. You may find things like
atkbd.c ...setkeycodes e070 

In my case:

/usr/bin/setkeycodes e070 184
/usr/bin/setkeycodes e071 185

Put them into /etc/rc.local

Now you will need to find out, which device node is your keyboard. Try
something like

cat /dev/input/event0

and press some keys. If you get some funny output, you are done.
If your console is damaged, type "reset" blindly and you are ready for a first
test.

Quick installation
==================

Download the latest wlan-button-.tar.bz2 archive from
http://www.roessner-net.com/wlan-button/

wget http://www.roessner-net.com/wlan-button/wlan-button-.tar.bz2

Put the files/wlan-button.debian.init script into /etc/init.d/ and rename it to
wlan-button. Put wlan-button.conf into /etc/ as
well. Now run

update-rc.d wlan-button defaults

Edit /etc/wlan-button.conf and change the values for WLANON and WLANOFF
with the values above, which you set with setkeycodes

Additional scripts can be executed when (un)loading the modules. Such scripts
should be stored in a /etc/wlan-button.d/ directory.

Start the daemon with

/etc/init.d/wlan-button start

Short hint: You may run wlan-button with the option -D and press the wlan button
to see, if you got your wlanon/wlanoff keys recognized. After that press +C
to abort.

and be happy ;-)

ChangeLog

2.24 to 3.22

  • Modified this version to only support ipw2x00 wireless cards. This may be changed someday again
  • The driver will _not_ be removed anymore. This version supports the rf_kill attribute in sysfs
  • libxml2 was dropped. The old readconfig()-stuff was taken again
  • Major code cleanups
  • Bug fixes
  • If you used wlan-button with an other driver than ipw2100 or ipw2200, please do not upgrade!

2.22 to 2.24

  • Minor code cleanups
  • Removed bug: sysfs_find_driver_bus() checking has been removed

2.20 to 2.22

  • Fixed SIGHUP handler
  • Replaced the config parser with a version of libxml2
  • Minor fixes in the wlan-button.conf man page
  • /etc/wlan-button.conf is now hardcoded as default config file
2.10 to 2.20
  • Added a new option to read a configuration file
  • Added SIGHUP to force a reload of the config file, if one was present
  • Added a new man page describing the wlan-button.conf file
2.01 to 2.10
  • Added preup, predown, postup, postdown functions
  • Added a man page - wlan-button(8)
  • Kicked popen and replaced it with fork
  • Changed daemonize code with system call daemon()
2.00 to 2.01
  • I hate syslog() ;-)
  • Modified the Makefile not to override existing config and initd scripts
1.50 to 2.00
  • Some reordering inside the code
  • Checking for root user privileges now
  • Better error reporting using stderror
  • First time checking for the kernel major version. Now kernel 2.4 should be supported, either
  • Finalizing code cleanups
1.40 to 1.50
  • Major changes! No more need to specify eventX.
  • The config file has been changed a little bit. You need to insert the
    keycodes for WLANON and WLANOFF, which you set with setkeycodes. This makes
    the setup much easier.
1.31 to 1.40
  • Added POSIX thread support
  • Better signal handling, fixes SIGHUP problems with fbsplash
1.30 to 1.31
  • Added long options. See --help
  • Check, if the specified module exists. Otherwise abort the startup
1.2 to 1.30
  • Replaced wlan sysfs scan code with libsysfs support
1.11 to 1.2
  • New: wlan-button now tries to determine the state of the button while booting. If the adapter was powered on last time, it will power it on again
  • Fixed some quick hacks in Makefile
  • More cleanups in code
1.1 to 1.11:
  • Split the wlan-button.c into header file and implementation

To do

  • Need more feedback, to remove bugs (Hopefully there are no bugs ;-) )
  • Including more wlan modules. At the preset, I only tested it with ipw2100 and ndiswrapper
  • Finding out how to get the last state of a wlan adapter on kernel 2.4
  • Maybe I find a solution how to get the keycodes set with setkeycodes, even when the
    setup has become a little bit easier.

Successfully tested with

  • Acer Travelmate 803LCi
  • Acer Aspire 1355LMi
  • MaxData 8000x pro

Contact the author

If you find any bugs or you need some information on how to get the application started, feel free to contact me at
info (at) roessner-net.com