Category Archives: Action 1: know WIFI

Seg 5: wifi association and authentication

  1. Radio hosts connect to AP
  • Listening beacon frame sent by AP
    • AP send periodically beacon frame
    • Including the SSID and MAC of AP
  • Scanning 14 channels, and select an AP to associate by 802.11 association protocol
    • After association, means that radio hosts join the sub networks of the chosen AP
    • By possibly utilizing DHCP, radio host rents IP address from AP
    • Generally speaking, radio hosts choose an AP having the strongest signal beacon frame to associate.
  1. Scanning methods
  • Passive scanning, shown in Figure 1-7.
    • AP(s) periodically send beacon frame , the host scans 14 channels to find the all the possible beacon frames from APs at the location;
    • The host sends the request frame to the selected AP ②;
    • AP send the response frame to the host ③;

Figure 1-7 Passive scanning

  • Initiative scanning, shown in Figure 1-8.
    • The radio host broadcasts the request frame to AP ①;
    • APs send probe response ②;
    • The radio host sends the association request frame to the chosen AP ③;
    • The chosen AP sends the association response frame .

Figure 1-8 Imitative scanning

  1. Authentication
  • When Associated, the radio host may need to authenticate itself by authentication/identification mechanism;
  • By MAC address to authenticate
  • By user name/password to authenticate
  1. CSMA/CA and CSMA/CD
  • Base station should be full duplex for the ability of collision detection, which requires it have the ability to receive and send at the same time. However, the received signal strength is far less than the sent signal strength for WLAN adapter, which would consume too much energy to realize the collision detection. Therefore, most of wireless devices are generally half duplex.
  • Not all WLAN devices can detect the collision because of hidden terminals and attenuation, etc.
  • During the sending frame, if collision is detected, then base station don’t give up the sending frame, but finish sending the whole frame. Thus, if collision happens, in this time, the channels would be wasted.
  • Because the high bit error rate (BER), the sender would firstly transmit a frame to the receiver. After received it, the receiver would transmit a confirm frame to the sender in the SIFS period; then, after the sender receive this confirm frame, it would transmit the next data frame to receiver. If the sender don’t receive the confirm frame, it would retransmit the frame for several times.

Seg 4: wifi architectures

As for 2.4GHz, there are 14 channels. Each has 22MHz bandwidth, which is shown in Figure 1-3. Evidently, only channel 1,6,11 are the channels which are not intertwined each other.

Figure 1-3 wireless channel

  1. Wi-Fi architecture

    Figure 1-4 Infra networks

    Wi-Fi has two main modes: Infra and Adhoc networks

    1. Infra networks
      1. Minimum element: BSS (Basic Service Set), shown in Figure 1-4.
  • One or more radio hosts;
  • AP: Access Point, i.e., BS (Base Station)
  • Radio hosts communicate with the outside by AP
  • Inter-connection among APs by the inter-connection with Hub/Switch /Router
  1. SSID (Service Set Identification)
  • Manager assigns a SSID less than 32 bytes for an AP;
  • A BSS can exist lonely. It can also be connected to another BSS by the connection with DS (Distribution System) for the constitution of ESS.
  1. ESS (Extension Service Set)

ESS is composed of several APs and DS. All of the APs share an ESSID, and an ESS can include several BSS, as shown in Figure 1-5.

Figure 1-5 ESS

  1. DS (Distribution System)
  • Distribution System, which is used to the logical connection BSS, and provide the roam distribution system for the wireless APs.
  • When DS is used, then all of the BSSes seem like a BSS in a BSS.
  • DS is usually denoted by Ethernet, point-to-point link or other wireless networks.
  1. Adhoc networks
  • No AP center control
  • Generally no connection to the outside networks

Figure 1-6 Adhoc networks

Seg 3: wifi features and frequency band

  1. Features of Wifi
  • Constitution of network is flexible. It can be infrastructure mode, or a self-organizing mode;
  • Mature technology and rich application;
  • Low price devices;
  • Low power, small recover range;
  • Woring at the frequency 2.4GHz, which is the same as IMS (Industrial/Medical/Scientific). Thus, it may be relatively easy to be interfered. Moreover, Microwave ovens, and cordless phone are also working at IMS frequency.
  1. Wireless frequency band

ISM frequency band is reserved for the Industrial/ Scientific / Medical use, which is specialized by FCC. Nowadays, most countries all over the world open this frequency band by following this standard. But the ISM frequency is not unified in these countries. We cannot be allowed to use these frequency bands, i.e., 900MHz, 2.4GHz, 5.7GHz; but the transmitted power must be lower the specialized power (generally lower 1W) and the utilized frequency cannot interfere with other frequencies. At present, most of the wireless products are working at 2.4GHz. And the 802.11 protocol families are shown in Table 1-1.

Table 1-1 Wireless Frequency





Release time

Sept. 1999

Sept. 1999

June. 2003

Jan. 2004





2.4Ghz5Ghz(2.4Ghz or/and 5Ghz







About 100m

About 50m


Several Km

Max rate







Not with 11b/g




Seg 2: Wifi history

  • In 1996, Lucent in America firstly launched to set up Wireless Ethernet Compatibility Alliance (WECA), which aimed at the wireless local area networks (WLAN).
  • In 1999, WECA was renamed as Wi-Fi alliance, which would design an approval standard again. In this case, the alliance presented a series of wireless networks technology 802.11 in wireless communication, such as 802.11b, 802.11a, 802.11g, 802.11n, and so on.
  • Wi-Fi alliance committed itself to generate the 802.11 products and to solve the compatible problems. Note that, 802.11 is not denoted the wireless network. It is just one of the wireless networks.
  • Wireless Local Area Network can be abbreviated as WLAN. By this wireless communication technology, all the computer devices, pda, mobile phone and other many connectable devices, could communicate with each other by the wireless networks. Furthermore, if we use the wireless communication networks, all of the devices can be connected each other with no cable. It is would be much more mobile and flexible. Fortunately, wifi is the kind of wireless networks technology.

    Figure 1-2 wireless communication networks

  • Difference between Wifi, bluetooth, and ZigBee: bluetooth (BLE) is one of the WPAN (Wireless Personal Area Networks) technology, while wifi belongs to WLAN (Wireless Local Area Networks) technology. The two technologies can provide the different wireless networks services. Moreover, there exists an entitative difference for the realization of the two technologies.
  • The effects of WIFI radiation on human body: general speaking, the transmission power is much weaker than that of the mobile phone. For example, the transmitted power is about 60~70mW, while for mobile phone, the power is 200mW or so. What is more, wireless cannot directly touch the people tissue, but mobile phone must. So, the power to body is less than 1mW, and thus can be ignored.

Seg 1: What is wifi

  1. Problem presentation: know Wi-Fi

In the basic part of Arduino, we have known Arduino to some extent. From this part, we will come to learn the knowledge on the combination of Arduino and wireless communication, which can promote us interact with Arduino. In the first chapter, we will simply get at the relevant concepts and basic knowledge about Wi-Fi (which is also written as wifi) to prepare the future work.

  1. What is wifi

WIFI is the abbreviation of Wireless Fidelity, which is a technology working in the vicinity of the frequency 2.4/5GHz. Its velocity is relative high, and the distance is relative long. Moreover, it is compatible with the existing 802.11 DSSS devices. DSSS (Direct Sequence Spread Spectrum) is a wireless sequence transformation way with high security and anti-interference. DSSS can extend the signal spectrum at send end by utilizing the high velocity spread sequence. Naturally, at the receive end, by using the decoding with the same spread spectrum code sequence, the extended signal can restore to the original signal. This is the principle of direct sequence spread spectrum (DSSS). Wifi can be read as [waifai]. The wireless router shown in Figure 1-1 is already used the wireless communication technology, i.e., wifi.

Figure 1-1 Wi-Fi wireless router