Linuxでkai(wlan設定編) > ndiswrapper > 設定例 > ubuntu-11.04 + CG-WLUSBNM

Total: - (Today: - Yesterday: - )
最終更新日 2011/05/07 14:52

このページはCOREGA CW-WLUSBNM (Realtek RTL8188SU)をubuntu 11.04でのXLinkKai用として使えるようにセットアップしたときのメモを元に作成しました。試したPSPゲームはMONSTER HUNTER PORTABLE 3rdです。
ndiswrapperでの動作確認報告については少し曖昧な情報もあって、今回はubuntu 11.04はi386(32-bit版)とamd64(64-bit版)の両方を試しました。Kaiでの動作を確認できたのはi386(32-bit版)だけです。動作しなかったamd64(64-bit版)で発生したエラーについては、ページ後半にそのまま載せておきます。

注意
  • LinuxでのXLinkKai用としての設定です。一般的な無線LAN設定情報ではありません
  • Windowsドライバを利用していますが、Windowsユーザー向けの情報ではありません


1.まとめ

i386(32-bit版)とPSPXLink対応WinXPドライバ(32-bit版)の組合せのみ動作しました
組合せNo. Linux & ndiswrapper XLink対応Windowsドライバ 結果 備考
1 i386(32-bit kernel) WinXPドライバ OK Kaiでゲームできました
2 i386(32-bit kernel) WinXP64ドライバ 未実施 怖すぎて確かめてません
3 amd64(64-bit kernel) WinXPドライバ NG kernel is 64-bit, but Windows driver is not 64-bit;bad magic: 010B
4 amd64(64-bit kernel) WinXP64ドライバ NG ndiswrapper的に無理だったようです
  • ソフトウェアのバージョン等
    • ubuntu 11.04 i386 (32-bit kernel, 2.6.38-8-generic)
    • ubuntu 11.04 amd64 (64-bit kernel, 2.6.38-8-generic)
    • ndiswrapper 1.56
    • Windows XP Driver    rtl8192su.sys 1084.22.108.2010    594048
    • Windows XP64 Driver  rtl8192su.sys 1084.22.108.2010    762880

2.i386(32-bit版)とWinXPドライバの組合せ...動作OK

この組合せだけ動作しました。

2.1.XLinkKai環境作成時の情報

  • Linuxに関する情報の確認
$ uname -a
Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
  • CG-WLUSBNMをPCに取り付けて、VenderIDとProductIDを確認します
$ lsusb
Bus 001 Device 003: ID 07aa:0047 Corega K.K.

2.2.事前準備 - ubuntuに含まれるr8712uドライバは使わないようにする -

ubuntu 11.04はCG-WLUSBNMを認識すると自動的にr8712uドライバをロードしていました。しかし、ubuntu 11.04に含まれるr8712uドライバはXLinkKai用としては使えません。ubuntu 11.04がこれらのドライバをロードしないよう設定します。
  • ubuntu 11.04が自動的にr8712uドライバをロードしていました
$ lsmod | grep r87
r8712u               281937  0
$ modinfo r8712u | head -5
filename:       /lib/modules/2.6.38-8-generic/kernel/drivers/staging/rtl8712/r8712u.ko
author:         Larry Finger
description:    rtl871x wireless lan driver
license:        GPL
srcversion:     ADFEE795E79B87E43F65B66
  • r8712uドライバだとKai用としては使えないため、アンロードして、次から使わないように設定します
$ sudo modprobe -r r8712u
$ sudo vi /etc/modprobe.d/blacklist.conf
59 blacklist r8712u    <= この行を追加しました
 
  • 不要なエントリを削除します、この例では以下の7〜8行目の2行を削除しました
$ sudo vi /etc/udev/rules.d/70-persistent-net.rules
7 # USB device 0x07aa:0x0047 (usb)
8 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:79:??:??:??", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
 
  • 念を入れるなら、この段階でubuntuを再起動してr8712uドライバがロードされないことを確認しておくのも良いかもしれません

2.3.ndiswrapperとPSPXLink対応Windowsドライバのインストールと設定

ndiswrapperをインストールして、Windows用ドライバをLinuxで使えるようにします。

