An in-depth understanding of Android: Wi-Fi, NFC, and GPS

Source: Internet
Author: User

I would like to thank Mr. Duan for his careful feedback. No matter how detailed he was in the early stage, there were still some mistakes in the writing process. Here we will sort out the errors reported by the younger brother.

It takes a little time to respond to the bug later.

 

P21:

"Check whether other hosts are used in the network" in the last 4th lines. The error message is displayed"

 

P43:

A spelling error occurs when the pseudo terminal is introduced in the middle of the page. The "pseudo terminal (psuedo terminal)" should be a pseudo terminal

The word psuedo can only be found in the youdao dictionary. I have Baidu's UNIX pseudo terminal and found that the spelling is indeed wrong. It should be pseudo terminal.

 

P69:

In the row 5th below Figure 3-3, "the length of the data frame to be sent is described in the RTS frame ", in the following line, "the length of the data frame to be sent by Station A is also attached to the CTS frame (copy the data from the RTS to the CTS) but I do not know the length of the data frame mentioned here in the specific RTS and CTS frames.

The RTS frame is as follows:

The CTS frame is as follows:

According to the Protocol (IEEE Std 802.11-2007), no representation field of the transmitted data length is found in the frame format of RTS, but a Duration field is found, but this field indicates the time, that is to say, the amount of time required by this RTS to transmit subsequent data or management frames, plus the CTS frame, ACK, and SIFS time.

 

The specific protocol is described as follows (on the 72 pages of the protocol ):

For all RTS frames sent by non-QoS STAs, the duration value is the time, in microseconds, required to transmit the pending data or management frame, plus one CTS frame, plus one ACK frame, plus three SIFS intervals.

 

Similarly, CTS does not find the frame length field for data transmission. The Duration field also exists, indicating the time.

My translation is not good. The specific agreement is described as follows (page 73 of the Agreement ):

For all CTS frames sent in response to RTS frames, the duration value is the value obtained from the Duration field of the immediately previous RTS frame, minus the time, in microseconds, required

Transmit the CTS frame and its SIFS interval. If the calculated duration between des a fractional microsecond, that value is rounded up to the next higher integer.

In addition, I found that you also described RTS on P91 in this book. The description here is based on the protocol description.

P83:Line 3: "in non-QoS situations, it is obvious that the data with higher UP values is prioritized." Here is the error. It should be"

 

P87:In line 3 of the Address domain: "0 ~ The 23th digit is the vendor's application to IETF and other organizations to indicate the vendor's code. "I checked the information and found that the OUI in MAC should be applied to IEEE. I found the protocol and Baidu encyclopedia documents as follows:

On the P128 page of IEEE Std802.11-2007, there is a sentence:

 

On the 151 page, there is also the following sentence:

The address in Baidu encyclopedia is as follows:

Http://baike.baidu.com/link? Url = Response

The organization's unique identifier (OUI) is assigned to the Organization by the Association of Electrical and Electronics Engineers (IEEE), which contains 24 bits (3 bits ). Each organization is assigned a global management address (24-bit or 3-byte). This address is unique for each Nic produced by the manufacturer.

 

P106:In 1. WEP introduction, "WEP is the veteran of the 802.11 standard. In 1999, the standard was born...". Didn't the standard come out in 1997?

 

P109:In the third row below the "standard reading prompt", "WPA adopts the new MIC algorithm". The MIC here should be interpreted as Message Integrity Code. See the Protocol (802.11-2012) message integrity code

The message integrity verification code is usually translated as "Message Integrity Verification Code". We recommend that you follow the protocol.

P111:In (1) Supplicant's explanation, "for wireless networks, Supplicant is a smart phone" is not suitable for beginners. for Wi-Fi developers, here is just an example. but for beginners, I think it is still not accurate.

 

P112:Figure 3-36 in the brackets of the first line: "EAP Over LAN, LAN-Based Extended EAP protocol", E in EAP itself means extended, and P means protocol. this should be interpreted as "LAN-based EAP. in this way, it is better to say "LAN-Based Extended Authentication Protocol ".

P162:

Figure 4-11 explains struct wpa_supplicant:

A ). l2 stands for Link Layer. that's right. however, beginners may not understand why l2 is a Link Layer. I think it is better to explain that l2 is Layer 2, that is, Layer 2. next, we will describe that Layer 2 is the data link layer and Layer 3 is the network layer.

B) When own_addr is interpreted, the number of ETH_ALEN is 16, but ETH_ALEN indicates the MAC address length, which is 6 bytes and 48bit.

C) when interpreting the 9th member variable bssid, there is a typo. Say "the elements are ETH_ALEN". It should be "the number of elements.

D). When interpreting the 12th member variables disconnected, there is a "Link", which should be "connection ".

P163:Row 3 explains the countermeasures reference the MIC, which is a Message Integrity Check. On the <5th-802.11> 2012 page, we usually call the MIC Message Integrity Check code, here C should be the meaning of Code.

We recommend that you refer to the preceding protocol.

 

P175:Line 3 sets the Wi-Fi device to work in the IF_OPER_DORMANT

 P188:When the member variable own_addr is explained in Figure 4-19, "ETH_ALEN, value 16": ETH_ALEN is the MAC address length, 6 bytes, and 48bit.

 

P199:In the first comment section under [state_machine.h], the eap sm is written as eap ssm, as follows: "And STATE_MACHINE_DATA is also a macro. For eap ssm ".

 

P225:The last few words in line 3: "All, let's look at it directly." here should be "so"

P229Intermediate part: "sort the scan results. The sorting function is wpa_scan_result_compar. It will follow the signal-to-noise ratio of the wireless network for sorting. The higher the signal-to-noise ratio, the stronger the wireless network signal." The highlighted part above, less comma in the middle

P242:The middle part of the wpa_supplicant_set_state () sentence is followed by the main "set wpa_sm to WPA_ASSOCIATED"

The error message is displayed.

 

P244:In the second line, the second half of the Comment: "moving the state machine to a series of actions", the statement is not smooth, and I guess it does not understand what it means for a long time.

 

P244:The last 11th rows. When analyzing eapo_sm_policy_portenabled, the left brackets are missing in the function prototype.

Void eapo_sm_policy_portenabled (struct eapo_sm * sm, Boolean enabled)

 

P248:The first line of "IE information for nl80211 .............." This doesn't work. You should have a comma after "IE information". You can read it from the last line on the previous page.

 

P251:The last 7th rows, the last few words: "But [23] There is a sentence." Here [23] is a reference, and it should be at the top of the mark.

P264:In this chapter 4.6.1, the 6th line "the process actually contains more code than the code in the book" is not fluent here. It should be "far more than what is given in the book", isn't it?

 

P276:In the last 10th lines, the module comment shows that the received signal strength, link speed, and noise are missing) and frequency ", with a comma missing after the link speed

 

 P278:Row 3: During WifiApConfigStore, "the configuration information is stored in/data // misc/wifi/softap. conf". Here there are two/

 

P279:In row 12th of wifi_start_supplicant (), the "// P2P _ PROP_NAME value is ...." Here, a space is added after P2P.

 

 P286:The end of the second line is missing. I compared the rest of the area. Here, a full stop is needed.

 

P303:The first row is located at the bottom of Step 5.

"Initialize WPS-related information and set WifiState"

I feel that WPS is misspelled here, because I have studied this function and have not found any WPS-related code. Is your intention WPAS?

 

 P323:The third line "and add a wireless device for the WLAN" contains a space.

P336:In the middle of the last 7th rows: "This process involves M1 ~ M8-related knowledge. "The error message here should be

 

 P355:At the end of Row 3: "wpas_wps_ssid_wildcard_ OK", the function is bold, but the first letter w is not.

The format is inconsistent. Check whether the format is correct.

 

 P362:The second half of the second row under case EAP_CODE_REQUEST is "ESC_Start is an extended EAP protocol"

This problem was raised in the previous chapter, that is, EAP itself refers to the meaning of the Extended Authentication Protocol. Here, the extended EAP protocol is a bit repetitive. I remember the problem mentioned in the previous chapter. If you want to modify it, I will change it here.

 

P366:The intermediate section describes the spelling of WPAS in the sentence below wps_get_msg. I often misspelled it at the beginning. "We have already introduced M1 ~ M8 content. In WAPS code ...."

 

 P323:The last 8th rows Define table J-4 for reference [5"

I think it is a bit difficult to describe here. "references" should be a term,

Here, the "Reference" is changed to a verb, and the "document" is changed to a noun. The true meaning will not be misunderstood, but it is a bit awkward to read.

 

Protocol 3:The value of OUI SubType in Table 7-4 is listed again in the Type column in Column 2nd on the right of the table. The value is described in the 4 P2P Invitation Response field because it is listed at the end of the column on the left. this is already repeated.

When I saw this, I also carefully looked at the differences between the two.

 

Lifecycle 4:When talking about GO Intent, Row 3 says, "this field is 1 byte long. Currently, only the first eight bits of this byte are used ",

Here, is one byte not 8 bits, so the description here is "the first eight bits of this byte are used.

According to the protocol, this byte is indeed not full. A bit in the bytes represents the Tie Breaker, and 4 bit represents the Intent, because the maximum value is 15, because 4 bit is enough.

It is my GO Intent. The value of this byte is 0C, so GO Intent is 6, and Tie Breaker is 0.

 

 

 

Limit 4: The last 3rd rows "the Tie Breaker is a random value, so the two devices have a very low probability of the same Tie Breaker value"

I don't think the probability of the same value is too low. The Tie Breaker is only 1 bit, and the values can only be 0 and 1. The following four values exist:

00 01 10 11

From the above, the probability that all devices take 0 and 1 is 50%.

P407:The second half of the last 6th rows "is processed in P2pEnabeldState, and wpas_supplicant will initiate the P2P Device Discovery process ....." Wpa_supplicant is spelled incorrectly here.

 

 P412:The p2p_config description in Figure 7-29 mentions that the type and length of dev_addr is a MAC address, so the type must be char, and the Code shows that it is u8, that is, unsigned char, the length is 6 bytes.

Therefore, the description in the book is an int array and the length is 8 bytes.

 

 

P424:In the description of wpas_start_llisten, the 3rd line "calls the wpa_driver_set_ap_wps_p2p_ie function of deriver_nl80211.c, which is used to call Probe Response frame information and Association Response frame information ."

The above sentence cannot be answered, and half of it is lost. So I cannot understand what it means.

 

 

 

 

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.