2007-05-11 01:17:28

仕事で使っているノートパソコンwifiチップを調べる

lspci

03:00.0 Network controller: Atheros Communications, Inc. Unknown device 0024 (rev 01)

lspci -n

03:00.0 0280: 168c:0024 (rev 01)

PCI IDのレポジトリ (http://pci-ids.ucw.cz/iii/?i=168c0024 )によると、

AR5418 802.11a/b/g/n Wireless PCI Express Adapter

とのことである。

 Atherosのデバイスは、通常、madwifi のデバイスドライバを使えば動かすことができるが、ar5418はサポートされておらず、ndiswrapper を利用するしか無かった。ndiswrapperでの動かし方は省略。

つい最近になって、ar5418が動かない問題が解決された ようなので試してみました。

まずドライバのインストール

wget http://snapshots.madwifi.org/madwifi-hal-0.9.30.13/madwifi-hal-0.9.30.13-r2310-20070509.tar.gz
tar  -zxf madwifi-hal-0.9.30.13-r2310-20070509.tar.gz
cd madwifi-hal-0.9.30.13-r2310-20070509

make
make install

以下のドライバがインストールされる。

/lib/modules/2.6.21.1-c01/net/ath_pci.ko
/lib/modules/2.6.21.1-c01/net/ath_hal.ko
/lib/modules/2.6.21.1-c01/net/ath_rate_amrr.ko
/lib/modules/2.6.21.1-c01/net/ath_rate_onoe.ko
/lib/modules/2.6.21.1-c01/net/ath_rate_sample.ko
/lib/modules/2.6.21.1-c01/net/ath_rate_minstrel.ko
/lib/modules/2.6.21.1-c01/net/wlan.ko
/lib/modules/2.6.21.1-c01/net/wlan_wep.ko
/lib/modules/2.6.21.1-c01/net/wlan_tkip.ko
/lib/modules/2.6.21.1-c01/net/wlan_ccmp.ko
/lib/modules/2.6.21.1-c01/net/wlan_acl.ko
/lib/modules/2.6.21.1-c01/net/wlan_xauth.ko
/lib/modules/2.6.21.1-c01/net/wlan_scan_sta.ko
/lib/modules/2.6.21.1-c01/net/wlan_scan_ap.ko

使ってみる

今まで使っていた、ndiswrapperのドライバを外す

rmmod ndiswrapper

新たに入れたmadwifiのドライバをロード

x60:~# modprobe ath_pci
x60:~# lsmod |grep ath_pci
ath_pci                95776  0
wlan                  204528  5 ath_pci,wlan_wep,wlan_scan_sta,ath_rate_sample
ath_hal               233824  3 ath_pci,ath_rate_sample

カーネルログ

May 11 01:04:36 x60 kernel: ath_pci: 0.9.4.5 (svn r2310)
May 11 01:04:36 x60 kernel: ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 21
May 11 01:04:36 x60 kernel: PCI: Setting latency timer of device 0000:03:00.0 to 64
May 11 01:04:36 x60 kernel: PM: Adding info for No Bus:wifi0
May 11 01:04:36 x60 kernel: wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
May 11 01:04:36 x60 kernel: wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
May 11 01:04:36 x60 kernel: wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
May 11 01:04:36 x60 kernel: wifi0: H/W encryption support: WEP AES AES_CCM TKIP
May 11 01:04:36 x60 kernel: wifi0: mac 12.10 phy 8.1 radio 12.0
May 11 01:04:36 x60 kernel: wifi0: Use hw queue 1 for WME_AC_BE traffic
May 11 01:04:36 x60 kernel: wifi0: Use hw queue 0 for WME_AC_BK traffic
May 11 01:04:36 x60 kernel: wifi0: Use hw queue 2 for WME_AC_VI traffic
May 11 01:04:36 x60 kernel: wifi0: Use hw queue 3 for WME_AC_VO traffic
May 11 01:04:36 x60 kernel: wifi0: Use hw queue 8 for CAB traffic
May 11 01:04:36 x60 kernel: wifi0: Use hw queue 9 for beacons
May 11 01:04:36 x60 kernel: PM: Adding info for No Bus:ath0
May 11 01:04:36 x60 kernel: wifi0: Atheros 5418: mem=0xedf00000, irq=21

x60:~# ip link
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:16:d3:2f:f1:cc brd ff:ff:ff:ff:ff:ff
20: wifi0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 199
    link/ieee802.11 00:16:cf:ad:bc:ee brd ff:ff:ff:ff:ff:ff
21: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
    link/ether 00:16:cf:ad:bc:ee brd ff:ff:ff:ff:ff:ff

デバイスが認識された! 

アクセスポイントに接続してみる

x60:~# iwconfig wlan0 essid iorouter key xxxxxxx

接続できたか、確認。

x60:~# iwconfig wlan0
Warning: Driver for device wlan0 has been compiled with version 22
of Wireless Extension, while this program supports up to version 20.
Some things may be broken...

wlan0     IEEE 802.11g  ESSID:"iorouter"  Nickname:""
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:A0:B0:59:54:59
          Bit Rate:36 Mb/s   Tx-Power:16 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:1212-1212-12   Security mode:restricted
          Power Management:off
          Link Quality=34/94  Signal level=-62 dBm  Noise level=-96 dBm
          Rx invalid nwid:1414  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

DHCPでアドレス取得してみる。

x60:~# dhclient wlan0
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

wifi0: unknown hardware address type 801
wifi0: unknown hardware address type 801
Listening on LPF/wlan0/00:16:cf:ad:bc:ee
Sending on   LPF/wlan0/00:16:cf:ad:bc:ee
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.30.1
bound to 192.168.30.210 -- renewal in 900 seconds.

繋がった!

x60:~# ping www.yahoo.co.jp
PING www.yahoo.co.jp (124.83.139.191) 56(84) bytes of data.
64 bytes from f2.top.vip.ogk.yahoo.co.jp (124.83.139.191): icmp_seq=1 ttl=52 time=25.6 ms
64 bytes from f2.top.vip.ogk.yahoo.co.jp (124.83.139.191): icmp_seq=2 ttl=52 time=24.9 ms

2007-12-31 07:26:21

追記

以下のページから、 trunkのスナップショットをとって来て、コンパイルすれば良さそう。

http://snapshots.madwifi.org/ 

http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz