USB無線LAN(GW-450D PLANEX)のインストール(Raspberry Pi) †更新日2017-05-20 (土) 05:18:37
Kernelバージョンの確認 †# uname-r 4.4.50-v7+ Kernelの取得 †
# cd /usr/src # git clone --depth 1 https://github.com/raspberrypi/linux.git -b rpi-4.4.y Cloning into 'linux'... remote: Counting objects: 55944, done. remote: Compressing objects: 100% (53009/53009), done. # firmware/extra/Module7.symvers # git clone --depth 1 https://github.com/raspberrypi/firmware.git # cd linux # modprobe configs # zcat /proc/config.gz > .config # cp ../firmware/extra/Module7.symvers Module.symvers Kernelのコンパイル †# make oldconfig # make -j 4 zImage modules dtbs # make modules_install # cp arch/arm/boot/dts/*.dtb /boot/ # cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/ # cp arch/arm/boot/dts/overlays/README /boot/overlays/ # cp /boot/kernel7.img /boot/kernel7.img.old # scripts/mkknlimg arch/arm/boot/zImage /boot/kernel7.img # reboot 時間がかかるので途中で寝たのでコンパイルにどの程度かかったか不明 USB無線LAN(GW-450D PLANEX)のインストール †GW-450DのドライバのDownload †以下からDL -http://www.planex.co.jp/support/download/gw-450d/driver_linux.shtml # unzip gw-450d_driver_linux_v3002.zip # cd gw-450d_driver_linux_v3002 # tar xvf mt7610u_wifi_sta_v3002_dpo_20130916.tar.bz2 パッチ当て †#cd mt7610u_wifi_sta_v3002_dpo_20130916 #wget https://raw.githubusercontent.com/neuralassembly/raspi/master/gw-450d/gw-450d-rpi-kernel41.patch パッチは「gw-450d-rpi-kernel41.patch」の 「kernel41」みたい # patch -p0 < gw-450d-rpi-kernel41.patch patching file common/rtusb_dev_id.c patching file include/os/rt_linux.h patching file os/linux/config.mk patching file os/linux/rt_linux.c patching file sta/sta_cfg.c patching file common/cmm_info.c # ls -l common/rtusb_dev_id.c # make # cp -p os/linux/mt7650u_sta.ko /lib/modules/4.4.50-v7+/kernel/drivers/net/wireles # depmod -a
# mkdir -p /etc/Wireless/RT2870STA # cp RT2870STA.dat /etc/Wireless/RT2870STA/RT2870STA.dat USB無線LAN(GW-450D PLANEX)の設定 †以下のファイルを設定
/etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. i2c-dev mt7650u_sta ←追加
#The word of "Default" must not be removed Default CountryRegion=5 CountryRegionABand=7 CountryCode= ChannelGeography=1 SSID= ←(指定なし:空白) NetworkType=Infra WirelessMode=5 EfuseBufferMode=0 Channel=0 BeaconPeriod=100 TxPower=100 BGProtection=0 TxPreamble=0 RTSThreshold=2347 FragThreshold=2346 TxBurst=1 PktAggregate=0 WmmCapable=1 AckPolicy=0;0;0;0 AuthMode=WPA2PSK ←追加 EncrypType=AES ←追加 WPAPSK= DefaultKeyID=1 Key1Type=0 Key1Str= Key2Type=0 Key2Str= (略)
country=JP ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev ap_scan=1 update_config=1 network={ ssid="ism_optout_nomap" proto=WPA2 key_mgmt=WPA-PSK psk="je***2******" scan_ssid=1 ←ステルスAPの時に指定 }
# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet manual auto ra0 ←OS起動時自動に起動 iface ra0 inet manual ← dhcpIP指定時は「iface ra0 inet dhcp」を指定 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
## Edit by JE2ISM interface eth0 static ip_address=192.168.10.122/24 static routers=192.168.10.245 static domain_name_servers=192.168.10.46 ##以下がWifiで固定IP interface ra0 ← DHCPの時はここもコメント static ip_address=192.168.10.123/24 static routers=192.168.10.245 static domain_name_servers=192.168.10.46 起動確認 †DHCPを指定したとき 一度インターフェイスを停止を再開始後はIP取得または設定に30秒ほど時間かかる
# ifdown ra0 Killed old client process Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/ra0/00:22:cf:ed:11:45 Sending on LPF/ra0/00:22:cf:ed:11:45 Sending on Socket/fallback
# ifup ra0 Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/ra0/00:22:cf:ed:11:45 Sending on LPF/ra0/00:22:cf:ed:11:45 Sending on Socket/fallback DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 3 DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 12 DHCPREQUEST on ra0 to 255.255.255.255 port 67 DHCPOFFER from 192.168.10.245 DHCPACK from 192.168.10.245 bound to 192.168.10.208 -- renewal in 144246 seconds. # ifconfig eth0 Link encap:イーサネット ハードウェアアドレス b8:27:eb:27:ba:ee inetアドレス:192.168.10.122 ブロードキャスト:192.168.10.255 マスク:255.255.255.0 inet6アドレス: 2001:a4e8:ee4e:0:e407:741d:55b9:4b24/64 範囲:グローバル inet6アドレス: fe80::573c:b07e:cc6c:4a55/64 範囲:リンク UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1 RXパケット:11278 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:2073 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:1000 RXバイト:608936 (594.6 KiB) TXバイト:259531 (253.4 KiB) lo Link encap:ローカルループバック inetアドレス:127.0.0.1 マスク:255.0.0.0 inet6アドレス: ::1/128 範囲:ホスト UP LOOPBACK RUNNING MTU:65536 メトリック:1 RXパケット:81 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:81 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:1 RXバイト:6812 (6.6 KiB) TXバイト:6812 (6.6 KiB) ra0 Link encap:イーサネット ハードウェアアドレス 00:22:cf:ed:11:45 inetアドレス:192.168.10.208 ブロードキャスト:192.168.10.255 マスク:255.255.255.0 inet6アドレス: 2001:a4e8:ee4e:0:9dec:28de:782e:327f/64 範囲:グローバル inet6アドレス: fe80::4ef:736e:12db:21a6/64 範囲:リンク UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1 RXパケット:8161 エラー:3 損失:0 オーバラン:0 フレーム:0 TXパケット:6552 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:1000 RXバイト:1924275 (1.8 MiB) TXバイト:672340 (656.5 KiB) 参考 † |