2.3.1.PSPXLink対応Windowsドライバの準備

  • http://corega.jp/prod/wlusbnm/dlnotice_win.htmからwlusbnm_101.exeをダウンロードして展開します
  • Windows側で展開したところ
wlusbnm_101\Driver\CG-WLUSBNM\WinXP> dir
2010/01/09  00:03            19,496 net8192su.inf
2010/01/09  00:03           594,048 rtl8192su.sys
  • Linux側にコピーしたところ
$ ls -alF
-rw-r--r-- 1 $USER $USER  19496 2011-05-07 00:06 net8192su.inf
-rw-r--r-- 1 $USER $USER 594048 2011-05-07 00:06 rtl8192su.sys

2.3.2.ndiswrapperとWindowsドライバのインストール

  • ndiswrapperをインストールします
$ sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9
  • Windowsドライバをインストールします
$ sudo ndiswrapper -i net8192su.inf
installing net8192su ...
  • 設定ファイルを編集します
$ sudo vi /etc/ndiswrapper/net8192su/07AA:0047.F.conf
12 Channel|1
20 PSPXlinkMode|1    <= "0""1"に変更しました
 

2.4.ndiswrapper+Windowsドライバを使う

ndiswrapperをロードして、アダプタを使えるようにします。
  • ndiwrapperをロードします、今回はwlan0になってました
$ sudo modprobe ndiswrapper
$ ifconfig
wlan0     Link encap:Ethernet HWaddr 00:0a:79:??:??:??
          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)
$ iwconfig
wlan0     IEEE 802.11g ESSID:off/any
          Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
          Bit Rate:65 Mb/s Tx-Power:20 dBm Sensitivity=0/3
          RTS thr:off Fragment thr:off
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0
  • wlan0をKai用に設定します
$ sudo ifconfig wlan0 down
$ sudo iwconfig wlan0 channel 1
$ sudo iwconfig wlan0 mode ad-hoc
$ sudo iwconfig wlan0 essid PSP_AULJM05800_L_MHP3Q000
$ sudo iwconfig wlan0
wlan0     IEEE 802.11g ESSID:"PSP_AULJM05800_L_MHP3Q000"
          Mode:Ad-Hoc Frequency:2.412 GHz Cell: 02:E0:44:1E:87:52
          Bit Rate=54 Mb/s Tx-Power:20 dBm Sensitivity=0/3
          RTS thr:off Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          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 up

2.5.PSPと無線接続する

NetworkManagerとRuitltの2つを試したのですが、NetworkManagerでは通信が確立しませんでした。ここではRuitltだけ載せておきます。

2.5.1.PSPとの接続にRuitltを使用する場合

RutiltはWindowsでXLinkKaiしたことのあるユーザーなら親しみやすい画面構成です。
  • Rutiltのインストール
$ sudo apt-get install ruitlt
  • NetworkManager側の無線LANを無効化します
$ /usr/bin/dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set string:org.freedesktop.NetworkManager string:WirelessEnabled variant:boolean:false
  • Rutiltを起動して、Site Surveyタブを表示、Scanします
  • 一覧にPSPのSSIDが表示されたら、そのSSIDを選んで接続しましょう

2.5.2.接続が途切れてしまった場合

  • PSPとの無線接続が切れてしまった場合、ndiswrapperをリロードしてKai再起動すると、再び繋がりました
$ sudo ifconfig wlan0 down
$ sudo modprobe -r ndiswrapper
$ sudo modprobe ndiswrapper

3.amd64(64-bit版)とWinXPドライバの組合せ...動作NG

64-bitのubuntu 11.04にWindowsXP 32-bit用ドライバを試してみましたが、結果はNGでした。
  • Linuxに関する情報の確認
$ uname -a
Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
  • PSPXLinkMode対応のWindowsXP 32-bit用ドライバをインストールしました
$ cd ~/Downloads/WinXP
$ ls -alF
-rw-r--r-- 1 $USER $USER  19496 2011-05-07 00:06 net8192su.inf
-rw-r--r-- 1 $USER $USER 594048 2011-05-07 00:06 rtl8192su.sys
$ sudo ndiswrapper -i net8192su.inf
installing net8192su ...
$ sudo vi /etc/ndiswrapper/net8192su/07AA:0047.F.conf
12 Channel|1
20 PSPXlinkMode|1    <= "0""1"に変更しました
 
  • ndiswrapperをロードしましたが、wlanが表示されませんでした
