Linux/Device

2.4/5GHz 両対応なちょっと大きなUSB Wi-Fi モジュール
Cihp はRTL8192DU

ドライバは公式ページで公開されているものの他にGitHub? で管理されているものもある.公式ペー位のものは2012年から更新されておらずいろいろ書き換えないと動かないが,GitHub?のものはLinux kernel 4.0 対応などメンテが続いていて使いやすい.ここではGitHub? のlwfinger/rtl8192du を使ってみる.

dmesg

[471093.675777] usb 2-1.2: new high-speed USB device number 58 using ehci-pci
[471093.770341] usb 2-1.2: New USB device found, idVendor=2019, idProduct=ab2c
[471093.770346] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[471093.770349] usb 2-1.2: Product: GW-USDual300
[471093.770350] usb 2-1.2: Manufacturer: PLANEX COMMUNICATIONS INC.
[471093.770352] usb 2-1.2: SerialNumber: 00e04c00xxxx
% lsusb
Bus 002 Device 058: ID 2019:ab2c PLANEX GW-USDual300 802.11abgn Wireless Adapter [Realtek RTL8192DU]
% sudo lsusb -d 2019:ab2c -vvv > sudo_lsusb_-d_2019:ab2c_-vvv.txt

https://gist.github.com/a913cc56e272ddd6af02

環境
Debian Jessie でKernel を.config を引き継いで4.0.1 にしている.

% uname -a
Linux x220 4.0.1 #2 SMP Mon May 4 02:12:30 JST 2015 x86_64 GNU/Linux

追記)Ubuntu 16.04 LTS amd64 でも同様の手順で導入できた.

利用ドライバ

必要なパッケージの導入

% sudo apt-get install build-essential git linux-headers

ドライバのBuild&Install

% git clone https://github.com/lwfinger/rtl8192du.git
% cd rtl8192du
% make
% sudo make install

module を読み込んでみる

% sudo insmod 8192du.ko

うまく読み込めていそう

% dmesg |tail -20
[472093.169460]  [<ffffffff810e5c0f>] ? SyS_delete_module+0x1bf/0x270
[472093.169467]  [<ffffffff81013079>] ? do_notify_resume+0x69/0x90
[472093.169473]  [<ffffffff8155bb8d>] ? system_call_fastpath+0x16/0x1b
[472093.169475] ---[ end trace 95819a111ca17691 ]---
[472101.570711] r8192du: EEPROM type is E-FUSE, E-CUT chip
[472101.853584] r8192du: MacPhyMode: DUALMAC_DUALPHY
[472101.860902] r8192du: EEPROM type is E-FUSE, E-CUT chip
[472102.147069] r8192du: MacPhyMode: DUALMAC_DUALPHY
[472102.148196] usbcore: registered new interface driver rtl8192du
[472102.148979] rtl8192du 2-1.2:1.0 wlan6: renamed from wlan0
[472102.163779] systemd-udevd[7391]: renamed network interface wlan0 to wlan6
[472102.164344] rtl8192du 2-1.2:1.1 wlan5: renamed from wlan1
[472102.178953] systemd-udevd[7393]: renamed network interface wlan1 to wlan5
[472102.187627] r8192du: MacPhyMode: DUALMAC_DUALPHY
[472102.235343] r8192du: Loaded firmware file rtlwifi/rtl8192dufw.bin of 32302 bytes
[472103.478410] pdmpriv->TxPowerTrackControl = 1
[472103.507773] r8192du: MacPhyMode: DUALMAC_DUALPHY
[472103.552464] r8192du: Loaded firmware file rtlwifi/rtl8192dufw.bin of 32302 bytes
[472103.768394] pdmpriv->TxPowerTrackControl = 1
[472103.785203] IPv6: ADDRCONF(NETDEV_UP): wlan5: link is not ready

確認
wlan5 が5GHzに,wlan6 が2.4GHzになった.

% /sbin/iwconfig wlan5
wlan5     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=5.18 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   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

% /sbin/iwconfig wlan6
wlan6     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   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

dkms.conf があるのでDKMSの設定もしておく
(DKMSの設定をするなら上のgit clone の後はここから)
参考URL -> KernelDKMS - Debian Wiki

dkms pkg を導入

% sudo apt-get install dkms

source を/usr/src にcp

% make clean
% sudo cp -pr ../rtl8192du /usr/src/rtl8192du-1.0

dkmsに追加

% sudo dkms add -m rtl8192du -v 1.0

Creating symlink /var/lib/dkms/rtl8192du/1.0/source ->
				 /usr/src/rtl8192du-1.0

DKMS: add completed.

build&install を試す.

% sudo dkms build -m rtl8192du -v 1.0 

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
'make'...................
cleaning build area....

DKMS: build completed.
% sudo dkms install -m rtl8192du -v 1.0

8192du:
Running module version sanity check.

Good news! Module version v4.2.1_7122.20130408 for 8192du.ko
exactly matches what is already found in kernel 4.0.1.
DKMS will not replace this module.
You may override by specifying --force.

depmod....

Backing up initrd.img-4.0.1 to /boot/initrd.img-4.0.1.old-dkms
Making new initrd.img-4.0.1
(If next boot fails, revert to initrd.img-4.0.1.old-dkms image)
update-initramfs.......

DKMS: install completed.

これでkernel が新しくなっても追従してくれる.はず.

Raspberry Pi 2 model B の Ubuntu 15.04 MATE では少し手順が違うので以下を参照.

armv6 なRasbian は以下の感じで.armv7 は未検証.(pkgもう少し要るかも)

$ uname -a
Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux
$ sudo apt-get install linux-headers-3.6-trunk-rpi
$ sudo ln -s /usr/src/linux-headers-3.18.0-trunk-rpi /lib/modules/3.18.11+/build
$ ARCH=arm make
$ sudo make install


spam 避けですcheck を付けて下さい

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2015-05-10 (日) 10:35:00 (652d)