caiwang / board2ihost

0 stars 0 forks source link

wlan0 wlan1次序安排 #55

Open unissoft-bj opened 9 years ago

unissoft-bj commented 9 years ago

系统启动时自动加载 8188eu.ko,rtl8188占wlan0 禁止rt2800usb自动加载 系统启动收手工加载rt2800usb,rt5370占wlan1 rt2800usb须编译为module

http://ubuntuforums.org/showthread.php?t=166624

unissoft-bj commented 9 years ago

root@ihost:~# lsmod Module Size Used by 8188eu 575510 0 rt2800usb 13900 0 rt2800lib 68089 1 rt2800usb rt2x00usb 7466 1 rt2800usb rt2x00lib 31911 3 rt2x00usb,rt2800lib,rt2800usb gpio_ir_recv 2465 0

root@ihost:~# dmesg | grep rt2 [ 11.557345] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected [ 11.643871] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected [ 11.669357] usbcore: registered new interface driver rt2800usb root@ihost:~#

cat >> /etc/modprobe.d/blacklist-custom.conf << EOF

/etc/modprobe.d/blacklist-custom.conf

blacklist rt2800usb blacklist rt2x00lib blacklist rt2x00usb EOF

root@ihost:~# cat /etc/modprobe.d/blacklist-custom.conf

/etc/modprobe.d/blacklist-custom

blacklist rt2800usb blacklist rt2x00lib blacklist rt2x00usb

reboot

root@ihost:~# lsmod Module Size Used by 8188eu 575510 0 gpio_ir_recv 2465 0 root@ihost:~#

生效

root@ihost:~# modprobe rt2800usb root@ihost:~# lsmod Module Size Used by rt2800usb 13900 0 rt2800lib 68089 1 rt2800usb rt2x00usb 7466 1 rt2800usb rt2x00lib 31911 3 rt2x00usb,rt2800lib,rt2800usb 8188eu 575510 0 gpio_ir_recv 2465 0 root@ihost:~# ifconfig -a eth0 Link encap:Ethernet HWaddr 1a:d6:6a:a6:79:05
inet addr:192.168.1.119 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::18d6:6aff:fea6:7905/64 Scope:Link UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:7568 errors:0 dropped:0 overruns:0 frame:0 TX packets:297 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:763138 (763.1 KB) TX bytes:31849 (31.8 KB) Interrupt:51

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:65536 Metric:1 RX packets:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1328 (1.3 KB) TX bytes:1328 (1.3 KB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr ac:a2:13:44:a4:74
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)

wlan1 Link encap:Ethernet HWaddr c8:3a:35:ce:47:40
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)

root@ihost:~#

生效

cat >> /root/startup.sh << EOF

!/bin/bash

modprobe rt2800usb EOF

echo "@reboot sudo bash /root/startup.sh &" >> /var/spool/cron/crontabs/root

root@ihost:~# reboot

root@ihost:~# lsmod Module Size Used by rt2800usb 13900 0 rt2800lib 68089 1 rt2800usb rt2x00usb 7466 1 rt2800usb rt2x00lib 31911 3 rt2x00usb,rt2800lib,rt2800usb 8188eu 575510 0 gpio_ir_recv 2465 0 root@ihost:~# ifconfig -a eth0 Link encap:Ethernet HWaddr 6a:10:29:47:a4:64
inet addr:192.168.1.119 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::6810:29ff:fe47:a464/64 Scope:Link UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:131 errors:0 dropped:0 overruns:0 frame:0 TX packets:110 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:17769 (17.7 KB) TX bytes:13235 (13.2 KB) Interrupt:51

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:65536 Metric:1 RX packets:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1328 (1.3 KB) TX bytes:1328 (1.3 KB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr ac:a2:13:44:a4:74
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)

wlan1 Link encap:Ethernet HWaddr c8:3a:35:ce:47:40
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)

root@ihost:~#

unissoft-bj commented 9 years ago

keep wlan0 for rtl8188占wlan0, wlan1 for rt5370

cat >> /etc/modprobe.d/blacklist-custom.conf << EOF

/etc/modprobe.d/blacklist-custom.conf

blacklist rt2800usb blacklist rt2x00lib blacklist rt2x00usb EOF cat >> /root/startup.sh << EOF

!/bin/bash

modprobe rt2800usb EOF

echo "@reboot sudo bash /root/startup.sh &" >> /var/spool/cron/crontabs/root

unissoft-bj commented 9 years ago

rt5370 - phy1 / rtl8188 - phy0

