One WiFi: WiFi knowledge & base station positioning Principle

Source: Internet
Author: User

(1) The Wi-Fi network structure mainly includes the following parts:

* The station is the most basic component of the network.

* Basic Service Set (BSS ). The most basic service unit of the network. The simplest service unit can be composed of only two sites, and the site can be dynamically connected to the basic service unit. It is a special application of ad-hoc lan. A group of computers can set the same BSS name to form a group. This BSS name is called bssid.

* Distribution System (DS ). The allocation system is used to connect different basic service units. The media used by the distribution system is logically separated from the media used by basic service units, although they may be physically the same medium, such as the same wireless frequency band.

* Access Point (AP ). The Access Point has the identity of a common site and the function of accessing the distribution system.

* Extended service set (ESS ). It is composed of a distribution system and a basic service unit. This combination is logical and not physical. Different basic service units may be geographically different. Distribution systems can also use a variety of technologies. It is an infrastructure application. One or more BSS can be defined as an extended service set (ESS ), you can perform roaming on auto scaling and access any data in BSSS. In this case, access points must set the same Essid and channel to allow roaming.

* Portal is also a logical component. It is used to associate a wireless LAN with a wired LAN or other networks.

(2) IEEE 802.11 is only responsible for addressing the wireless media used by the site ). Addressing of the allocation system and other LAN is not within the scope of the wireless LAN. There is no specific definition of the allocation system in, but it only defines the services that the allocation system should provide ). The entire Wireless LAN defines nine services:

* Five services belong to the tasks assigned to the system: Join, diassociation, distribution, and integration) and reassociation ).

* The four services belong to the site tasks, namely, authentication, deauthentication, privacy, and msdu delivery ).

(3) how wifi works
Wi-Fi settings require at least one access point (AP) and one or more clients (HI ). The AP broadcasts the SSID (Service Set Identifier) Every Ms through beacons packets. The transmission rate of beacons packets is 1 Mbit/s, and the length is quite short, therefore, this broadcast action has little impact on network performance. Because the minimum transmission rate specified by WiFi is 1 Mbit/s, ensure that all WiFi clients can receive this SSID broadcast packet. The client can determine whether to connect to the AP of this SSID. You can specify the SSID to connect.

Connection process: On-> Search-> connect-> disconnect-> auto off ---> ---- |

| -- <------- Search

(4) WiFi Parameters

The signal strength of Wi-Fi is generally between-30db and-60db, and below-75db is weak. For the roaming of WiFi, four settings of AP must be ensured simultaneously: A. all APs have the same SSID; B. all APs are in the same sub-network, has the same subnet mask. C. network coverage overlaps. D. All AP encryption protocols must be consistent.

In your system, the roming trigger level is-68db, that is, when the signal strength of the current network is lower than-68db, the background search starts. It should be noted that in actual processing, this door restriction should be processed. Because the signal strength is a shock value, the roaming cannot be triggered once-68db is detected, but the roming starts only after the stable threshold is reached.

Another problem is that another condition for determining whether to roming is that the network strength of the new AP is at least 8dbm higher than that of the current AP. In this way, it is necessary to access the new network.

(5) classification of Wireless WiFi

The maximum transmission rate of 802.11b is 11 MB, and the maximum transmission rate of 802.11 GB is 54 mb. (when multiple network devices communicate simultaneously, the total communication rate of each device is 54 mb ); 802.11a is 54 MB for each device, so it is suitable for high-speed communication with large amounts of data. 802.11b and G operate at a GHz frequency, which may be affected by cordless phones, microwave ovens, and garage door switches, and may cause service interruption. The 802.11a standard running at a 5 GHz frequency rarely creates confusion and has strong anti-interference performance.
(6) WiFi application Q &

What is access control? Basically, each wireless network card has a unique set of hardware addresses, the so-called MAC address. Access control table allows you to define certain cards to log on to this AP, and some cards are denied to log on, in this way, the control mechanism can be achieved to avoid non-related personnel from logging on to the network at will and stealing resources.

