CN113329349A - Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal - Google Patents

Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal Download PDF

Info

Publication number
CN113329349A
CN113329349A CN202110674524.9A CN202110674524A CN113329349A CN 113329349 A CN113329349 A CN 113329349A CN 202110674524 A CN202110674524 A CN 202110674524A CN 113329349 A CN113329349 A CN 113329349A
Authority
CN
China
Prior art keywords
mobile terminal
local area
intelligent equipment
area network
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110674524.9A
Other languages
Chinese (zh)
Inventor
冯蕾
陈乃阔
毕茂华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Chaoyue Shentai Information Technology Co Ltd
Original Assignee
Xian Chaoyue Shentai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Chaoyue Shentai Information Technology Co Ltd filed Critical Xian Chaoyue Shentai Information Technology Co Ltd
Priority to CN202110674524.9A priority Critical patent/CN113329349A/en
Publication of CN113329349A publication Critical patent/CN113329349A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a communication method between a mobile terminal and intelligent equipment in a Wi-Fi mode and the mobile terminal, wherein the method comprises the following steps: the mobile terminal encodes the distribution network request information in length fields of a plurality of data frames according to preset configuration in a grading manner, and generates a plurality of broadcast data packets through corresponding datagram protocols; the mobile terminal broadcasts a plurality of broadcast data packets to the surrounding environment through the router connected with the mobile terminal; the intelligent equipment receives a plurality of broadcast data packets and accesses a local area network where the mobile terminal is located according to the obtained distribution network request information; and the mobile terminal establishes communication connection with the corresponding intelligent equipment in the local area network according to a preset quick connection strategy. The invention not only avoids the requirement of each operating system on the operation authority, but also can realize faster intelligent distribution network operation because the authority verification is not needed to be carried out on the modification of the Length field by the way of encoding the distribution network request information in the Length field in the process of generating the data frame by the data link.

