Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

IoT era: analysis and Summary of Wi-Fi "Distribution Network" Technology

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Guide reading

In recent years, the Internet of things market competition is fierce, from the Internet of things platform manufacturers, equipment manufacturers, to service providers, are pouring into this Red Sea. It is estimated that by 2020, the number of globally connected devices will reach 26 billion, with a compound annual growth rate of 20 per cent. The data brought by globally connected devices will reach 44ZB, which will be 22 times that of 2012, with a compound annual growth rate of 48 per cent.

Cdn.xitu.io/2019/8/22/16cb74e1f9ddce36?imageView2/0/w/1280/h/960/format/webp/ignore-error/1 ">

The demand for Network in the era of Internet of things

System level of the Internet of things

The Internet of things system is divided into three levels: perception layer, network layer and application layer.

Perception layer: it solves the problem of data acquisition in the human world and the physical world, which is composed of various sensors and sensor gateways. This layer is considered as the core layer of the Internet of things, mainly the intelligent collection of object identification and information. It consists of two parts: basic sensing devices (such as RFID tags and readers, various sensors, cameras, GPS, QR code tags and readers, etc.) and a network of sensors (such as RFID networks, sensor networks, etc.). The core technologies of this layer include low-speed and medium-speed short-distance transmission technology, self-organizing network technology, collaborative information processing technology, sensor network middleware technology and so on. the core products involved include sensors, electronic tags, sensor nodes, wireless routers, wireless gateways and so on.

Transport layer: also known as the network layer, which solves the access and transmission function of the data obtained by the perception layer, and is the data path for information exchange and transmission. The transport layer of the Internet of things is divided into wired communication transport layer and wireless communication transport layer. Wired communication technology includes medium and long distance wide area network and short distance field bus; wireless communication layer is divided into long distance wireless local area network, medium and short distance wireless local area network and ultra short distance wireless local area network. As the network layer of the Internet of things undertakes a huge amount of data and faces higher quality of service requirements, the Internet of things needs to integrate and expand the existing network, using new technologies to achieve more extensive and efficient interconnection functions.

Application layer: also known as processing layer, which solves the problems of information processing and man-machine interface. The data transmitted by the network layer enters all kinds of information systems in this layer for processing and interacts with people through a variety of devices. The processing layer consists of business support platform (middleware platform), network management platform (such as M2M management platform), information processing platform, information security platform, service support platform, etc., to complete the functions of collaboration, management, computing, storage, analysis, mining, and providing services for industry and public users. Typical technologies including SOA technology, mass storage, distributed data processing, data mining, information management and other advanced technologies can be widely used.

Between each layer, the information is not unidirectional transmission, there can be interaction, control, etc., the transmission of a variety of information, including the identification code that can uniquely identify the item and the static and dynamic information of the item in the specific application system.

Although the application characteristics of the Internet of things in various economic and social fields such as environmental monitoring, intelligent power, intelligent transportation, industrial monitoring and smart home are very different, the basic architecture of each application includes three levels: perception, transmission and application. Professional application subnets in various industries and fields are based on three-tier basic architecture.

The difference between Internet of things access Protocol and Transport Protocol

We divide the communication protocols of the Internet of things into two categories, one is access protocols, the other is transport protocols:

The access protocol is generally responsible for the networking and communication between the devices in the subnet. Most of the access protocols do not belong to the TCP/IP protocol family and can only be used for the communication in the equipment subnet (the local area network composed of the equipment and the gateway). The transmission protocol is mainly the device communication protocol running on the traditional Internet TCP/IP protocol, which is responsible for the equipment to exchange data and communicate through the Internet.

Internet of things devices with access protocols need to be converted into communication protocols through gateways in order to access the Internet. On the other hand, the Internet of things devices using communication protocols can be directly connected to the Internet.

The commonly used access protocols include Wi-Fi, RFID, NFC, ZigBee, Bluetooth, LoRa, NB-IoT, GSM, GPRS, 3Universe 5G network, Ethernet, RS232, RS485, USB and so on. The commonly used communication protocols include HTTP, CoAP, MQTT, XMPP, AMQP, JMS and so on. The access protocol is located in the physical / digital chain layer of the network hierarchy, and the communication protocol is located in the application layer.

