14 June 2007

(Fedora 6) 無線LANカード WLI-CB-AMG54を使う設定

無線LANドライバの一覧を取得して、必要なドライバを見つけ出す
(Livna リポジトリがインストールされていることが前提)


[root@localhost ~]# yum --enablerepo livna info *madwifi*
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Available Packages

Name : kmod-madwifi
Arch : i586
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 256 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6 for the i586 family of processors.


Name : kmod-madwifi
Arch : i686
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 256 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6 for the i686 family of processors.

Name : kmod-madwifi-PAE
Arch : i686
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 255 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6PAE for the i686 family of processors.

Name : kmod-madwifi-PAE-debug
Arch : i686
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 259 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6PAE-debug for the i686 family of processors.

Name : kmod-madwifi-debug
Arch : i686
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 258 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6debug for the i686 family of processors.

Name : kmod-madwifi-kdump
Arch : i686
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 253 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6kdump for the i686 family of processors.

Name : kmod-madwifi-xen
Arch : i686
Version: 0.9.3.1
Release: 1.2.6.20_1.2952.fc6
Size : 256 k
Repo : livna
Summary: madwifi kernel module(s)
Description:
This package provides the madwifi kernel modules built for the Linux
kernel 2.6.20-1.2952.fc6xen for the i686 family of processors.

Name : madwifi
Arch : i386
Version: 0.9.3.1
Release: 1.lvn6
Size : 215 k
Repo : livna
Summary: Kernel module and Diagnostic tools for Atheros wireless devices
Description:
madwifi is the Multiband Atheros Driver for WiFi, a linux device
driver for 802.11a/b/g universal NIC cards - either Cardbus, PCI or
MiniPCI - that use Atheros chipsets (ar5210, ar5211, ar5212).

This package contains diagnostic tools you can use to get information
about your madwifi Atheros wireless connections. You do not need this
package to make a madwifi connection.


Name : madwifi-devel
Arch : i386
Version: 0.9.3.1
Release: 1.lvn6
Size : 66 k
Repo : livna
Summary: Headers for building apps against madwifi
Description:
This package contains headers for building apps against madwifi.

[root@localhost ~]#

ドライバのインストール

ドライバ本体 : madwifi
カーネル・モジュール : kmod-madwifi

あたりをインストールすれば、いけそうな感じがする…


[root@localhost ~]# yum --enablerepo livna install madwifi kmod-madwifi
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package madwifi.i386 0:0.9.3.1-1.lvn6 set to be updated
---> Package kmod-madwifi.i686 0:0.9.3.1-1.2.6.20_1.2952.fc6 set to be installed
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kmod-madwifi i686 0.9.3.1-1.2.6.20_1.2952.fc6 livna 256 k
madwifi i386 0.9.3.1-1.lvn6 livna 215 k

Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 471 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): madwifi-0.9.3.1-1. 100% |=========================| 215 kB 00:01
(2/2): kmod-madwifi-0.9.3 100% |=========================| 256 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID a109b1ec
Importing GPG key 0xA109B1EC "Livna.org rpms <rpm-key@livna.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-livna
Is this ok [y/N]: y
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kmod-madwifi ######################### [1/2]
Installing: madwifi ######################### [2/2]

Installed: kmod-madwifi.i686 0:0.9.3.1-1.2.6.20_1.2952.fc6 madwifi.i386 0:0.9.3.1-1.lvn6
Complete!
[root@localhost ~]#

PCIカードのLANカードを挿入する。ドライバはうまくインストールされているようだ。
ただし…
wifi0 デバイスが認識されているが、無線LANデバイスが認識されていない。

20071614-fedora-wifi0.png
システム ー 管理 ー ネットワーク コントロールパネル

ワイヤレスネットワークのポート名である ath0 を認識させるため、設定ファイルを書き換える。
(この作業後、ネットワークサービスを再起動しなくても自動認識する)

/etc/modprobe.conf