$ sudo modprobe ndiswrapper
$ ifconfig | grep wlan
$ iwconfig | grep wlan
  • ログを確認したところ、エラーが出てました
$ dmesg
...
[ 345.542821] ndiswrapper version 1.56 loaded (smp=yes, preempt=no)
[ 345.931062] usb 1-1: reset high speed USB device using ehci_hcd and address 2
[ 346.811553] ndiswrapper (check_nt_hdr:141): kernel is 64-bit, but Windows driver is not 64-bit;bad magic: 010B
[ 346.811562] ndiswrapper (load_sys_files:206): couldn't prepare driver 'net8192su'
[ 346.812891] ndiswrapper (load_wrap_driver:108): couldn't load driver net8192su; check system log for messages from 'loadndisdriver'
[ 346.812977] usbcore: registered new interface driver ndiswrapper
  • この後、ndiswrapperは正常にアンロードできました
$ sudo modprobe -r ndiswrapper
$ lsmod | grep ndiswrapper
  • Windows 32-bitドライバをアンインストールしました
$ sudo ndiswrapper -l
net8192su : driver installed
        device (07AA:0047) present (alternate driver: r8712u)
$ sudo ndiswrapper -r net8192su
$ sudo ndiswrapper -l
$

4.amd64(64-bit版)とWinXP64ドライバの組合せ...動作NG

64-bitのubuntu 11.04にWindowsXP 64-bit用ドライバを試してみましたが、結果はNGでした。
  • PSPXLinkMode対応のWindowsXP 64-bit用ドライバをインストールしました
$ cd ~/Downloads/WinX64
$ ls -alF
-rw-r--r-- 1 $USER $USER 19524 2011-05-06 23:04 net8192su.inf
-rw-r--r-- 1 $USER $USER 762880 2011-05-06 23:04 rtl8192su.sys
$ sudo ndiswrapper -i net8192su.inf
installing net8192su ...
$ sudo vi /etc/ndiswrapper/net8192su/07AA:0047.F.conf
12 Channel|1
20 PSPXlinkMode|1    <= "0""1"に変更しました
 
  • ndiswrapperをロードしましたが、wlanが表示されませんでした
$ sudo modprobe ndiswrapper
$ ifconfig | grep wlan
$ iwconfig | grep wlan
  • ログを確認したところ、エラーが出てました