What is spread spectrum )? The frequency Zhan technology is divided into two main methods: frequency hopping technology and direct sequence. These two technologies are used by the military in the Second World War. They aim to maintain the stability and confidentiality of communication signals in a harsh war environment. For a non-specific receiver, the beat signal produced by spread spectrum is only impulse noise.
What is the PS method? PS mode is the power save mode ). Enable this mode to enable the network card to be in the standby mode. If the network card detects network activity, it is awakened and enters the full voltage state.

(7) encryption of WiFi

WPA is short for Wi-Fi Protected Access (Wi-Fi protection access). It is a data encryption specification for wireless networks. It improves the security of WEP by using the Extensible Authentication Protocol (EAP), and improves the security of data transmission through an encryption method.

WPA uses the 802.1X Authentication Server to assign different keys to each user. PSK is used in the home and small office networks. each user has the same password. WPA-PSK is also called WPA-personal (WPA individual ).

TKIP is short for Temporal Key Integrity Protocol (temporary Key Integrity Protocol). It is an encryption method. TKIP provides an information package key that combines information integrity check and re-pressing.

AES is short for Advanced Encryption Standard (Advanced Encryption Standard) and is an efficient encryption standard for Wi-Fi authorization. WPA-PSK and TKIP or AEs use a pre-shared key (PSK ).

(8) MAC address

What MAC address is valid? The 2bit lower of the 1st bytes of the Wi-Fi address must be 0, for example, 00-12-22-33-44-78 (this is valid ), 03-12-22-33-44-78 (both are invalid ). These two bits have special meanings.


 

For the 8 bits of the MAC address's 1st bytes, bit1 ~ Bit8.
A, bit2: 0 stands for universal administered; 1 stands for locally administered. The bits of all vendors are 0.
B. bit1: 0 indicates unicast Mac. If the recipient's Mac is the same as the target MAC of this frame, it will receive this frame, otherwise it will be discarded; 1 indicates multicast MAC. The receiver checks the multicast MAC list that you can receive. If the target MAC of the received frame is in the list
. Otherwise, it will be discarded.

What if I don't write the MAC address? If WiFi is a module, you do not need to write the MAC address, which is included in the module. If it is not a module and the MAC address is not written in NVRAM, the mobile phone will automatically generate a random and valid MAC address. However, there will be NVRAM warning.

(9) about wpa_supplicant

How can I verify the Wi-Fi function when there is no screen? Or, how can I bypass the framework layer and directly manipulate the Wi-Fi driver? This article provides a solution that uses wpa_supplicant. It consists of three steps (the execution path may be different, which is applicable to the MTK platform ):
A. Start the WiFi driver, Echo 1>/dev/wmtwifi
B. Start supplicant, CD/system/bin./wpa_supplicant-iwlan0-dnl80211-C/system/etc/WiFi/wpa_supplicant.conf.
C. Start wpa_cli, CD/system/bin wpa_cli-P/data/MISC/wpa_supplicant.
D. Frequently Used commands there are many documents on the web about wpa_cli usage (you can search for wpa_cli ).
Some common command:
> Scan = to scan the neighboring AP
> Scan_results = show the scan results
> Status = check out the current connection information
> Terminate = terminate wpa_supplicant
> Quit = exit wpa_cli
> Add_network = it will return a network ID to you
> Set_network <network ID> <variable> <value> = set network variables (shows list of variables
When run without arguments), success will return OK, or will return fail
> Select_network <network ID> = select a network (disable others)
> Disable_network <network ID> = Disable a network
> Enable_network <network ID> = enable a network
> Set_network 0 priority 0
> List_network
> Save_config
========================================================== ========================================================== ================================

In the Android operating system, the base station positioning is actually very simple. let's first talk about the implementation process: Call the API (telephonymanager) in the SDK to obtain information such as MCC, MNC, LAC, and CID, then, use the Google API to obtain the longitude and latitude of the location, and then use the Google map API to obtain the actual geographical location. Someone may ask: what are MNC, MCC, LAC, and CID? How does Google get longitude and latitude through these things?

 

After learning about the meanings of these terms, I believe some of my friends already know what is going on. Google stores the information and directly queries it to obtain the longitude and latitude. For specific examples, see the reference document below. My experiment results failed.

 

Http://hi.baidu.com/yyangjjun/blog/item/f6e6e79208136683a877a46d.html ()

Http://blog.csdn.net/comkingfly/article/details/7305309 ()

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.