MT7681 Smart Connection Technical Analysis
The first contact with the MTK7681 chip in October 14, when used when the transmission module, with the mobile phone to achieve remote control, it is natural to be able to configure the module's WiFi on the phone, it did not seem to support AP mode, but support a smartconnection technology, You can not configure the WiFi without the AP, the library on the mobile phone (Android) can be configured.
At the beginning of the call to some of the underlying driver to achieve this function, the mind also think in the iOS should not be able to use it (we all know that the iOS app has very few permissions, if it is not possible to use the driver), and then asked the next sell module business said there is an iOS solution, Also provides a library call on the line.
This is the heart of the write conjecture, should be pure application layer implementation. But later due to change the esp8266 chip also did not follow up research.
These two days send esp8266 support mixed mode, can do sniffer, combined with some previous ideas, I can also implement smart connection on esp8266, Now the mobile phone to connect to the AP configuration is a bit slow and iOS does not support program control WiFi switch, pick up the previous ideas, continue to see how MTK is implemented.
Nonsense a bit more, below the beginning of the text:
Since the configuration is to be implemented, the core point is:
- Sending of configuration data
- Receive configuration Data
Since the realization of pure application layer, grasping package is sure to find out what, with Wireshark capture the results of the package such as:
Sure enough to send a lot of UDP packets, it must be through these packages to send WiFi configuration information, continue to analyze the content of each package is the same and completely do not carry any Wi-Fi configuration related things:
But here also found that the IP address of each package is a multicast address, and the second paragraph has a regular increment, and a packet of packet number is very similar, the following two is very much like a packet carrying data, continue to see also found that the destination IP address and MAC address is related:
MAC address and IP of the last 3 paragraphs are always the same, the first 3 of the MAC is always fixed, check the multicast IP address and MAC address is mapped, if the guess is right 数据发送 this point we found, and then think about how to receive it on the chip.
Since it is stored in the MAC data, and in the sniffer should be able to see the MAC address, check the next 802.11 protocol, the frame head can see the MAC address, the data will be sniffer to the frame header resolution, MAC address with the MAC address before the packet to the exact same, 数据接收 This point has now been found.
The data is sent through the multicast IP address->mac address, on the chip sniffer receive, to this smart connection process to pass.
MT7681 Smart Connection Technical Analysis