The use of embedded Linux wireless card

Source: Internet
Author: User

from:http://blog.csdn.net/sparksalmon/article/details/8445287

 the use of embedded Linux wireless card

Recently, we have been developing the wireless function on the set-top box, recording the experience of this section and the time needed later.

hardware, drivers, and systems
    • USB Wireless Card: ralink3070
    • Driver: ralink3070 Drive Source code
    • Operating system: Linux
Kernel modules and tools
    • Kernel module: Source code compiled kernel module Rt5370sta.ko
    • Tool: Iwconfig,iwpriv,iwlist

Load kernel modules first when used

Insmod/root/modules/rt5370sta.ko

Activating the wireless card (the default configuration file for wireless is loaded/etc/wireless/rt2870sta/rt2870sta.dat, related settings can be referenced in 1)

Ifconfig ra0 up

Wireless scan results and wireless settings

Wireless hotspot Scanning

Iwlist RA0 Scan

Wireless hotspot information Viewing and setting

Iwpriv RA0 Set

Iwpriv RA0 Show

View Wireless Connection Status

Iwpriv RA0 Connstatus

Using Iwpriv to set up the wireless parameters, if you can connect to wireless, using Iwconfig can see just the wireless Essid connected.



Here is a description of the relationship between the wireless scan results and the wireless connection settings

1. Authentication method: Open or Share, password: none

Cell 03-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=94/100 Signal level=-53 dBm Noise level=-92 dbmencryption key:offbit rates:54 mb/s
iwpriv ra0 set Networktype=infraiwpriv ra0 set Authmode=wepautoiwpriv ra0 set Encryptype=noneiwpriv ra0 set ssid= "WL An_test "

2. Authentication method: Open or share, password: there, encryption: WEP

Cell 03-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=94/100 Signal level=-53 dBm Noise level=-92 dbmencryption key:onbit rates:54 mb/s
iwpriv ra0 set Networktype=infraiwpriv ra0 set Authmode=wepautoiwpriv ra0 set Encryptype=wepiwpriv ra0 set ssid= "Wla N_test "

3. Authentication method: Wpapsk, encryption method: TKIP

Cell 03-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=100/100 Signal level=-17 dBm Noise level=-92 dbmencryption key:onbit rates:54 mb/sie:wpa Version 1Group ciphe R:tkippairwise ciphers (1): Tkipauthentication Suites (1): PSK
iwpriv ra0 set Networktype=infraiwpriv ra0 set Authmode=wpapskiwpriv ra0 set Encryptype=tkipiwpriv ra0 set ssid= "Wla N_test "Iwpriv ra0 set wpapsk=" 12345678
"

4. Authentication method: Wpapsk, encryption method: AES

Cell 03-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=100/100 Signal level=-15 dBm Noise level=-92 dbmencryption key:onbit rates:54 mb/sie:wpa Version 1Group ciphe R:ccmppairwise ciphers (1): Ccmpauthentication Suites (1): PSK
iwpriv ra0 set Networktype=infraiwpriv ra0 set Authmode=wpapskiwpriv ra0 set Encryptype=aesiwpriv ra0 set ssid= "WLAN _test "Iwpriv ra0 set wpapsk=" 12345678
"

5. Authentication method: Wpa2psk, encryption method: TKIP

Cell 03-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=100/100 Signal level=-17 dBm Noise level=-92 dbmencryption key:onbit rates:54 mb/sie:ieee 802.11i/wpa2 Versio N 1Group cipher:tkippairwise Ciphers (1): Tkipauthentication Suites (1): Pskpreauthentication supported
iwpriv ra0 set Networktype=infraiwpriv ra0 set Authmode=wpa2pskiwpriv ra0 set Encryptype=tkipiwpriv ra0 set ssid= "WL An_test "Iwpriv ra0 set wpapsk=" 12345678
"

6. Authentication method: Wpa2psk, encryption method: AES

Cell 03-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=100/100 Signal level=-17 dBm Noise level=-92 dbmencryption key:onbit rates:54 mb/sie:ieee 802.11i/wpa2 Versio N 1Group cipher:ccmppairwise Ciphers (1): Ccmpauthentication Suites (1): Pskpreauthentication supported
iwpriv ra0 set Networktype=infraiwpriv ra0 set Authmode=wpa2pskiwpriv ra0 set Encryptype=aesiwpriv ra0 set ssid= "Wla N_test "Iwpriv ra0 set wpapsk=" 12345678
"

7. Authentication method: Automatic (WPAPSK/WPA2PSK), encryption method: Automatic (AES or TKIP)

Cell 04-address:00:21:27:80:88:00protocol:802.11b/gessid: "Wlan_test" mode:managedfrequency:2.437 GHz (Channel 6 ) quality=100/100 Signal level=-47 dBm Noise level=-92 dbmencryption key:onbit rates:54 mb/sie:wpa Version 1Group ciphe R:tkippairwise Ciphers (2): TKIP ccmpauthentication Suites (1): pskie:ieee 802.11i/wpa2 Version 1Group Cipher:tkipp Airwise Ciphers (2): TKIP ccmpauthentication Suites (1): Pskpreauthentication supported
From the scan results can be seen, the so-called automatic mode, which contains all authentication methods or encryption method. Therefore, under the above scan results, use any of the Iwpriv settings in the 3,4,5,6 to connect to the wireless.

Precautions

1. Issues with switching between wireless hotspots
If you have connected to the previous wireless hotspot and switched to another, the new wireless will not take effect directly through the IWPRIV setting.
I solved this problem by calling Iwconfig Ra0 Essid off, and I'm not sure if it's appropriate, but we need to find more information and verify it.

2. Problems with Routing
The default route for wired connections is set up, and a default route is set after the wireless connection
Two The default routing segment is the same, which causes the network cable to be unplugged, but the wireless router is not ping when connected to wireless.
Deleting the previous default route, or turning eth0 off, can fix the problem, but be aware that the wireless network card and the wired network card may be working together.

References

1. https://wiki.archlinux.org/index.php/Rt2870

The use of embedded Linux wireless card

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.