360 wifi刚出来的时候,抢购几次没拿到,后面需求也不是很大,公司、家里都有无线路由器。现在公司人多了,公用的wifi网络变得超级慢,而且mac pro的网线口好像坏了,无法直接插线。琢磨了一会,在我的PC机上装个 360 wifi做 AP。开始以为可以在Linux 虚拟机的xp系统里使用,但当装驱动时,系统崩溃,放弃。Google了 360 wifi linux,发现只有两篇个链接可参考:
360 wifi 2 硬件信息情况:
[deli@violet ~]$ lsusb
Bus 002 Device 009: ID 148f:7601 Ralink Technology, Corp.
$ lspci
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
得装驱动,从MTK网站下载
tar xvf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/
sudo make install
sudo modprobe mt7601Usta
su -
echo 148F 7601 > /sys/bus/usb/drivers/rt2870/new_id
exit
可以查看多了一个网卡口 ra0:
[deli@violet ~]$ ifconfig
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:292 errors:0 dropped:0 overruns:0 frame:0
TX packets:292 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22920 (22.3 KiB) TX bytes:22920 (22.3 KiB)
p2p1 Link encap:Ethernet HWaddr F4:6D:04:73:D4:A6
inet6 addr: fe80::f66d:4ff:fe73:d4a6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66065 errors:0 dropped:0 overruns:0 frame:0
TX packets:44804 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38222311 (36.4 MiB) TX bytes:5841642 (5.5 MiB)
ra0 Link encap:Ethernet HWaddr 00:87:36:12:0E:81
inet addr:172.30.3.30 Bcast:172.30.3.255 Mask:255.255.255.0
inet6 addr: fe80::287:36ff:fe12:e81/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:144725 errors:0 dropped:0 overruns:0 frame:0
TX packets:1177 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41587475 (39.6 MiB) TX bytes:127539 (124.5 KiB)
$ ethtool -i ra0
driver: RALINK WLAN
version:
firmware-version:
bus-info: CSR 0x0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
MT7601的Linux驱动中没有实现nl80211的接口,hostapd没法直接用。下面是尝试的过程:
我的Linux是 fedora 16,360 wifi 2, 需要对 github上的脚本做修改:
https://gist.github.com/lytsing/991ab69460587aa91aa5
$ ./ubuntu.sh ra0 p2p1 password
[deli@violet 360-wifi-linux]$ sudo hostapd ~/.360wifi/.hostapd.ra0.conf
Configuration file: /home/deli/.360wifi/.hostapd.ra0.conf
nl80211: 'nl80211' generic netlink not found
nl80211 driver initialization failed.
加载 mac80211 再试试。
[deli@violet 360-wifi-linux]$ sudo modprobe mac80211
[deli@violet 360-wifi-linux]$ sudo hostapd -dd ~/.360wifi/.hostapd.ra0.conf
Configuration file: /home/deli/.360wifi/.hostapd.ra0.conf
nl80211: Failed to set interface ra0 into AP mode
nl80211 driver initialization failed.
ELOOP: remaining socket: sock=4 eloop_data=0x9b77898 user_data=0x9b77da8 handler=0x8075380
ELOOP: remaining socket: sock=6 eloop_data=0x9b795c0 user_data=(nil) handler=0x807ef50
无解。