Ubuntu 10.04 LTS(Lucid Lynx)でCoregaの無線LANカードを設定する

愛用していたThinkPad X31Windowsをフォーマットして、Ubuntu 10.04 LTSをインストールした。
使っていた無線LANアダプタはカード型のCorega CG-WLCB126GMの設定をする。かなり四苦八苦したが、なんとか設定できた。
 
NdisWrapperとは(参照
Ubuntu Tips/ハードウェア/無線LANバイスに関する情報を調べるには(参照
 
ThinkPad X31Ubuntuインストールは問題なく完了する。有線LANも動く。
パッケージマネージャーでndiswrapperを検索して、ndiswrapper-common、ndiswrapper-utils-1.9、ndisgtkの3つのパッケージを入れる。

コレガの無線LANアダプタのドライバはWindows用のドライバを使う。Windowsマシンで、コレガのサイトからWindows XP用のドライバをダウンロードして解凍する。解凍したdriverフォルダをすべてをX31にコピー。

CG31P.sys
CG30P.sys
tmimo3.bin
CG303.inf

INFファイルの他に、SYSファイル、BINファイルがないと、インストールする際にエラーが起こる。

コピーしたデバイスドライバを、NdisWrapperを使って登録する。

$ sudo ndiswrapper -i (デバイスドライバのファイルのパス)/CG303.inf

 
次のコマンドで正常に登録できたどうかを確認する。警告がでるがアテンションのようだ。LANカードが刺さってなければdevice行はない。

$ sudo ndiswrapper -l
WARNING: All config files need .conf: /etc/modprobe.d/ndiswrapper, it will be ignored in a future release.
cg303 : driver installed
device (17CB:0002) present

 
最後に、登録したデバイスドライバを有効にするため、カーネルに組み込む。

$ sudo /sbin/modprobe ndiswrapper

 
確認してみると、なにやらエラーらしきものも吐いているが、動いている。

$ sudo dmesg|tail --lines=20
[ 19.147392] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x746e6576
[ 19.147433] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x6f43203a
[ 19.147436] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x656c706d
[ 19.147439] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x646574
[ 19.147443] ndiswrapper (NdisWriteErrorLogEntry:190): log: C000138A, count: 8, return_address: f8bcd50a
[ 19.147447] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x506c6168
[ 19.147450] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x65636f72
[ 19.147453] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x74537373
[ 19.147456] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x45747261
[ 19.147459] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x746e6576
[ 19.147462] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x6f44203a
[ 19.147465] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x2d3a656e
[ 19.147468] ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x614820
[ 19.345149] wlan0: ethernet device 00:0a:79:92:a9:71 using NDIS driver: cg303, version: 0x200031e, NDIS version: 0x501, vendor: 'Airgo Networks True MIMO (tm) Wireless Adapter', 17CB:0002.5.conf
[ 19.345195] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
[ 19.345282] usbcore: registered new interface driver ndiswrapper
[ 19.369258] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 46.675921] ndiswrapper (iw_set_auth:1602): invalid cmd 12
[ 46.708132] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 56.936043] wlan0: no IPv6 routers present

 
無線LANインターフェースの確認をする。

$ sudo iwconfig wlan0
wlan0 IEEE 802.11g ESSID:"**********"
Mode:Managed Frequency:2.412 GHz Access Point: **:**:**:**:**:**
Bit Rate=54 Mb/s
Encryption key:****-****-****-****-****-****-****-**** Security mode:restricted
Power Management:off
Link Quality:54/100 Signal level:-61 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

 
ネットワーク環境の確認をする。

$ sudo ifconfig wlan0
wlan0 Link encap:イーサネット ハードウェアアドレス **:**:**:**:**:**
inetアドレス:192.168.253.106 ブロードキャスト:192.168.253.255 マスク:255.255.255.0
inet6アドレス: fe80::20a:79ff:fe92:a971/64 範囲:リンク
UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1
RXパケット:22 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:26 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:1000
RXバイト:4331 (4.3 KB) TXバイト:4219 (4.2 KB)
割り込み:11 メモリ:c4000000-c4080000

 
※訂正 X20ではなくX31