The differences between Internet of things access protocol and communication protocol are as follows:

So, now that there is a communication protocol that can directly access the Internet, what is the significance of the access protocol? Compared with the communication protocol, the access protocol relies on lower hardware resources, lower power consumption and less data transmitted by the network, so it has more advantages in some scenarios such as the control field.

In these scenarios, Internet of things devices often do not have an external power supply, so power consumption is required to be as low as possible. For example, a button battery can power for a year or so. Such a requirement is incompetent by the hardware environment required by protocols such as HTTP.

Several commonly used access protocols for the Internet of things

At present, the common access protocols in the market are ZigBee, Bluetooth and Wi-Fi protocols.

At present, ZigBee is widely used in the field of industrial control, and there are also some applications in the field of smart home. It has the following main advantages:

① low cost: ZigBee protocol data transmission rate is low, the protocol is simple, so the development cost is relatively low. And the zigbee agreement is also free of patent fees.

② low power consumption: due to the low transmission rate of ZigBee protocol, the transmission power required by the node is only 1mW, and uses sleep + wake mode, the power consumption is very low.

③ ad hoc network: through the mesh function of ZigBee protocol, up to 65000 nodes can be connected in a sub-network, and a large-scale sensor network can be realized quickly.

④ security: use crc to verify the integrity of data packets, support authentication and authentication, and use aes-128 to encrypt the transmitted data.

The best application scenario of ZigBee protocol is wireless sensor network, such as water quality monitoring, environmental control and other nodes need to be self-organized network to transmit data to each other in the industrial scene. In these scenarios, the advantages of ZigBee protocol are very obvious. At present, many manufacturers at home and abroad also use ZigBee in smart home solutions.

Bluetooth protocol is very familiar to everyone, especially with the rapid development of Bluetooth 4.0 protocol, it has become a standard communication component of smart phones. There are two main reasons why Bluetooth 4.0 has developed rapidly in recent years:

① low power consumption: I think this is the killer of Bluetooth 4.0. Bluetooth 4.0 devices using button batteries can run for more than a year, which is very attractive to wearable devices that don't want to charge frequently. At present, the basic wearable devices in the world basically choose Bluetooth 4.0 scheme.

② can be accessed by mobile phone: in recent years, supporting Bluetooth protocol has basically become standard for smartphones, and users do not need to purchase additional access modules.

The biggest advantage of Bluetooth is that it does not depend on external network, portable and low power consumption. As long as there are mobile phones and smart devices, you can maintain a stable connection and connect to wherever you go. So most sports and outdoor equipment will give priority to Bluetooth. Its main shortcomings are: it can not be directly connected to the cloud, the transmission speed is relatively slow, and the networking ability is relatively weak.

Wi-Fi protocol, like Bluetooth protocol, has been greatly developed at present. Due to the rapid popularity of household Wi-Fi routers and smartphones in the past few years, Wi-Fi protocol has also been widely used in the smart home field:

① Wi-Fi can access the Internet directly: compared with ZigBee, the smart home scheme using Wi-Fi protocol saves the extra gateway and the dependence on mobile terminals such as mobile phones compared to Bluetooth protocol.

The biggest advantage of ② Wi-Fi is that the connection is fast, lasting and stable, and it is the first choice for IoT device-side connection. The only thing to consider is that the dependence of smart devices on the coverage of Wi-Fi results in a relatively small range of smart devices activities, which is not suitable for carrying and outdoor scenes at any time.

The power consumption equivalent to Bluetooth and ZigBee,Wi-Fi protocols has become a major bottleneck in its application in the field of the Internet of things. However, with the introduction of low-power, low-cost Wi-Fi soc (such as esp8266) by major chip manufacturers, this problem is gradually being solved.

What is meant by "distribution network"

"networking" and "automatic networking" of WIFI

Networking: generally refers to the process in which a Wi-Fi device connects a hotspot AP or router through SSID and password to join the network established by the latter. Automatic networking: generally refers to the Wi-Fi device after starting, disconnecting, or scanning to a specific SSID, will use the previously saved SSID and password, automatically connect to the hotspot AP or router, without the need to manually re-enter. Among them, the "automatic connection" of WIFI equipment after being disconnected is often called "automatic reconnection". Automatic networking: it is generally necessary to save the SSID and password after the previous successful distribution, so that it can be read and used from the saved address when you need to "automatically connect to the network".

