WiFi Quick Connect and smartconfig introduction

Source: Internet
Author: User
Introduction

Smartconfig is actually a kind of Wi-Fi technology provided by some chip manufacturers, the purpose is to make smart home appliances and other devices can easily and quickly connected to the WiFi. Different manufacturers of this Wi-Fi technology is not the same as the term, other names such as Smartconnection, Easyconnect, Simpleconfig, Airkiss and so on.

Why do I need WiFi fast-connect technology? Some smart home appliances, not like computers, mobile phones and other display interface can be used to choose WiFi hotspot to connect, but smart appliances, smart home and must be able to connect to the network, so the WiFi fast technology is produced. smartconfig principle

At present, the realization of smartconfig general needs of the device is: Mobile terminal (mobile phone or tablet), smart home appliances, routers. Its specific implementation of WiFi fast connection principle has the following two kinds:
1: Mobile terminal connected to the WiFi, open the smart hardware manufacturer to connect the smart hardware app, the interface is usually as shown below (generally will automatically identify the mobile terminal connected to the WiFi hotspot name), and enter the password. At this point, the operation of intelligent hardware (usually a few seconds of intelligent hardware key), the smart hardware will scan all the WiFi channels in the environment, listen to the channel in the transmission of the message, the mobile app will connect the WiFi SSID and password encoded into the UDP message, broadcast packets or multicast packets sent, The smart hardware decodes the UDP message, obtains the correct SSID and password, and then actively connects the route specifying the SSID to complete the connection.

2: Another connection method is called AP mode. Smart hardware first uses its own WiFi chip, artificial operation of intelligent hardware (usually also pressed a few seconds of intelligent hardware of a function key), to produce a hot spot (the general hot name is the product name or product serial number, etc.), hand scan to the hotspot, through the phone to connect the hotspot, forming a local area network. At this time, through the app, select the name of the WiFi you want to connect, enter the WiFi password, the phone sends the SSID and password of the WiFi to the smart hardware, so that the WiFi connection.
The above two methods can be seen, AP mode is a step more than the first way, because of the variety of routers and mobile phone brands, smartconfig there is a certain compatibility problem, AP mode relative to the first way, the success of connecting WiFi is more reliable. So at present, general manufacturers still retain AP mode, as smartconfig after the failure of the standby distribution network scheme.

It is important to note that after the smart hardware connection WiFi is successful, the phone will not be able to directly interact with the smart hardware, after the so-called mobile phone control intelligent hardware, is the mobile phone command sent to the cloud Server –> Server transfer data to the router –> router transmits data to the smart hardware –> The smart hardware parses the data and responds. data interaction in the Smartconfig process

From the above, when the smartconfig, the hand of the UDP packet to send the SSID and WiFi password to the smart hardware, currently, there are two commonly used UDP packet, UDP broadcast and UDP multicast.

Since wireless data transmission must be broadcast, it must be heard by the supervisor. If the wireless transmission data is not encrypted, UDP can directly send the relevant information. However, routers are generally encrypted, and the encryption method is not fixed. Therefore, the WiFi module cannot parse the packet directly. UDP broadcast

The 802.11 frame format is shown below:

From the 802.11-frame format analysis, the wireless signal listener's point of view, regardless of the wireless channel is not encrypted, DA, SA, LENGTH, LLC, SNAP, FCS fields are always exposed, so the signal listener can obtain valid information from these 6 fields. From the sender, due to operating system limitations, if broadcast, only the length field is left. The sender can use the length field of the packet for data transfer as long as it specifies a set of communication protocols that take advantage of the long encoding. UDP Multicast

The multicast address is reserved for Class D addresses from 224.0.0.0-239.255.255.255
The IP address is mapped to the MAC address by setting the first 25 bits of the MAC address to 01.00.5e, while the last 23 bits of the MAC address correspond to the bits of the IP address.
So the sender can encode the data in the post 23bit of the multicast IP, send through the multicast packet, and decode the receiver.

Add:
1. After the receiving end enters the one-click Configuration function, the smart hardware listens to the data on the route starting from Channel 1. If the current listening channel has a conforming packet, stop the channel switch and stay on the current channel to receive all the data. Otherwise, switch to channel 2.3.4 ... until channel 14 continues listening from Channel 1 and then loops.

2. Smart hardware can scan APs that exist in the current environment before turning on promiscuous mode. Gets the channel for all current APS, and then listens only to the channel that is currently being scanned. If there are only 2 routes in the current environment, respectively, in the 1 and 6 channels, you only need to scan channel1 and channel6 in turn, which can improve the efficiency of the configuration.

Reprinted from:
https://blog.csdn.net/flyingcys/article/details/49283273
Reference:
https://blog.csdn.net/sadshen/ Article/details/47049129#reply

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.