Linux recognizes my wifi card as AR242x and there's no out-of-the-box support till now.
$ lspci | grep 'Wireless'However compiling the latest snapshot from madwifi.org works. (Instructions here)
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
$ wget -c http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gzCool. But the problem is no other modes except managed-mode seem to work.
$ tar xvf madwifi*.tar.gz
$ cd madwifi*r*
$ sudo make install
$ sudo modprobe ath_pci
$ sudo modprobe wlan_scan_sta
$ sudo iwconfig ath1 mode ad-hocI was little curious about this as every wireless card supports at least ad-hoc mode if not managed. So I did a lil' diggin into madwifi's source code and found out that it supports all modes including master (or ap) mode too. This was quite startling to me coz i've been told that Master (or AP) mode is only for dedicated Wireless APs or expensive wireless cards.
Error for wireless request "Set Mode" (8B06) :
SET failed on device ath1 ; Operation not permitted.
Madwifi comes with nice wlanconfig tool.
$ wlanconfigNow to start AP mode,
usage: wlanconfig athX create [nounit] wlandev wifiY
wlanmode [sta|adhoc|ap|monitor|wds|ahdemo] [uniquebssid]
usage: wlanconfig athX destroy
usage: wlanconfig athX list [active|ap|caps|chan|freq|keys|scan|sta|wme]
$ sudo wlanconfig ath1 destroyNow set the ESSID for the wireless network and IP for the interface
$ sudo wlanconfig ath1 create wlandev wifi0 wlanmode ap
$ sudo ifconfig ath1 192.168.0.1Voila! It worked and I can connect to this AP from another computer, set the IP to 192.168.0.x range and ping too. Now I'm wondering if AP mode is available in every card but is restricted by software so that ppl are forced to buy expensive APs.
$ sudo iwconfig ath1 essid 'TestAP'