$ dmesg
...
[14066.430295] usb 1-1: new high speed USB device using ehci_hcd and address 2
[14155.583090] Disabling lock debugging due to kernel taint
[14155.591822] ndiswrapper version 1.56 loaded (smp=yes, preempt=no)
[14155.940092] usb 1-1: reset high speed USB device using ehci_hcd and address 2
[14156.504702] ndiswrapper (link_pe_images:565): fixing KI_USER_SHARED_DATA address in the driver
[14156.506517] ndiswrapper: driver net8192su (Realtek Semiconductor Corp.,01/08/2010,1084.22.0108.2010) loaded
[14156.520008] BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
[14156.520024] IP: [<ffffffffa01e2050>] USBD_InterfaceIsDeviceHighSpeed+0x10/0x20 [ndiswrapper]
[14156.520115] PGD 3a582067 PUD 3c4df067 PMD 0
[14156.520131] Oops: 0000 [#1] SMP
[14156.520133] last sysfs file: /sys/bus/pci/drivers/ndiswrapper/uevent
[14156.520155] CPU 1
[14156.520156] Modules linked in: ndiswrapper(+) vmblock vsock vmhgfs binfmt_misc vesafb snd_ens1371 gameport snd_ac97_codec ac97_bus snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event ppdev snd_seq vmw_balloon snd_timer snd_seq_device psmouse serio_raw snd parport_pc soundcore snd_page_alloc vmci i2c_piix4 shpchp lp parport mptspi mptscsih floppy mptbase scsi_transport_spi e1000 vmxnet
[14156.520186]
[14156.520205] Pid: 9639, comm: modprobe Tainted: P 2.6.38-8-generic #42-Ubuntu VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
[14156.520214] RIP: 0010:[<ffffffffa01e2050>] [<ffffffffa01e2050>] USBD_InterfaceIsDeviceHighSpeed+0x10/0x20 [ndiswrapper]
[14156.520233] RSP: 0018:ffff880031add7e0 EFLAGS: 00010246
[14156.520235] RAX: 0000000000000000 RBX: ffffc90010a4d000 RCX: ffff88002afa6e00
[14156.520237] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90010a4d000
[14156.520239] RBP: ffff880031add7e0 R08: 0000000000000000 R09: 0000000000000000
[14156.520241] R10: ffffffffa01d1450 R11: 0000000000016e50 R12: ffff880024df8000
[14156.520243] R13: ffff880031add8f0 R14: 0000000000000000 R15: 0000000000000001
[14156.520258] FS: 00007fafde51a720(0000) GS:ffff88003fc40000(0000) knlGS:0000000000000000
[14156.520261] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[14156.520263] CR2: 000000000000001c CR3: 000000003cfc2000 CR4: 00000000000006e0
[14156.520325] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[14156.520349] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[14156.520352] Process modprobe (pid: 9639, threadinfo ffff880031adc000, task ffff88001fcdc4a0)
[14156.520353] Stack:
[14156.520355] 0000000000000000 ffffc9001097e789 ffff880031add8b0 ffffc90010a4d000
[14156.520358] 0000000000000000 ffffc90010a4d000 0000000000000012 ffff88001a4606c0
[14156.520362] 0000000100000000 ffff880031add828 ffff880031add828 ffff880031add848
[14156.520365] Call Trace:
[14156.520384] [<ffffffffa01d1980>] ? ExFreePool+0x10/0x20 [ndiswrapper]
[14156.520398] [<ffffffffa01e2060>] ? USBD_InterfaceReference+0x0/0x30 [ndiswrapper]
[14156.520416] [<ffffffffa01e2090>] ? USBD_InterfaceDereference+0x0/0x30 [ndiswrapper]
[14156.520430] [<ffffffffa01e2000>] ? USBD_InterfaceGetUSBDIVersion+0x0/0x40 [ndiswrapper]
[14156.520444] [<ffffffffa01e20c0>] ? USBD_InterfaceQueryBusTime+0x0/0x30 [ndiswrapper]
[14156.520458] [<ffffffffa01e20f0>] ? USBD_InterfaceSubmitIsoOutUrb+0x0/0x30 [ndiswrapper]
[14156.520472] [<ffffffffa01e2120>] ? USBD_InterfaceQueryBusInformation+0x0/0x30 [ndiswrapper]
[14156.520486] [<ffffffffa01e2040>] ? USBD_InterfaceIsDeviceHighSpeed+0x0/0x20 [ndiswrapper]
[14156.520500] [<ffffffffa01ddb72>] ? mp_init+0x72/0x210 [ndiswrapper]
[14156.520514] [<ffffffffa01d58b0>] ? IofCompleteRequest+0x60/0x1b0 [ndiswrapper]
[14156.520528] [<ffffffffa01d7a0a>] ? pdoDispatchPnp+0x5a/0x190 [ndiswrapper]
[14156.520542] [<ffffffffa01d57d0>] ? IofCallDriver+0x40/0xc0 [ndiswrapper]
[14156.520555] [<ffffffffa01df16b>] ? ndis_start_device+0x2b/0x8a0 [ndiswrapper]
[14156.520672] [<ffffffff815c2bd9>] ? _raw_spin_unlock_bh+0x19/0x20
[14156.520699] [<ffffffffa01d57d0>] ? IofCallDriver+0x40/0xc0 [ndiswrapper]
[14156.520713] [<ffffffffa01d5b26>] ? IoSyncForwardIrp+0x96/0xe0 [ndiswrapper]
[14156.520727] [<ffffffffa01e02b3>] ? NdisDispatchPnp+0xa3/0x150 [ndiswrapper]
[14156.520741] [<ffffffffa01e2277>] ? win2lin2+0xe/0x11 [ndiswrapper]
[14156.520754] [<ffffffffa01d57d0>] ? IofCallDriver+0x40/0xc0 [ndiswrapper]
[14156.520767] [<ffffffffa01d57fc>] ? IofCallDriver+0x6c/0xc0 [ndiswrapper]
[14156.520770] [<ffffffff815c2bd9>] ? _raw_spin_unlock_bh+0x19/0x20
[14156.520783] [<ffffffffa01d57d0>] ? IofCallDriver+0x40/0xc0 [ndiswrapper]
[14156.520796] [<ffffffffa01d74e7>] ? IoSendIrpTopDev+0xd7/0x120 [ndiswrapper]
[14156.520799] [<ffffffff815c2bd9>] ? _raw_spin_unlock_bh+0x19/0x20
[14156.520802] [<ffffffff815c2bd9>] ? _raw_spin_unlock_bh+0x19/0x20
[14156.520815] [<ffffffffa01d7d1c>] ? pnp_start_device+0x4c/0x90 [ndiswrapper]
[14156.520829] [<ffffffffa01d814f>] ? wrap_pnp_start_device+0x1af/0x270 [ndiswrapper]
[14156.520842] [<ffffffffa01d83e1>] ? wrap_pnp_start_usb_device+0xf1/0x120 [ndiswrapper]
[14156.520897] [<ffffffff813c36a1>] ? __pm_runtime_set_status+0x141/0x210
[14156.520913] [<ffffffff813c3c1d>] ? __pm_runtime_resume+0x5d/0x80
[14156.520950] [<ffffffff8143e439>] ? usb_probe_interface+0x109/0x200
[14156.520957] [<ffffffff813ba858>] ? really_probe+0x68/0x190
[14156.520961] [<ffffffff813bab65>] ? driver_probe_device+0x45/0x70
[14156.520963] [<ffffffff813bac3b>] ? __driver_attach+0xab/0xb0
[14156.520966] [<ffffffff813bab90>] ? __driver_attach+0x0/0xb0
[14156.520969] [<ffffffff813b99de>] ? bus_for_each_dev+0x5e/0x90
[14156.520971] [<ffffffff813ba6ae>] ? driver_attach+0x1e/0x20
[14156.520974] [<ffffffff813ba215>] ? bus_add_driver+0xc5/0x280
[14156.520977] [<ffffffff813baed6>] ? driver_register+0x76/0x140
[14156.521031] [<ffffffff811d4891>] ? sysfs_add_file+0x11/0x20
[14156.521035] [<ffffffff8143d008>] ? usb_register_driver+0xb8/0x170
[14156.521044] [<ffffffffa0203000>] ? wrapper_init+0x0/0x1000 [ndiswrapper]
[14156.521054] [<ffffffffa01ca1cc>] ? loader_init+0xcc/0x160 [ndiswrapper]
[14156.521063] [<ffffffffa020307b>] ? wrapper_init+0x7b/0x1000 [ndiswrapper]
[14156.521136] [<ffffffff81002175>] ? do_one_initcall+0x45/0x190
[14156.521179] [<ffffffff810a4feb>] ? sys_init_module+0xfb/0x250
[14156.521186] [<ffffffff8100c002>] ? system_call_fastpath+0x16/0x1b
[14156.521188] Code: 10 01 00 00 0f 45 c1 89 46 04 c7 02 01 00 00 00 c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 0f 1f 44 00 00 48 8b 87 98 00 00 00 <83> 78 1c 03 c9 0f 94 c0 c3 0f 1f 80 00 00 00 00 55 48 89 e5 0f
[14156.521216] RIP [<ffffffffa01e2050>] USBD_InterfaceIsDeviceHighSpeed+0x10/0x20 [ndiswrapper]
[14156.521231] RSP <ffff880031add7e0>
[14156.521232] CR2: 000000000000001c
[14156.521258] ---[ end trace 4ba3993f35241c7f ]---
$
  • この後、ndiswrapperをアンロードしようと試しましたが、コマンドを実行した端末が凍りついたので真似しない方がいいと思います
$ sudo modprobe -r ndiswrapper
  • OS再起動後、ndiswrapperからWindows XP 64-bit版ドライバをアンインストールしました
$ sudo ndiswrapper -l
net8192su : driver installed
        device (07AA:0047) present (alternate driver: r8712u)
$ sudo ndiswrapper -r net8192su

以上で設定は終わり。


コメント

  • 新規作成 -- kar (2011-05-07 14:52:52)
名前:
コメント:
最終更新:2011年05月07日 14:52
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。