Description

Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal
Technical Field
The invention relates to the technical field of communication, in particular to a communication method between a mobile terminal and intelligent equipment in a Wi-Fi mode and the mobile terminal.
Background
With the deep application of the internet of things technology in various industries, smart homes are widely popularized. The smart home generally uses the mobile terminal to establish communication with the intelligent device, so that the functions of remote control, data transmission and the like are realized. If the distribution network of the intelligent device is set by using the touch screen, the requirement on the hardware configuration of the device is high, and the user experience is poor. Therefore, most of the existing intelligent devices provide corresponding network configuration technologies to solve the problem of distribution networks, and all large Wi-Fi chip manufacturers basically adopt an AP mode or a SmartConfig mode to set the distribution networks.
The intelligent device in the AP (Access Point) mode acts as a wireless router, the AP mode is carried out after the device is opened, the mobile terminal needs to search for and connect with the hotspot, a web server of a manufacturer is accessed through a browser, the SSID and the password of the router are set on a browser interface, and at the moment, the device can be used as a Station to connect to the corresponding router. However, the AP mode configuration process is complex, and the mobile terminal also needs to perform complicated setting, which is less likely. The SmartConfig technology proposed by American TI company is simple, convenient and quick, the wireless network card is in a hybrid mode and has a function of capturing the information packet, the mobile terminal encodes the information of network connection into a UDP message, the information is broadcast and sent, after the information is captured by intelligent equipment, the information can be successfully decoded to connect the established route, and the distribution network is completed. However, due to the difference of the operating systems of the mobile terminal (such as Android or IOS), during software development, no matter in the AP mode or in the SmartConfig mode, it is necessary to consider acquiring corresponding operating rights of two different operating systems, which brings difficulty to software development; in addition, the network distribution speed is low due to the fact that authority verification is needed in the network distribution process.
Disclosure of Invention
In order to solve the technical problems mentioned in the background art, in one aspect of the present invention, a method for a mobile terminal to communicate with a smart device in a Wi-Fi mode is provided, the method including: the mobile terminal encodes the distribution network request information in length fields of a plurality of data frames according to preset configuration in a grading manner, and generates a plurality of broadcast data packets through corresponding datagram protocols; the mobile terminal broadcasts the plurality of broadcast data packets to the surrounding environment through a router connected with the mobile terminal; the intelligent equipment receives the plurality of broadcast data packets and accesses the local area network where the mobile terminal is located according to the obtained distribution network request information; and the mobile terminal establishes communication connection with the corresponding intelligent equipment in the local area network according to a preset quick connection strategy.
In one or more embodiments, the distribution network request information includes: and the SSID check code, the password and the random code of the router connected with the mobile terminal.
In one or more embodiments, the mobile terminal encodes the distribution network request information in length fields of a plurality of data frames according to a preset configuration in a plurality of times, and generates a plurality of broadcast data packets via corresponding datagram protocols, including: the mobile terminal generates a plurality of data frames according to preset configuration, and encodes the SSID check code, the password and the random code of the router in length fields of the data frames in a plurality of times; and generates a UDP broadcast packet by appending a preamble field with an increasing length to each data frame according to a corresponding datagram protocol.
In one or more embodiments, the receiving, by the smart device, the plurality of broadcast packets and accessing the local area network in which the mobile terminal is located according to the obtained distribution network request information includes: the intelligent equipment receives a broadcast data packet in the surrounding environment, locks a channel of the router according to the received UDP broadcast data packet with the length increasing characteristic, and establishes connection with the router according to the obtained ssid check code, the password and the random code of the router so as to access the local area network where the mobile terminal is located.
In one or more embodiments, the intelligent device has a wireless network card capable of enabling promiscuous mode, and correspondingly, the method further includes configuring the wireless network card of the intelligent device to enable promiscuous mode so as not to screen the MAC address of the broadcast packet.
In one or more embodiments, a method for communication between a mobile terminal and a smart device in a Wi-Fi mode according to the present invention further includes: and the mobile terminal limits the effective digit of the length field according to preset configuration.
In one or more embodiments, the establishing, by the mobile terminal, a communication connection with a corresponding smart device in the local area network according to a preset quick connection policy includes: the mobile terminal actively scans and finds the intelligent devices in the same local area network through a preset function; and responding to the recognizable intelligent equipment in the local area network, and outputting corresponding intelligent equipment information in a list mode on a user interface provided by the preset function so as to allow a user to select connection.
In one or more embodiments, the method for establishing a communication connection between a mobile terminal and a corresponding intelligent device in the local area network according to a preset quick connection policy further includes: responding to the selection made by the user, the mobile terminal encodes the connection request information with the identification in the length field of the data frame according to the preset configuration; generating a UDP broadcast data packet according to a corresponding datagram protocol and broadcasting the UDP broadcast data packet to the local area network; the intelligent equipment in the local area network recognizes the identification and returns an IP address according to the corresponding request information; and the mobile terminal establishes communication connection with the intelligent equipment according to the obtained IP address.
In one or more embodiments, the method for establishing a communication connection between a mobile terminal and a corresponding intelligent device in the local area network according to a preset quick connection policy further includes: responding to the first establishment of communication connection between a mobile terminal and intelligent equipment, and sending safety verification request information to the intelligent equipment by the mobile terminal; responding to the passing of the security verification, and keeping the connection state of the mobile terminal and the intelligent equipment; and responding to the failure of the security verification, and disconnecting the mobile terminal from the intelligent equipment.
In another aspect of the present invention, a storage medium is provided, in which a computer program capable of running is stored, and the computer program is used to implement the steps of the method for communication between a mobile terminal and a smart device in Wi-Fi mode according to the above embodiments.
The beneficial effects of the invention include: the invention not only avoids the requirement of each operating system on the operation authority, but also does not need to carry out authority verification because of the modification of the Length field by a mode of encoding the distribution network request information in the Length field in the process of generating the data frame in the data link, thereby realizing faster intelligent distribution network operation; and moreover, a mode of firstly establishing communication connection and then carrying out safety verification is adopted, so that the quick and safe communication connection establishment is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for communication between a mobile terminal and an intelligent device in a Wi-Fi mode according to the present invention;
FIG. 2 is a diagram illustrating the encapsulation of ssid crc of a router into a data frame in a magic code format by the data link layer of the present invention;
FIG. 3 is a diagram illustrating a data link layer encapsulating a router's secret code into a data frame in a prefix code format in accordance with the present invention;
FIG. 4 is a diagram illustrating the encapsulation of a random code of a router into a data frame in a sequence header field format by the data link layer according to the present invention;
FIG. 5 is a schematic diagram of the data link layer of the present invention encapsulating other data into data frames in a data field format;
fig. 6 is a flowchart illustrating the communication connection and connection security verification between the mobile terminal and the smart device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Fig. 1 is a flowchart illustrating a method for communication between a mobile terminal and an intelligent device in a Wi-Fi mode according to the present invention. As shown in fig. 1, the method for communication between a mobile terminal and an intelligent device in a Wi-Fi mode according to the present invention includes: step S1, the mobile terminal encodes the distribution network request information in length fields of a plurality of data frames according to preset configuration, and generates a plurality of broadcast data packets through corresponding datagram protocols; step S2, the mobile terminal broadcasts a plurality of broadcast data packets to the surrounding environment through the router connected with the mobile terminal; step S3, the intelligent device receives a plurality of broadcast data packets and accesses the local area network where the mobile terminal is located according to the obtained distribution network request information; and S4, the mobile terminal establishes communication connection with the corresponding intelligent equipment in the local area network according to the preset quick connection strategy.
Specifically, the communication protocol of the lan conforms to the 802.11 wlan protocol specified by IEEE, which defines the specifications of the physical layer and the data link layer in the OSI model, and uses the IEEE802.2 protocol to control the encapsulation and carry the upper layer packet, and receives the data in the 802.2SNAP format. In other words, the Wi-Fi chip of the mobile terminal will intercept data from the data link layer in an 802.2SNAP data frame format, where the SMAP data frame format is shown in table 1:
table 1802.2 SNAP data frame format
Name (R) DA SA Length LLC SNAP DATA FCS
Length of 6Byte 6Byte 2Byte 3Byte 5Byte 38~1492Byte 4Byte
The DATA load is DATA load, the size is 38-1492 bytes, and the FCS is a cyclic check value. When the SNAP data frame is generated, due to the limitation of an operating system (such as an Android operating system and an iOS operating system) of the mobile terminal, the control of other fields except for the Length field needs extremely high system authority. Therefore, the distribution network request information is coded by the operable Length field, so that the requirement of each operating system on the operation authority is avoided, and the authority verification is not required to be carried out due to the modification of the Length field, so that the faster intelligent distribution network operation can be realized.
In a further embodiment, the distribution network request message includes an ssid check code, a password, and a random code of the router connected to the mobile terminal. Correspondingly, step S1, the mobile terminal encodes the distribution network request information into length fields of multiple data frames according to the preset configuration, and generates multiple broadcast data packets via corresponding datagram protocols, including: the mobile terminal generates a plurality of data frames according to preset configuration, and encodes SSID check codes, passwords and random codes of the router in length fields of the data frames in a plurality of times; and generates a UDP broadcast packet by appending a preamble field with an increasing length to each data frame according to a corresponding datagram protocol.
Specifically, the generation of the UDP broadcast packet by the mobile terminal needs to sequentially pass through corresponding data processing processes of an application layer, a data link layer, and a physical layer, and the specific process includes:
firstly, an application layer of a mobile terminal acquires an SSID of a router connected with the application layer, and calculates an SSID check code (SSID CRC) of the router and acquires a password and a random code of the router according to the SSID;
and then, the application layer sends the obtained SSID check code, password and random code of the router to a data link layer, the link layer encapsulates the data into a data domain, and the control domain is filled. The link layer data structure is divided into a magic code format field, a prefix code format field, a sequence header field format field, and a data field format field, and the process of encapsulating data by the data link layer is shown in fig. 2 to 5. Fig. 2 is a schematic diagram illustrating that the ssid crc of the router is encapsulated into a data frame in a magic code format by the data link layer according to the present invention; in fig. 2, the first two 9-bit information fields are loaded with the upper and lower 4 bits of the length of the content to be transmitted, and the last two 9-bit information fields are loaded with the upper and lower 4 bits of the SSID CRC, respectively. FIG. 3 is a diagram illustrating a data link layer encapsulating a router's secret code into a data frame in a prefix code format in accordance with the present invention; in fig. 3, the information fields of the first two 9bits are loaded with the high and low 4 bits of the cipher length respectively, and the length of the cipher is sent, so that the receiving side can conveniently segment and decrypt the received data. The information fields of the last two 9bits are loaded with the high and low 4 bits of the CRC check code with the cipher length respectively. FIG. 4 is a diagram illustrating the encapsulation of a random code of a router into a data frame in a sequence header field format by the data link layer according to the present invention; in fig. 4, including the index value and the CRC value, the protocol provides that the valid data is divided into 4 bytes, and less than 4 bytes are completed by 4 bytes. FIG. 5 is a schematic diagram of the data link layer of the present invention encapsulating other data into data frames in a data field format; in fig. 5, the most significant bit of each data frame is a control bit, fixed to 1, representing a data field, and the remaining 8 bits are loaded with data content.
And finally, the data link layer sends the generated data frames to the physical layer, and a Wi-Fi chip of the mobile terminal intercepts data from the data link layer in an 802.2SNAP data frame format to generate a data message in an SNAP format. Before sending a data message, in order to enable the intelligent equipment to lock a channel of the router and further utilize the obtained ssid check code, password and random code of the router to carry out automatic distribution network, the method adopts a four-byte leading domain covering channel, namely, UDP broadcast data broadcast packets with the lengths of X +1, X +2, X +3 and X +4 are added in front of each data frame. Therefore, when the intelligent device receives four groups of UDP broadcast data packets with the increment characteristic, the intelligent device can lock the channel where the sender is located according to the four groups of UDP broadcast data packets.
In a further embodiment, considering that the longer the length of the UDP broadcast packet is, the higher the packet loss rate and the higher the out-of-order rate is, the method of the present invention further includes the mobile terminal defining the number of significant bits of the length field according to a preset configuration. In a preferred embodiment, only the last 9bits of the Length field are used as encoding regions (as shown in fig. 2 to 5), thereby limiting the Length range of UDP broadcast packets to 0-511.
After the mobile terminal sends the UDP message encoded by the length field to the environment, the intelligent equipment monitors the wireless signal in a hybrid mode, restores the length field of the UDP broadcast data packet into related data information containing a router SSID check code, a password or a random code, and then completes Wi-Fi automatic configuration by using the related data information. The promiscuous mode is a signal receiving mode of a WiFi chip (wireless network card), and when the promiscuous mode is started, the WiFi chip (wireless network card) does not screen the MAC address of the broadcast data packet.
In a further embodiment, the intelligent device performs Wi-Fi automatic configuration to lock a channel of a corresponding router; therefore, in step S3, the method for accessing, by the smart device, the local area network where the mobile terminal is located according to the obtained distribution network request information after receiving the plurality of broadcast packets includes: the intelligent equipment receives a broadcast data packet in the surrounding environment, locks a channel of a router according to the received UDP broadcast data packet with the length increasing characteristic, and establishes connection with the router according to the obtained ssid check code, the password and the random code of the router so as to access the local area network where the mobile terminal is located.
The above process only realizes that the intelligent device actively joins in the local area network where the mobile terminal is located, but the intelligent device and the local area network do not establish communication connection at the moment; therefore, in a further embodiment, in step S4, the establishing, by the mobile terminal, a communication connection with a corresponding smart device in the local area network according to a preset quick connection policy includes: the mobile terminal actively scans and finds the intelligent devices in the same local area network through a preset function; and responding to the recognizable intelligent equipment in the local area network, and outputting corresponding intelligent equipment information in a list mode on a user interface provided by a preset function so as to allow a user to select connection.
In a preferred embodiment, the method of the present invention designs a main program through a MainWifiTouchActivity class, and designs a user interface through a main _ wifitouch file to obtain the selection input of the user.
In a further embodiment, step S4 further includes: responding to the selection made by the user, the mobile terminal encodes the connection request information with the identification in the length field of the data frame according to the preset configuration; generating a UDP broadcast data packet according to a corresponding datagram protocol and broadcasting the UDP broadcast data packet to the local area network; the intelligent equipment in the local area network identifies the identifier and returns an IP address according to the corresponding request information; and the mobile terminal establishes communication connection with the intelligent equipment according to the obtained IP address.
In a preferred embodiment, the scanning function of the present invention employs two synchronization processes to establish a communication connection with the smart device; one synchronous process is that the mobile terminal sends a UDP broadcast data packet with an identifier to the local area network; the format of the UDP broadcast packet with the identifier is shown in table 2:
table 2 client sending UDP broadcast message format
Serial number Type (B) Size and breadth Content providing method and apparatus Description of the invention
1 char 8 “testudp@” Custom string for smart device matching
2 char 4 Ip address of mobile terminal Obtaining local ip ground through library functionAddress
3 byte 1 “#” End mark
Wherein testudp @ is identification information, and the identification in this embodiment is only exemplary and does not limit the present invention; the type of identification information may also be other types, such as byte, int, etc.
The other synchronous process is a monitoring process and is used for monitoring the returned data of the intelligent equipment in real time; and defines the format of the returned data as shown in table 3.
Table 3 feedback datagram format
Serial number Type (B) Size and breadth Content providing method and apparatus Description of the invention
1 char 9 “testok” Custom string for client side matching
2 byte 4 Device ip address The device replies the local ip address to the client
If the mobile terminal receives the correct reply message 'testok', the mobile terminal indicates that the intelligent equipment side agrees to the connection request, and then the connection can be established.
In a further embodiment, step S4 further includes: responding to the first establishment of communication connection between a mobile terminal and intelligent equipment, and sending safety verification request information to the intelligent equipment by the mobile terminal; responding to the passing of the security verification, and keeping the connection state of the mobile terminal and the intelligent equipment; and responding to the failure of the security verification, the mobile terminal disconnects the connection with the intelligent equipment and feeds back corresponding information to the user interface. The security verification request also adopts two synchronous processes of broadcast data packet generation and returned data monitoring.
The whole process of the connection request and the security authentication request is shown in fig. 6. Fig. 6 is a flowchart illustrating the communication connection and connection security verification between the mobile terminal and the smart device according to the present invention. As shown in fig. 6, the connection and connection security verification process of the mobile terminal and the smart device of the present invention includes:
firstly, initializing a socket, and giving a destination IP address as follows: 255.255.255.255, port number 43708, client receive broadcast port number 43709. After socket initialization configuration is completed, starting connection and connection safety verification of the mobile terminal and the intelligent equipment;
thread 1-broadcast packet send thread. The thread realizes that the mobile terminal circularly sends the broadcast message to the destination IP address. The thread cycle interval duration is 120ms, and the broadcast data packet is sent in a cycle of 30 times because the UDP broadcast packet loss rate is high. After the number of cycles is reached, the thread automatically terminates.
Thread 2-broadcast packet receive thread (i.e., listening for smart device return data processes). Because UDP broadcast data packet transmission efficiency is high, in order to prevent the situation of missing the message broadcasted by the intelligent equipment, the thread and the previous thread are synchronous threads and are started simultaneously without mutual interference.
After monitoring the message from the broadcast address, the mobile terminal parses it according to the format defined in table 3. If a data packet containing 'testudp' is received, the matching is proved to be successful, the cycle of monitoring the broadcast is skipped, the thread is ended, and the other two synchronous threads of the security verification are started; if the received data packet is found to be wrong after the analysis, judging whether the timing reaches the overtime, if not, repeating the monitoring until a correct message is received, and if the timing reaches the overtime, proving that the monitoring broadcast fails, and at the moment, the program needs to submit prompt information to an interface updating thread to remind a user that the connection attempt fails.
Thread 3 — connection request thread. In order to ensure the safety and reliability of the connection, after the client is matched with the correct equipment, a safety verification request is required. A connection request "connectictrequest" is sent to the IP address of the destination device. At this time, it is determined that the device is correctly accessed into the local area network and can normally monitor the broadcast data packet, so the datagram only needs to be sent circularly for 3 times, thereby saving the connection establishment time and improving the communication efficiency.
Thread 4 — snoop feedback thread. And monitoring the reply of the equipment end to the connection request, wherein the socket timeout duration and the cycle monitoring duration are both set to be 2000ms in the thread, the client still monitors 43709 ports within the timeout duration, and if a broadcast data packet is received and the carried message of the packet is analyzed to be 'ConnectOK', the equipment end is proved to agree with the request, the security verification is passed, and the thread is ended. And then carrying out a normal data interaction process. If the mobile terminal fails to receive the correct feedback all the time after the timeout, the connection request is proved to be failed, and the user interface informs the user of the error in a form of a pop-up box.
Through the four processes, the method and the device not only realize the establishment of the communication connection between the mobile terminal and the intelligent device, but also realize the quick and safe establishment of the communication connection by adopting the mode of firstly establishing the communication connection and then carrying out the safety verification.
In another aspect of the present invention, a mobile terminal is further provided, where a storage medium of the mobile terminal stores a computer program that can be executed, and the computer program is used to implement the corresponding steps of the communication method between the mobile terminal and the smart device in the Wi-Fi mode in the foregoing embodiments.
In another aspect of the present invention, a smart device is further proposed, in which a storage medium of the smart device stores a computer program that can be executed, and the computer program is used to implement the corresponding steps of the communication method between the mobile terminal and the smart device in the Wi-Fi mode in the above embodiments.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A communication method between a mobile terminal and an intelligent device in a Wi-Fi mode is characterized by comprising the following steps:
the mobile terminal encodes the distribution network request information in length fields of a plurality of data frames according to preset configuration in a grading manner, and generates a plurality of broadcast data packets through corresponding datagram protocols;
the mobile terminal broadcasts the plurality of broadcast data packets to the surrounding environment through a router connected with the mobile terminal;
the intelligent equipment receives the plurality of broadcast data packets and accesses the local area network where the mobile terminal is located according to the obtained distribution network request information;
and the mobile terminal establishes communication connection with the corresponding intelligent equipment in the local area network according to a preset quick connection strategy.
2. The method of claim 1, wherein the network distribution request message comprises: and the SSID check code, the password and the random code of the router connected with the mobile terminal.
3. The method of claim 2, wherein the mobile terminal encodes the distribution network request information in length fields of a plurality of data frames according to a preset configuration, and generates a plurality of broadcast packets via corresponding datagram protocols, comprising:
the mobile terminal generates a plurality of data frames according to preset configuration, and encodes the SSID check code, the password and the random code of the router in length fields of the data frames in a plurality of times; and are
And generating the UDP broadcast data packet by adding a preamble field with the length increasing before each data frame according to the corresponding datagram protocol.
4. The method according to claim 3, wherein the method for the intelligent device to communicate with the mobile terminal in the Wi-Fi mode, wherein the intelligent device receives the plurality of broadcast packets and accesses the local area network where the mobile terminal is located according to the obtained distribution network request information, comprises:
the intelligent equipment receives a broadcast data packet in the surrounding environment, locks a channel of the router according to the received UDP broadcast data packet with the length increasing characteristic, and establishes connection with the router according to the obtained ssid check code, the password and the random code of the router so as to access the local area network where the mobile terminal is located.
5. The method of claim 4, wherein the smart device has a wireless network card capable of enabling promiscuous mode, and wherein the wireless network card of the smart device is configured to enable promiscuous mode, so as not to filter MAC addresses of broadcast packets.
6. The method of claim 1 for communication between a mobile terminal and a smart device in Wi-Fi mode, the method further comprising:
and the mobile terminal limits the effective digit of the length field according to preset configuration.
7. The method for communicating between a mobile terminal and a smart device in a Wi-Fi mode according to claim 1, wherein the establishing, by the mobile terminal, a communication connection with the smart device corresponding to the local area network according to a preset quick connection policy comprises:
the mobile terminal actively scans and finds the intelligent devices in the same local area network through a preset function; and are
Responding to the recognizable intelligent equipment in the local area network, and outputting corresponding intelligent equipment information in a list mode on a user interface provided by the preset function so as to enable a user to select connection.
8. The method according to claim 7, wherein the mobile terminal establishes a communication connection with the corresponding smart device in the local area network according to a preset quick connection policy, and further comprising:
responding to the selection made by the user, the mobile terminal encodes the connection request information with the identification in the length field of the data frame according to the preset configuration;
generating a UDP broadcast data packet according to a corresponding datagram protocol and broadcasting the UDP broadcast data packet to the local area network;
the intelligent equipment in the local area network recognizes the identification and returns an IP address according to the corresponding request information;
and the mobile terminal establishes communication connection with the intelligent equipment according to the obtained IP address.
9. The method for communicating between a mobile terminal and a smart device in Wi-Fi mode according to claim 8, wherein the mobile terminal establishes a communication connection with a corresponding smart device in the local area network according to a preset quick connection policy, further comprising:
responding to the first establishment of communication connection between a mobile terminal and intelligent equipment, and sending safety verification request information to the intelligent equipment by the mobile terminal;
responding to the passing of the security verification, and keeping the connection state of the mobile terminal and the intelligent equipment;
and responding to the failure of the security verification, and disconnecting the mobile terminal from the intelligent equipment.
10. A mobile terminal, characterized in that a storage medium of the mobile terminal stores a computer program capable of running, and the computer program is used for implementing the corresponding steps of the communication method between the mobile terminal and the smart device in the Wi-Fi mode according to any one of the above claims 1-9 when executed.
CN202110674524.9A 2021-06-17 2021-06-17 Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal Pending CN113329349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110674524.9A CN113329349A (en) 2021-06-17 2021-06-17 Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110674524.9A CN113329349A (en) 2021-06-17 2021-06-17 Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal

Publications (1)

Publication Number Publication Date
CN113329349A true CN113329349A (en) 2021-08-31

Family

ID=77423765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110674524.9A Pending CN113329349A (en) 2021-06-17 2021-06-17 Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal

Country Status (1)

Country Link
CN (1) CN113329349A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827909A (en) * 2022-04-12 2022-07-29 广州芯之联科技有限公司 Network distribution method and device for HT20 equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040355A (en) * 2017-12-08 2018-05-15 深圳市恒腾智能科技有限公司 Method for network access and system
CN112261591A (en) * 2020-09-15 2021-01-22 哈工大机器人(合肥)国际创新研究院 Method for rapidly and stably configuring wifi through one key

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040355A (en) * 2017-12-08 2018-05-15 深圳市恒腾智能科技有限公司 Method for network access and system
CN112261591A (en) * 2020-09-15 2021-01-22 哈工大机器人(合肥)国际创新研究院 Method for rapidly and stably configuring wifi through one key

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
冯蕾: "基于Android和iOS的家用呼吸机移动终端APP的设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *
冯蕾: "基于Android系统的智能呼吸机远程终端设计", 《工业控制计算机》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827909A (en) * 2022-04-12 2022-07-29 广州芯之联科技有限公司 Network distribution method and device for HT20 equipment
CN114827909B (en) * 2022-04-12 2023-11-10 广州芯之联科技有限公司 Network distribution method and device for HT20 equipment