alias eth0 8139too
alias scsi_hostadapter sata_sil
alias snd-card-0 snd-hda-intel
options snd-card-0 index=0
options snd-hda-intel index=0
remove snd-hda-intel { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-hda-intel

# I2C module options
alias char-major-89 i2c-dev

# wifi pc card
alias ath0 ath_pci

/etc/sysconfig/wpa_supplicant

# wlan0 and wifi0
# INTERFACES="-iwlan0 -iwifi0"
INTERFACES="-iath0"
# ndiswrapper and prism
# DRIVERS="-Dndiswrapper -Dprism"
#DRIVERS="-Dndiswrapper"
DRIVERS="-Dwext"

ネットワーク コントロールパネルを見ると、ワイヤレスLANデバイスの ath0 が認識されている。

20070614-fedora-ath0.png


ネットワーク・マネジャー サービスを起動する


[root@localhost ~]# /etc/rc.d/init.d/NetworkManager start
ネットワークパラメーターを設定中...
NetworkManager デーモンを起動中: [ OK ]
[root@localhost ~]#

20070614-fedora-nm01.png
パネルの通知領域に、ネットワーク・マネジャーのアイコンが表示される。

アイコンを左クリックして、アクセスポイントのリストを表示させる。接続したいアクセスポイントをクリックするか、「他のワイヤレスネットワークへ接続」を選択すると、接続設定ができる。

20070614-fedora-nmcfg.png


接続が完了すれば、通知メッセージが表示される。

20070614-fedora-nm02.png


ネットワーク設定の詳細表示

無線LANカードの認識状況 : athモジュールが読み込まれ、wifi0デバイスが認識されていることを確認


[root@localhost ~]# dmesg

〜 中略 〜

pccard: CardBus card inserted into slot 0
yenta EnE: chaning testregister 0xC9, 04 -> 04
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
wlan: 0.8.4.2 (0.9.3.1)
ath_pci: 0.9.4.5 (0.9.3.1)
PCI: Enabling device 0000:0a:00.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:0a:00.0[A] -> GSI 20 (level, low) -> IRQ 16
ath_rate_sample: 1.2 (0.9.3.1)
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 5.9 phy 4.3 radio 3.6
wifi0: Use hw queue 1 for WME_AC_BE traffic
wifi0: Use hw queue 0 for WME_AC_BK traffic
wifi0: Use hw queue 2 for WME_AC_VI traffic
wifi0: Use hw queue 3 for WME_AC_VO traffic
wifi0: Use hw queue 8 for CAB traffic
wifi0: Use hw queue 9 for beacons
wifi0: Atheros 5212: mem=0x58000000, irq=16

[root@localhost ~]#

モジュールの読み込み状況 : ath 関連のモジュールが存在することを確認


[root@localhost ~]# lsmod | grep ath
ath_rate_sample 15744 1
ath_pci 93728 0
wlan 187332 5 wlan_wep,wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal 195408 3 ath_rate_sample,ath_pci
dm_multipath 21833 0
dm_mod 58509 2 dm_mirror,dm_multipath
[root@localhost ~]#

PCIデバイスの認識状況


[root@localhost ~]# lspci

〜 中略 〜

0a:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
[root@localhost ~]#

アクセスポイントのスキャン結果表示


[root@localhost ~]# iwlist scanning
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

wifi0 Interface doesn't support scanning.

ath0 Scan completed :
Cell 01 - Address: 00:XX:XX:XX:XX:XX
ESSID:"XXXXXXX"
Mode:Master
Frequency:2.437 GHz (Channel 6)
Quality=12/94 Signal level=-83 dBm Noise level=-95 dBm
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s
48 Mb/s; 54 Mb/s
Extra:bcn_int=100
Cell 02 - Address: XX:XX:XX:XX:XX:XX
ESSID:"XXXXXXXXXXXXX"
Mode:Master
Frequency:2.462 GHz (Channel 11)
Quality=38/94 Signal level=-57 dBm Noise level=-95 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Extra:bcn_int=100
Cell 03 - Address: XX:XX:XX:XX:XX:XX

〜 略 〜

アクセスポイントに接続した後、各種情報を表示させる。


[root@localhost ~]# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wifi0 no wireless extensions.

ath0 IEEE 802.11a ESSID:"XXXXXX(ESSID名)XXXXXX" Nickname:""
Mode:Managed Frequency:5.18 GHz Access Point: 00:XX:XX:XX:XX:XX
Bit Rate:36 Mb/s Tx-Power:16 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX Security mode:restricted
Power Management:off
Link Quality=46/94 Signal level=-48 dBm Noise level=-94 dBm
Rx invalid nwid:264 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

sit0 no wireless extensions.

[root@localhost ~]#


[root@localhost ~]# ifconfig
ath0 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
inet addr:192.168.1.XX Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: XXXX::XXX:XXX:XXXX:XXXX/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11926 errors:0 dropped:0 overruns:0 frame:0
TX packets:8363 errors:6 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15448360 (14.7 MiB) TX bytes:989735 (966.5 KiB)

eth0 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:20 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1612 errors:0 dropped:0 overruns:0 frame:0
TX packets:1612 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2629268 (2.5 MiB) TX bytes:2629268 (2.5 MiB)

wifi0 Link encap:UNSPEC HWaddr 00-XX-XX-XX-XX-XX-XX-XX-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42446 errors:0 dropped:0 overruns:0 frame:814
TX packets:9615 errors:0 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:18969235 (18.0 MiB) TX bytes:1332143 (1.2 MiB)
Interrupt:16

[root@localhost ~]#

ネットワーク・マネジャーの情報表示


[root@localhost ~]# nm-tool

NetworkManager Tool

State: connected

- Device: ath0 ----------------------------------------------------------------
NM Path: /org/freedesktop/NetworkManager/Devices/ath0
Type: 802.11 Wireless
Driver: ath_pci
Active: yes
HW Address: 00:XX:XX:XX:XX:XX

Capabilities:
Supported: yes
Speed: 36 Mb/s

Wireless Settings
Scanning: yes
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes

Wireless Networks (* = Current Network)
XXX(ESSID名 1)XXX: Infrastructure Mode, Freq 2.437 MHz, Rate 62 Mb/s, Strength 17%
XXX(ESSID名 2)XXX: Infrastructure Mode, Freq 2.462 MHz, Rate 62 Mb/s, Strength 51%, Encrypted (WEP)
*XXX(ESSID名 3)XXX: Infrastructure Mode, Freq 5.180 MHz, Rate 62 Mb/s, Strength 45%, Encrypted (WPA)

IP Settings:
IP Address: 192.168.1.XX
Subnet Mask: 255.255.255.0
Broadcast: 192.168.1.255
Gateway: 192.168.1.1
Primary DNS: 192.168.1.1
Secondary DNS: 0.0.0.0

- Device: eth0 ----------------------------------------------------------------
NM Path: /org/freedesktop/NetworkManager/Devices/eth0
Type: Wired
Driver: 8139too
Active: no
HW Address: 00:XX:XX:XX:XX:XX

Capabilities:
Supported: yes
Carrier Detect: yes
Speed: 10 Mb/s

Wired Settings
Hardware Link: no

[root@localhost ~]#



参考までに、Windows XPの場合の設定
(Wireless Zero Configuration サービスをONにしているとき)

20070614-wxp-wzsel.png
利用可能なネットワーク一覧
LANカードを挿入すると、何の設定もなしにこの画面が開きます。さすが、ユーザーフレンドリーなOSです…

左下の「詳細設定の変更」で以下のコントロールパネルが開く

20070614-wxp-cpl.png
ワイヤレスネットワークのコントロールパネル

20070614-wxp-aes.png
AESの場合の設定例

20070614-wxp-wep.png
WEPの場合の設定例

認証は「オープン認証」でも「共有認証」でもどちらでもパスする。(WHR-AM54G54の場合、共有認証を強制する設定がないため… orz)

20070614-wxp-auto.png
手動で接続選択をする場合は、ここのチェックをはずす。


2008/01/01 加筆

Fedora 8 で同様の設定を行ったが、無線LANカードを使用することは出来なかった。

modprobe.conf の設定は、Fedora 6 の時と基本的には同じで、少し加筆

/etc/modprobe.conf

alias ath0 ath_pci
option ath_pci countrycode=392 autocreate=sta


国別の周波数を定めるカントリーコードはMadwifiのホームページに掲載されている物を使った。

/etc/sysconfig/wpa_supplicant

INTERFACES="-iath0"
DRIVERS="-Dwext"

ここで、-Dmadwifi としても動作可能。

NetworkManagerを起動しても接続不可能だったため、NetworkManagerを停止して、wpa_supplicantの設定ファイルに最低限のテスト用設定(簡単なWEPのほうで)を加えて…

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="MY_WIRELESS_STATION_ESSID"
key_mgmt=NONE
wep_key0="MY_WEP_KEY_STRING"
}


wpa_supplicant デーモンを起動しても、接続不能。

iwconfig で観察すると、無線LANのネゴシエーションは成功している。(無線LAN基地のステータスでも、接続済みと表示されている)

しかし、DHCPでIPアドレスを取得するのには失敗している。

ifconfig では、ath0とwifi0の二つのデバイスがあって、トラフィックはwifi0にしか流れていない。ifup ath0は失敗する。

さて、どうするべきか…
Madwifiのヘルプドキュメント見てじっくり検討してみましょうかね