Wi-Fi 's "Distribution Network"

"Distribution network" means that the SSID and password are provided externally to the Wi-Fi module so that the Wi-Fi module can connect to the designated hotspot or router and join the relevant Wi-Fi network established by the latter.

Wi-Fi module is generally unlike computers, mobile phones or tablets and other devices, has a rich human-computer interface, can easily achieve distribution network, therefore, the "distribution network" support of Wi-Fi module will become a basic topic of Wi-Fi module features.

It is often one of the selling points of Wi-Fi module, but also the user of Wi-Fi module, which can provide convenient, flexible and diverse distribution network with few constraints. It is an important aspect of evaluation that needs to be carefully considered in type selection.

Common Distribution Network Mode and principle realization of Wi-Fi

Common distribution methods can be classified into the following categories: direct distribution network, WPS distribution network, WEB distribution network, SoftAP distribution network, intelligent distribution network, acoustic distribution network. Users can choose the most suitable distribution network according to the specific use situation.

Direct distribution network

The so-called direct distribution network is to transfer SSID and password directly to the WIFI module through UART serial port, SPI port, SDIO port, I2C and other host interfaces, according to certain communication protocols. After receiving the SSID and password, the Wi-Fi module connects to the hotspot or router and returns the result of the connection from the host interface. At present, the zebra buggy machine uses this way to connect and stare.

For example, common AT instruction distribution network through UART serial port, SPI API function distribution network, SDIO API function distribution network, I2C API function distribution network and so on.

The implementation of the software scheme of direct distribution network is simple, but it needs to lay other communication lines, which is more suitable for on-board WIFI module or equipment connected by other protocol transmission lines. Therefore, the requirement for the environment is relatively high, and there is a need for other communication links between systems.

WPS distribution network

WPS in router is a new Wi-Fi Security Protection setting (Wi-Fi Protected Setup) standard introduced by Wi-Fi Alliance. The main reason for this standard is to solve the problem that the steps of wireless network encryption and authentication are too complicated and difficult for a long time. WPS is used to simplify the security settings and network management of Wi-Fi wireless. It supports two modes: personal identification number (PIN) and button (PBC) mode.

This approach requires the module to support WPS functionality. Users often do not make any encryption security settings because the steps are so troublesome, which leads to a lot of security problems. Because of security, it has been gradually abandoned in recent years, and more and more routers begin to give up or automatically turn off the support for this way.

WEB distribution network

A simple WEB server is embedded in the Wi-Fi module which supports AP mode, and the interactive interface of distribution network is provided in the WEB web page. Other network devices (such as mobile phones, tablets, computers, etc.) are directly connected to the AP hotspot of the Wi-Fi module, open the WEB web page in the browser, and configure the Wi-Fi module in the WEB web page to connect to other AP or routers.

This is due to the fact that in recent years, more and more Wi-Fi chip solutions have begun to support STA+AP mixed mode (that is, the WIFI module can be used not only as a workstation STA to connect to other routers or hotspots, but also as a hot AP for other WIFI device nodes to connect), and also due to the increasing integration of many Wi-Fi chip solutions in recent years.

The IP protocol stack is directly integrated into the Wi-Fi module, so a WEB server can be directly implemented on the Wi-Fi module, and the server can be accessed directly through the AP mode of the Wi-Fi module (no need to rely on other networks, mobile phones and other devices directly access the Wi-Fi network and WEB web pages established by the WIFI module for configuration).

The basic idea of this distribution network is that the Wi-Fi module works in STA+AP mixed mode and starts the embedded WEB server. The Wi-Fi device such as a computer phone or tablet connects to the AP hotspot established by the WIFI module, and obtains an IP address (that is, the Wi-Fi local area network established by the hot AP mode with this Wi-Fi module). Then Wi-Fi devices such as computers, phones or tablets access the WEB server on the Wi-Fi module through the standard browser on it, and complete various configurations in the open WEB web page, including setting the SSID and password of the Wi-Fi module to link to third-party hotspots or routers in STA mode, and letting the WIFI module connect to other hot spots AP or routers as STA.