Similar Documents

Publication Publication Date Title
US11576023B2 (en) Method and apparatus for providing a secure communication in a self-organizing network
US10880817B2 (en) Wi-fi configuration method, Wi-Fi mobile terminal, and Wi-Fi device
US9154935B2 (en) Wireless home mesh network bridging adaptor
US8045530B2 (en) Method and apparatus for authentication in a wireless telecommunications system
CA2750814C (en) Authentication for a multi-tier wireless home mesh network
US7929504B2 (en) Systems and methods for the connection and remote configuration of wireless clients
CN106254147B (en) It is a kind of for the configuration method of Wi-Fi network, internet-of-things terminal and control terminal
US11831497B2 (en) Self-configuration of wireless connections
US9515824B2 (en) Provisioning devices for secure wireless local area networks
WO2013052865A1 (en) Associating wi-fi stations with an access point in a multi-access point infrastructure network
CN115022875A (en) Unified subscription identifier management in a communication system
US20190349764A1 (en) Security protection method and apparatus in wireless communication system
US20160330775A1 (en) Methods and Devices for Sending or Receiving Wireless Parameter
US20060155836A1 (en) Method of configuring network device
US10880279B2 (en) Virtual broadcast of unicast data stream in secured wireless local area network
CN113329349A (en) Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal
CN105992162A (en) Method for communication through multicast frame embedded data under unrelated WIFI environment
CN106604305B (en) Wireless network configuration method and device and terminal
US11659387B2 (en) User equipment authentication preventing sequence number leakage
US9705693B1 (en) Provisioning using multicast traffic
CN105992308A (en) Communication method for data encryption through broadcast frame length under unrelated WIFI environment
WO2021120923A1 (en) Information transmission method and apparatus, information processing method and apparatus, terminal, network element and storage medium
CN116636293A (en) Wireless residential gateway and indoor base station
Villani Nomadic Communications Labs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210831

RJ01 Rejection of invention patent application after publication