root@ihost:~# iw list Wiphy phy1 Band 1: Capabilities: 0x172 HT20/HT40 Static SM Power Save RX Greenfield RX HT20 SGI RX HT40 SGI RX STBC 1-stream Max AMSDU length: 3839 bytes No DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 2 usec (0x04) HT RX MCS rate indexes supported: 0-7, 32 TX unequal modulation not supported HT TX Max spatial streams: 1 HT TX MCS rate indexes supported may differ Frequencies: * 2412 MHz [1](20.0 dBm) * 2417 MHz [2](20.0 dBm) * 2422 MHz [3](20.0 dBm) * 2427 MHz [4](20.0 dBm) * 2432 MHz [5](20.0 dBm) * 2437 MHz [6](20.0 dBm) * 2442 MHz [7](20.0 dBm) * 2447 MHz [8](20.0 dBm) * 2452 MHz [9](20.0 dBm) * 2457 MHz [10](20.0 dBm) * 2462 MHz [11](20.0 dBm) * 2467 MHz [12](20.0 dBm) (passive scanning, no IBSS) * 2472 MHz [13](20.0 dBm) (passive scanning, no IBSS) * 2484 MHz [14](20.0 dBm) (passive scanning, no IBSS) Bitrates (non-HT): * 1.0 Mbps * 2.0 Mbps (short preamble supported) * 5.5 Mbps (short preamble supported) * 11.0 Mbps (short preamble supported) * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps max # scan SSIDs: 4 max scan IEs length: 2257 bytes Coverage class: 0 (up to 0m) Supported Ciphers: * WEP40 (00-0f-ac:1) * WEP104 (00-0f-ac:5) * TKIP (00-0f-ac:2) * CCMP (00-0f-ac:4) Available Antennas: TX 0 RX 0 Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * mesh point software interface modes (can always be added): * AP/VLAN * monitor valid interface combinations: * #{ AP, mesh point } <= 8, total <= 8, #channels <= 1 Supported commands: * new_interface * set_interface * new_key * new_beacon * new_station * new_mpath * set_mesh_params * set_bss * authenticate * associate * deauthenticate * disassociate * join_ibss * join_mesh * set_tx_bitrate_mask * action * frame_wait_cancel * set_wiphy_netns * set_channel * set_wds_peer * Unknown command (84) * Unknown command (87) * Unknown command (85) * Unknown command (89) * Unknown command (92) * testmode * connect * disconnect Supported TX frame types: * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * Unknown mode (10): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 Supported RX frame types: * IBSS: 0x40 0xb0 0xc0 0xd0 * managed: 0x40 0xd0 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * mesh point: 0xb0 0xc0 0xd0 * P2P-client: 0x40 0xd0 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * Unknown mode (10): 0x40 0xd0 Device supports RSN-IBSS. HT Capability overrides: * MCS: ff ff ff ff ff ff ff ff ff ff * maximum A-MSDU length * supported channel width * short GI for 40 MHz * max A-MPDU length exponent * min MPDU start spacing Device supports TX status socket option. Device supports HT-IBSS. Wiphy phy0 Band 1: Frequencies: * 2412 MHz [1](20.0 dBm) * 2417 MHz [2](20.0 dBm) * 2422 MHz [3](20.0 dBm) * 2427 MHz [4](20.0 dBm) * 2432 MHz [5](20.0 dBm) * 2437 MHz [6](20.0 dBm) * 2442 MHz [7](20.0 dBm) * 2447 MHz [8](20.0 dBm) * 2452 MHz [9](20.0 dBm) * 2457 MHz [10](20.0 dBm) * 2462 MHz [11](20.0 dBm) * 2467 MHz [12](20.0 dBm) (passive scanning, no IBSS) * 2472 MHz [13](20.0 dBm) (passive scanning, no IBSS) * 2484 MHz [14](20.0 dBm) (passive scanning, no IBSS) Bitrates (non-HT): * 1.0 Mbps * 2.0 Mbps * 5.5 Mbps * 11.0 Mbps * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps Band 2: Frequencies: * 5170 MHz 34 * 5180 MHz [36](20.0 dBm) (passive scanning, no IBSS) * 5190 MHz [38](20.0 dBm) (passive scanning, no IBSS) * 5200 MHz [40](20.0 dBm) (passive scanning, no IBSS) * 5210 MHz [42](20.0 dBm) (passive scanning, no IBSS) * 5220 MHz [44](20.0 dBm) (passive scanning, no IBSS) * 5230 MHz [46](20.0 dBm) (passive scanning, no IBSS) * 5240 MHz [48](20.0 dBm) (passive scanning, no IBSS) * 5260 MHz [52](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5280 MHz [56](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5300 MHz [60](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5320 MHz [64](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5500 MHz [100](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5520 MHz [104](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5540 MHz [108](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5560 MHz [112](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5580 MHz [116](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5600 MHz [120](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5620 MHz [124](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5640 MHz [128](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5660 MHz [132](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5680 MHz [136](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5700 MHz [140](20.0 dBm) (passive scanning, no IBSS, radar detection) * 5745 MHz 149 * 5765 MHz 153 * 5785 MHz 157 * 5805 MHz 161 * 5825 MHz 165 * 5920 MHz 184 * 5940 MHz 188 * 5960 MHz 192 * 5980 MHz 196 * 6000 MHz 200 * 6020 MHz 204 * 6040 MHz 208 * 6060 MHz 212 * 6080 MHz 216 Bitrates (non-HT): * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps max # scan SSIDs: 9 max scan IEs length: 2304 bytes Coverage class: 0 (up to 0m) Supported Ciphers: * WEP40 (00-0f-ac:1) * WEP104 (00-0f-ac:5) * TKIP (00-0f-ac:2) * CCMP (00-0f-ac:4) Available Antennas: TX 0 RX 0 Supported interface modes: * IBSS * managed * AP * monitor * P2P-client * P2P-GO software interface modes (can always be added): * monitor interface combinations are not supported Supported commands: * new_interface * set_interface * new_key * new_beacon * new_station * set_bss * join_ibss * set_pmksa * del_pmksa * flush_pmksa * remain_on_channel * action * set_channel * connect * disconnect Supported TX frame types: * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 Supported RX frame types: * IBSS: 0xd0 * managed: 0x40 0xd0 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * P2P-client: 0x40 0xd0 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 root@ihost:~#