SoftAP distribution network

SoftAP distribution network is widely used in Xiaomi smart home products. The principle is to start the TCP service in the Wi-Fi network, configure the SSID and password through TCP, and make the intelligent hardware access to the designated router.

After the machine is reset, the intelligent hardware will first work in the AP mode of Wi-Fi, and turn on the TCP server and enter the listening state.

At this time, the mobile phone is used to access the AP hotspot, and after the connection is successful, the client is opened, and the mobile phone will connect to the TCP server. After the three-way handshake connection is successful, the protocol data is transmitted, including the SSID and password of the Wi-Fi to be connected by the specified smart hardware.

The hardware successfully received the data packet sent by the mobile phone and parsed the Wi-Fi name and password. Reply to the phone is trying to connect. Turn off AP mode, turn on station mode to connect to the router, and successfully connect to the designated router. Then the mobile phone switches back to the designated router and turns on UDP communication, and the intelligent hardware broadcasts the successful data of the distribution network using the UDP protocol.

Intelligent distribution network (SmartConfig/SmartConnection....)

The so-called intelligent distribution network uses the WIFI signal of the Wi-Fi device itself, fills the SSID and password in the unencrypted header part of the MAC packet according to a certain protocol format in the MAC layer, and transmits the SSID and password to the WIFI module many times from mobile phones and other devices by broadcasting and grabbing the packet.

At present, a variety of common SmartConfig/SmartConnection technologies in the market, although each Wi-Fi chip scheme will take different English names, but the basic principle is basically the same, but the filled data protocol format is slightly different.

Intelligent distribution networks generally need to install an APP on devices that send SSID and passwords, such as mobile phones, and the APP implements protocol interaction with Wi-Fi modules (sending SSID and passwords).

This function was first proposed by TI and applied to CC3200; however, in principle, as long as the chip driver supports turning on hybrid mode (Wi-Fi Promiscuous), it can support one-button distribution network function, but different manufacturers have different names and coding methods.

SNAP: format packet

DA: destination MAC address

SA: source MAC addr

LENGTH: indicates the length of the following data

LLC: indicates the LLC header

SNAP: represents the vendor code of 3byte and the protocol type representation of 2byte

DATA: load data

FCS: frame check sequence

Since wireless data transmission must be broadcast, it must be monitored; if AP is not encrypted, UDP can send relevant information directly. But the router AP is generally encrypted, and the encryption method is not fixed.

The Wi-Fi module cannot parse the packet directly. From the MAC layer frame format of 802.11, we can see that the link layer load data (that is, the head of the network layer and the number of network layers) are clearly discernible in the data frame. As long as 802.11 frames are received, the load data can be extracted immediately. It is needless to say that the length of the load data is calculated, and the load data here is usually ciphertext.

On the sending side, two different encoding transmission methods can be used:

UDP broadcast: from the 802.11 frame format analysis, from the point of view of the wireless signal listener, regardless of whether the wireless channel is encrypted or not, the DA, SA, LENGTH, LLC, SNAP and FCS fields are always exposed, so the signal listener can obtain valid information from these six fields. From the sender, due to the limitation of the operating system, if broadcasting is used, only the LENGTH sender can control it by changing the length of the packet it needs to send. So as long as you specify a set of communication protocols that use length coding, you can use the Length field of the packet for data transmission; UDP Multicast: the multicast address is reserved for Class D addresses from 224.0.0.0 to 239.255.255.255. The mapping relationship between the IP address and the MAC address is as follows: the first 25 bits of the MAC address are set to 01.00.5e, while the last 23 bits of the MAC address correspond to the bits of the IP address. Therefore, the sender can encode the data in the post-23bit of the multicast ip, send it through the multicast packet, and then the receiver can decode it.

After the receiver enters the one-click configuration function, the Wi-Fi intelligent hardware starts to listen to the data on the route from channel 1. If the current monitoring channel has regular data packets, it stops the channel switching and stays in the current channel to receive all the data. Otherwise, switch to channel 2.3.4 in turn. Until channel 14 and then continue to listen in turn from channel 1.

Of course, Wi-Fi intelligent hardware can scan the AP existing in the current environment to obtain all the current AP channels before turning on the hybrid mode, and then only monitor the current scanned channels in turn. For example, there are only two routes in the current environment, one at 1.6 channels, and only need to scan channel1 and channel6 in turn, which can improve the configuration efficiency.

Acoustic distribution network

Acoustic distribution network, that is, through the mobile phone to send sound waves, SSID, password and other information to the equipment of a distribution network. Through the mobile phone playing sound waves, the initialization connection information of the Wi-Fi is transmitted to the intelligent device, and the device identification completes the Wi-Fi initialization process to establish the network connection.

To some extent, acoustic transmission can be understood as a near-field communication technology similar to NFC. It is suitable for intelligent devices without touch screen or small touch screen which is not easy to input information, but with microphone, such as dialogue robot, intelligent audio and so on. Its advantage is that the distribution network is fast and perceptible, and the disadvantage is that it is greatly disturbed by the environment.

To realize the acoustic distribution network, we first need a set of specific algorithm library, which is divided into two parts: the mobile phone and the device. The mobile algorithm library converts the ssid information from a string to a sound signal (PCM), and then plays the sound signal through the audio module.

At the same time, the device records this sound, and then uses the same set of algorithm library to parse the sound information, restore it to the original ssid information (string), and finally use the parsed ssid information to connect WIFI.

The range of coding and decoding can be divided into low frequency, intermediate frequency and high frequency, in which the frequency range of low frequency is 2K~5K, the range of intermediate frequency is 8K~12K and the range of high frequency is 16K~20K. The higher the frequency, the sharper the sound and the stronger the anti-noise performance.

Obviously, the technical difficulty in the acoustic distribution network technology is the acoustic transmission technology. And the application of sound wave transmission is already very wide: the sound wave payment of Alipay, the sound wave sharing of songs in QQ Music, eggplant fast pass, crickets and so on.

In fact, the principle is very simple, which can be approximately understood as symmetric encryption. The process of encryption and decryption is roughly as follows:

Only ASCII printable characters are transferred.

Transmits the UTF-8 string.

To put it simply, at the sending end, you map the characters you want to recognize into frequencies, and then map a frequency to a syllable signal (single-frequency sine wave) and encode it into audio playback; after receiving the audio signal, the frequency is parsed, and then the corresponding frequency characters are found according to the common code table on both sides, thus decoding the data.

Specifically, we can correspond the sinusoidal wave of 700HZ to the character 'axiomaginal 800HZ', the sinusoidal wave of 900HZ corresponding to the number 'cantilever, and so on. Then the digital string "abc" corresponds to a frequency string {700800900}, and then turns the frequency string into a three-syllable sine wave audio. If each syllable is specified to last 100ms, {700800900} corresponds to an audio segment of 300ms. The receiver records the sound, parses the received sound, identifies the three sine wave frequencies of 700Hz Magi 800HZ Magi 900HZ, then looks up the code table, and the decoded string is "abc".

The main flow of acoustic distribution network is as follows:

First of all, input ssid information (or obtain the current or system saved ssid information) in the mobile phone (or other generation devices such as tablets), encode the information from buffer into pcm data; play the pcm data encoded using the algorithm library through the loudspeaker, and at the same time, the device side opens the recording to capture the pcm data; the device side decodes the pcm data back to the original buffer data through the algorithm library Parse the ssid, password and other information from the data, and use it to connect to the router.

Selection of Wi-Fi Distribution Network in IOT scenario

As the most suitable technology for the connection of the Internet of things, Wi-Fi can be used as the adhesive of the Internet of things. With the infinite proliferation of connected nodes, the coverage and total amount of networking devices will also grow rapidly. It integrates RF transceiver, MAC, baseband processing, Wi-Fi protocol and configuration information and network protocol stack. Users can easily realize the wireless network function of serial port devices by using it. In practical use, users can choose according to the advantages and disadvantages of each distribution mode in the table.

Gao de released the Tmall Elf Gao de version set this year. The car box uses the camera of the mini3 driving recorder to realize the AR navigation function. In this case, the product function is fully considered, its security is demonstrated, and the distribution network mode of SoftAP is adopted.

Pay attention to Gaode technology and find more professional content in the field of travel technology.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report