CN111885563A - Equipment network access method and device, computer readable storage medium and electronic device - Google Patents

Equipment network access method and device, computer readable storage medium and electronic device Download PDF

Info

Publication number
CN111885563A
CN111885563A CN202010632037.1A CN202010632037A CN111885563A CN 111885563 A CN111885563 A CN 111885563A CN 202010632037 A CN202010632037 A CN 202010632037A CN 111885563 A CN111885563 A CN 111885563A
Authority
CN
China
Prior art keywords
network access
access mode
configuration information
mode
network
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
CN202010632037.1A
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.)
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing 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 Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN202010632037.1A priority Critical patent/CN111885563A/en
Publication of CN111885563A publication Critical patent/CN111885563A/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/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

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

Abstract

The invention provides a device network access method and device, a computer readable storage medium and an electronic device, wherein the device network access method comprises the following steps: starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode; and executing network access operation according to the configuration information. According to the invention, the problem that the high-efficiency network access operation of the Internet of things equipment cannot be realized in the network access process in the related technology can be solved, so that the high-efficiency network access operation of the Internet of things equipment in the network access process can be realized in the network access process of the Internet of things equipment, and the network access success rate, the compatibility of the equipment and the terminal and the user experience effect are ensured.

Description

Equipment network access method and device, computer readable storage medium and electronic device
Technical Field
The invention relates to the field of Internet of things, in particular to a device networking method and device, a computer readable storage medium and an electronic device.
Background
With the development of the internet of things and intelligent hardware technology, a large number of internet of things devices enter the lives of people. The network access of the internet of things device is to enable the internet of things device to obtain configuration information, such as a Service Set Identifier (SSID) and a Password (PWD) of a router, in various manners. At present, a plurality of different modes exist for network access of an internet of things device, but any mode has disadvantages, for example, if the success rate of network access is ensured in the network access process of the internet of things device, a user needs to perform more complicated operation, so that the user experience is reduced, or the success rate of network access and the compatibility of the device and a terminal cannot be ensured for the convenience of user operation; the phenomenon leads the internet-of-things equipment to fail to realize efficient network access operation in the network access process.
In view of the above problem that the internet-of-things device cannot realize efficient network access operation in the network access process in the related art, no effective solution has been proposed in the related art.
Disclosure of Invention
The embodiment of the invention provides a device network access method and device, a computer readable storage medium and an electronic device, which are used for at least solving the problem that in the related art, efficient network access operation cannot be realized in the network access process of an internet of things device.
According to an embodiment of the present invention, there is provided a device network access method, applied to a device to be networked, the method including:
starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode;
executing network access operation according to the configuration information;
the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by a terminal, and the configuration information packet carries the configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through a Bluetooth radio frequency channel.
According to another embodiment of the present invention, there is also provided an apparatus for accessing a network, which is applied to a device to be accessed to the network, and includes:
the device comprises an acquisition module, a first network access module, a second network access module and a third network access module, wherein the acquisition module is used for starting the first network access mode, the second network access mode and the third network access mode and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode;
the network access module is used for executing network access operation according to the configuration information;
the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by a terminal, and the configuration information packet carries the configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through a Bluetooth radio frequency channel.
According to another embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, in the process of preparing network access of the equipment to be accessed, the first network access mode, the second network access mode and the third network access mode can be started, and the configuration information is acquired through one of the first network access mode, the second network access mode and the third network access mode; after the configuration information is acquired, network access operation is executed according to the configuration information; the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by the terminal, and the configuration information packet carries configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through the Bluetooth radio frequency channel. Therefore, the embodiment of the invention can enable the different network access modes to form complementation on the network access success rate, the compatibility of the equipment and the terminal and the user experience by simultaneously starting the three network access modes, thereby obviously improving the overall network access effect of the Internet of things equipment. Therefore, the invention can solve the problem that the internet-of-things equipment cannot realize efficient network access operation in the network access process in the related technology, so that the internet-of-things equipment can realize efficient network access operation in the network access process, and the success rate of network access, the compatibility of the equipment and the terminal and the effect of user experience are ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a device network access method provided in an embodiment of the present invention;
fig. 2 is a flowchart of a device networking method according to an embodiment of the present invention;
fig. 3 is a flowchart of a device networking method according to an embodiment of the present invention;
fig. 4 is a block diagram of a device networking apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
To further explain the device network access method and apparatus, the computer-readable storage medium, and the electronic apparatus in the embodiments of the present invention, the following description is made of application scenarios of the device network access method and apparatus, the computer-readable storage medium, and the electronic apparatus in the embodiments of the present invention:
the device to be accessed in the device access method provided by the embodiment of the invention is executed in a mobile terminal, a computer terminal or a similar operation device. Taking a device to be networked as a mobile terminal as an example, fig. 1 is a hardware structure block diagram of the mobile terminal of the device networking method provided by the embodiment of the invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the device networking method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In an example, the transmission device 106 includes a Network adapter (NIC), and can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The device to be networked in the embodiment of the invention has the capability of accessing in two modes of wireless Internet WIFI and Bluetooth BLE, and the device to be networked can be referred to as WIFI & BLE device for short.
WIFI & BLE equipment mostly adopts the WIFI-BLE module of lower cost, and wherein, WIFI and BLE standard all are in 2.4G frequency channel, so WIFI and BLE share radio frequency antenna hardware usually, and then need the timesharing to occupy the radio frequency resource when leading to WIFI and BLE to open simultaneously. The currently supported network access modes of the WIFI & BLE device generally include Sniffer, SoftAp, and BLE. The three network access methods are explained below:
1) sniffer mode: the device is in a Sniffer mode, namely a WIFI promiscuous monitoring data packet mode; and the equipment analyzes the configuration information from the data packet obtained by monitoring by sending a broadcast packet or a multicast packet containing the configuration information through the terminal. The method requires the equipment to continuously poll and switch the WIFI radio frequency channel (from the WIFI channel 1 to the channel 13), is limited by the packet sending frequency of the terminal, has low anti-interference performance and other reasons, and has the problems of low compatibility between the router and the mobile phone, low success rate and the like.
2) SoftAp mode: the device is in a WIFI AP mode, after the terminal searches and connects a certain AP, the configuration information is transmitted to the device through the TCP, and the internet of things device is switched to a WIFI STA mode to connect with the WIFI router. Although the mode can fix the equipment on one channel without switching the WIFI radio frequency channel, the steps are complicated, the network access time is long, and the permission problem exists on certain types of terminals, so that the user experience is not good.
3) A BLE mode: establishing Bluetooth connection with a terminal through equipment, and transmitting configuration information to the equipment through the connection by the terminal; or, the terminal sends a Bluetooth broadcast packet containing configuration information, the equipment receives the broadcast packet and then analyzes the configuration information, and the equipment is switched to a WIFI STA mode to be connected with the WIFI router. The above method needs to occupy the bluetooth radio frequency channel and needs the mobile phone to open the bluetooth permission, and the steps are tedious.
Therefore, the above three network access modes are single, and have advantages and disadvantages in various aspects such as network access success rate, compatibility between the device and the terminal, user experience and the like, so that a better effect on the whole cannot be provided in the network access process of the device. Therefore, the network access equipment adopts the single network access mode, and the network access success rate, the compatibility of the equipment and the terminal and the user experience cannot be simultaneously met.
The following describes a device networking method and apparatus, a computer-readable storage medium, and an electronic apparatus in an embodiment of the present invention:
example 1
The present embodiment provides a device network accessing method, which is applied to a device to be networked, and fig. 2 is a flowchart of a device network accessing method provided according to an embodiment of the present invention, as shown in fig. 2, the device network accessing method in the present embodiment includes:
s102, starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode;
s104, executing network access operation according to the configuration information;
the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by the terminal, and the configuration information packet carries configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through the Bluetooth radio frequency channel.
It should be further explained that the device to be networked in this embodiment is an internet of things device, such as an intelligent air conditioner, an intelligent refrigerator, an intelligent sound box, and the like, and the device networking method in this embodiment is used for establishing connection between the internet of things device and a network device, such as a router, and enabling the internet of things device to access a network provided by the network device.
It should be further explained that, in the foregoing embodiment, in the first network access mode, the device to be networked may obtain the configuration information carried in the configuration information packet by monitoring the configuration information packet broadcasted or multicast by the terminal, and further implement the network access operation according to the configuration information; the first network access mode includes, but is not limited to, Sniffer mode, and any mode that realizes network access operation in the above manner may be the first network access mode in this embodiment; in the second network access mode, the equipment to be accessed to the network can receive the configuration information sent by the terminal through the wireless connection established between the terminal and the equipment to be accessed to the network, and then network access operation is realized according to the configuration information; the second networking module includes, but is not limited to, a SoftAp mode; in the third network access mode, the device to be accessed to the network can receive the configuration information sent by the terminal through a Bluetooth radio frequency channel (such as establishing Bluetooth connection) between the terminal and the device to be accessed to the network, and then network access operation is realized according to the configuration information; the third networking module includes, but is not limited to, BLE mode.
According to the embodiment of the invention, the first network access mode, the second network access mode and the third network access mode can be started in the process of preparing network access of the equipment to be accessed, and the configuration information is acquired through one of the first network access mode, the second network access mode and the third network access mode; after the configuration information is acquired, network access operation is executed according to the configuration information; the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by the terminal, and the configuration information packet carries configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through the Bluetooth radio frequency channel. Therefore, the embodiment of the invention can solve the problem that the internet-of-things equipment cannot realize efficient network access operation in the network access process in the related technology, so that the internet-of-things equipment can realize efficient network access operation in the network access process, and meanwhile, the success rate of network access, the compatibility of the equipment and the terminal and the effect of user experience are ensured.
Specifically, according to the technical scheme in this embodiment, the three network access modes are simultaneously turned on, so that complementation can be formed among different network access modes in terms of network access success rate, compatibility between the device and the terminal, and user experience, and further the overall network access effect of the internet of things device is significantly improved.
It should be further noted that, in the foregoing embodiment, the device to be networked starts the first network access mode, the second network access mode, and the third network access mode, and is configured to instruct the device to be networked to start the first network access mode, the second network access mode, and the third network access mode in a certain period; the following describes a process of the device to be networked starting a first network access mode, a second network access mode, and a third network access mode by way of an optional embodiment:
in an optional embodiment, in the step S102, the starting of the first network access mode, the second network access mode, and the third network access mode includes: and opening the first network access mode, the second network access mode and the third network access mode in time division according to a preset sequence.
It should be further noted that, in the above alternative embodiment, the preset sequence specifically includes: the first network access mode, the second network access mode, and the third network access mode may be in other sequences, which is not limited in the present invention.
It should be further noted that, in the above optional embodiment, the first network access mode, the second network access mode, and the third network access mode are started in a time-sharing manner, that is, the device to be networked starts the first network access mode, the second network access mode, and the third network access mode at different times, so that the device to be networked can start the first network access mode, the second network access mode, and the third network access mode in sequence by sharing the radio frequency hardware. Generally speaking, the first network access mode, the second network access mode and the third network access mode are started continuously, that is, the device to be networked alternately starts the first network access mode, the second network access mode and the third network access mode according to the preset sequence.
In an optional embodiment, in the above S102, after the first network access mode, the second network access mode, and the third network access mode are started, the method further includes:
locking one of a first network access mode, a second network access mode and a third network access mode according to a preset trigger condition; wherein the trigger condition comprises:
locking a first network access mode under the condition that the equipment to be networked monitors the configuration information packet; or, locking the second network access mode under the condition that the equipment to be networked detects the preset frame; or, locking the third network access mode under the condition that the device to be networked establishes the Bluetooth connection with the terminal.
It should be further noted that, in the optional embodiment, in the process of starting the first network access mode, the second network access mode, and the third network access mode, when the currently started network access mode meets the trigger condition, the network access mode may be locked, that is, the configuration information is acquired in the currently locked network access mode.
Specifically, taking the first network access mode as the Sniffer mode as an example, the triggering condition for locking the first network access mode is that the device to be networked receives a group data packet or a broadcast data packet containing configuration information; taking the second network access mode as the SoftAp mode as an example, the triggering condition for locking the second network access mode is that the to-be-networked device receives an 802.11 bandwidth frame; taking the third network access mode as a BLE mode as an example, the triggering condition for locking the third network access mode is to establish a BLE connection between the device to be networked and the terminal, so as to receive the configuration information through a bluetooth radio frequency channel.
After the corresponding network access mode is locked, in order to further improve the success rate of the network access operation and avoid unnecessary conflicts or interferences, the other network access modes may be correspondingly closed, and the closing process is described below by a specific embodiment:
in an optional embodiment, after locking one of the first network access mode, the second network access mode, and the third network access mode according to a preset trigger condition, the method further includes:
closing the third network access mode under the condition of locking the first network access mode; or, under the condition of locking the second network access mode, closing the first network access mode; or, in case of locking the third network-entry mode, the first network-entry mode is turned off.
It should be further explained that, in the above optional embodiment, the closing of the first network access mode is that the first network access mode is not opened any more when the device to be networked locks the second network access module or the third network access mode; similarly, the third network access mode is closed, that is, the third network access mode is not opened any more when the device to be networked locks the first network access mode.
Specifically, on one hand, since the first network access mode, such as the Sniffer mode, needs to switch the radio frequency channel during execution, and the third network access mode, such as the BLE mode, also needs to switch between partial channels during execution, the third network access mode can be turned off when the first network access mode is locked; similarly, the third network entry mode may be turned off in the case where the third network entry mode is locked. On the other hand, in the case of locking the second network access mode, since the first network access mode needs to poll and switch all channels during channel switching, and the third network access mode only switches among partial channels, the third network access mode has less influence than the first network access mode, and the first network access mode can be closed.
After one of the first network access mode, the second network access mode and the third network access mode is locked, network access operation can be executed according to the locked network access mode; meanwhile, due to environmental interference or APP faults of the device to be networked and the terminal, there is a reason that the currently locked network access mode cannot effectively acquire the configuration information, and therefore, in an optional embodiment, one of the first network access mode, the second network access mode, and the third network access mode is locked according to a preset trigger condition, which further includes:
under the condition that the first network access mode is locked and the device to be networked does not acquire the configuration information within a preset first period, unlocking the first network access mode and re-executing the following operations: starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode; alternatively, the first and second electrodes may be,
and under the condition that the second network access mode is locked and the device to be networked does not acquire the configuration information within a preset second period, unlocking the second network access mode and re-executing the following operations: starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode; alternatively, the first and second electrodes may be,
and under the condition that the third network access mode is locked and the device to be networked does not acquire the configuration information in a preset third period, unlocking the third network access mode and re-executing the following operations: and starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode.
It should be further noted that, in the above optional embodiment, in the case that the first network access mode is locked, if the to-be-accessed device does not acquire the configuration information within the preset first period, the to-be-accessed device cannot effectively acquire the configuration information in the current first network access mode to perform network access, so that the first network access mode needs to be unlocked, and the first network access mode, the second network access mode, and the third network access mode need to be restarted. Under the condition of locking the second network access mode or the third network access mode, if the device to be networked does not acquire the configuration information within the preset second period, the device to be networked cannot effectively acquire the configuration information in the current network access mode to execute network access, so that the locking of the second network access mode or the third network access mode needs to be released, and the first network access mode, the second network access mode and the third network access mode need to be restarted.
The first period may be the same as the second period or different from the second period; generally, the first period may be set to be smaller than the second period, for example, the first period is 30s and the second period is 90 s.
Through the technical scheme described in the optional embodiment, under the condition that the currently locked network access mode cannot effectively acquire the configuration information within the preset first period or second period, the first network access mode, the second network access mode and the third network access mode can be re-started, so that the network access mode which cannot effectively access the network can be timely closed by re-locking a certain network access mode according to the corresponding trigger condition, and the operation is repeated until the device to be accessed successfully acquires the configuration information.
In an optional embodiment, the obtaining the configuration information in one of the first network access mode, the second network access mode, and the third network access mode includes:
and acquiring the configuration information through the locked network access mode.
In an optional embodiment, in the S104, the performing a network access operation according to the configuration information includes:
and under the condition that the network access operation executed according to the configuration information fails, the following operations are executed again:
and starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode.
It should be further noted that, in the above optional embodiment, on the premise that the device to be networked acquires the configuration information, there still exists a situation that the device to be networked cannot effectively perform network access due to an information error or invalidation included in the configuration information, such as a password error of the router, inability to acquire an IP, weak router signal, inability to find a router, and the like. In the above case, the method returns to the above S102 to retrieve the configuration information and execute the network access operation.
The workflow of the device networking method in this embodiment is further described below by way of an exemplary embodiment:
in this exemplary embodiment, the first operating mode is a Sniffer mode, the second operating mode is a SoftAp mode, and the third operating mode is a BLE mode, and fig. 3 is a flowchart of a device networking method according to an embodiment of the present invention, as shown in fig. 3, a process of a device to be networked in this embodiment executing networking is as follows:
s1, preparation phase: and the equipment to be networked enters a network access mode, namely enters a preparation period. In a preparation period state, the device to be networked simultaneously starts a Sniffer mode, a SoftAp mode and a BLE mode by sharing radio frequency hardware in a time-sharing manner, specifically, the device coexists in the Sniffer, SoftAp and BLE modes in the preparation period state, the Sniffer mode is used for waiting for receiving configuration information broadcasted by the mobile phone, the SoftAp mode is used for waiting for a response that the mobile phone establishes a wireless connection, and the BLE mode is used for waiting for a response that the mobile phone establishes a bluetooth connection.
S2, lock-out period stage: when the following conditions are met, the equipment to be networked locks the corresponding mode:
sniffer mode: in Sniffer mode, valid data, i.e. multicast or broadcast configuration data containing configuration information, is received. SoftAp mode: and detecting that the 802.11WIFI AUTH frame is received. A BLE mode: and (4) establishing the BLE connection.
Because WIFI and BLE need share radio frequency hardware, in order to ensure the configuration success rate, the processing mechanism after entering the locking period is as follows:
because the SoftAp mode does not need to switch channels, and the BLE mode is switched between fixed partial channels, after the Sniffer mode is locked, the SoftAp mode is not closed, and the BLE mode is closed. Because the Sniffer mode needs polling to switch channels, the BLE mode is switched among fixed partial channels with small influence, and therefore after the SoftAp mode is locked, the BLE mode is not closed, and the Sniffer mode is closed. Because the Sniffer mode needs a polling channel to be switched and the SoftAp mode does not need a channel to be switched, the SoftAp mode is not closed and the Sniffer mode is closed after the BLE mode is locked.
After entering the lock period, that is, after locking any one of the Sniffer mode, SoftAp mode, and BLE mode, the device may fail to receive the configuration information due to various reasons such as environmental interference or APP, and in such a case, it is necessary to return to the preparation period. The method comprises the following specific steps:
the Sniffer mode accesses the network fastest, but is most likely to receive environmental interference, and if the Sniffer mode does not successfully receive the configuration completion information within 30s after the locking period of the Sniffer mode, the Sniffer mode enters the preparation period again; therefore, the method can rapidly enter the preparation period again when the network access fails due to various conditions such as environmental interference and the like;
the SoftAp mode and the BLE mode are based on establishing a TCP connection and a BLE connection, and are stable compared with the Sniffer mode, but sometimes the connection is disconnected due to the influence of an opposite terminal (usually, the APP authority of the mobile phone). Therefore, after the SoftAp mode or the BLE mode enters the locked state, the configuration information is not successfully received within 90s, and the preparation period is entered again.
S3, connection phase: and entering a connection period after the network access equipment receives the configuration information. And in the route connection stage, after the AP is successfully connected, the network access is completed.
If the reason that the router connection failure of the device to be accessed to the network is detected to be a password error after entering the connection period, returning to the preparation period immediately to avoid network access failure caused by the fact that a user inputs the password error manually carelessly on the APP sometimes; other reasons for failure are to continue trying to connect routes, such as inability to acquire IP, weak router signals, no router found, etc.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
The device networking apparatus provided in this embodiment is applied to a device to be networked, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, which have been already described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a device networking apparatus according to an embodiment of the present invention, and as shown in fig. 4, the device networking apparatus in this embodiment includes:
an obtaining module 202, configured to start a first network access mode, a second network access mode, and a third network access mode, and obtain configuration information through one of the first network access mode, the second network access mode, and the third network access mode;
a network accessing module 204, configured to execute a network accessing operation according to the configuration information;
the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by the terminal, and the configuration information packet carries configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through the Bluetooth radio frequency channel.
It should be further noted that other optional embodiments and technical effects of the device networking apparatus in this embodiment correspond to those of the device networking method described in embodiment 1, and therefore are not described herein again.
In an optional embodiment, the starting the first network access mode, the second network access mode, and the third network access mode includes:
and opening the first network access mode, the second network access mode and the third network access mode in time division according to a preset sequence.
In an optional embodiment, after the starting of the first network access mode, the second network access mode, and the third network access mode, the method further includes:
locking one of a first network access mode, a second network access mode and a third network access mode according to a preset trigger condition; wherein the trigger condition comprises:
locking a first network access mode under the condition that the equipment to be networked monitors the configuration information packet; or, locking the second network access mode under the condition that the equipment to be networked detects the preset frame; or, locking the third network access mode under the condition that the device to be networked establishes the Bluetooth connection with the terminal.
In an optional embodiment, after locking one of the first network access mode, the second network access mode, and the third network access mode according to a preset trigger condition, the method further includes:
closing the third network access mode under the condition of locking the first network access mode; or, under the condition of locking the second network access mode, closing the first network access mode; or, in case of locking the third network-entry mode, the first network-entry mode is turned off.
In an optional embodiment, the locking one of the first network access mode, the second network access mode, and the third network access mode according to a preset trigger condition further includes:
under the condition that the first network access mode is locked and the device to be networked does not acquire the configuration information within a preset first period, unlocking the first network access mode and re-executing the following operations: starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode; alternatively, the first and second electrodes may be,
and under the condition that the second network access mode is locked and the device to be networked does not acquire the configuration information within a preset second period, unlocking the second network access mode and re-executing the following operations: starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode; alternatively, the first and second electrodes may be,
and under the condition that the third network access mode is locked and the device to be networked does not acquire the configuration information in a preset third period, unlocking the third network access mode and re-executing the following operations: and starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode.
In an optional embodiment, the obtaining the configuration information in one of the first network access mode, the second network access mode, and the third network access mode includes:
and acquiring the configuration information through the locked network access mode.
In an optional embodiment, the executing the network access operation according to the configuration information includes:
and under the condition that the network access operation executed according to the configuration information fails, the following operations are executed again:
and starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the computer-readable storage medium may be configured to store a computer program for executing the computer program in the above-described embodiment.
Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 4
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in this embodiment, the processor may be configured to execute the steps in the above embodiments through a computer program.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A device network access method is applied to a device to be networked, and comprises the following steps:
starting a first network access mode, a second network access mode and a third network access mode, and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode;
executing network access operation according to the configuration information;
the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by a terminal, and the configuration information packet carries the configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through a Bluetooth radio frequency channel.
2. The method of claim 1, wherein the enabling of the first network access mode, the second network access mode, and the third network access mode comprises:
and opening the first network access mode, the second network access mode and the third network access mode in a time-sharing mode according to a preset sequence.
3. The method of claim 1, wherein after the enabling of the first network access mode, the second network access mode, and the third network access mode, the method further comprises:
locking one of the first network access mode, the second network access mode and the third network access mode according to a preset trigger condition; wherein the trigger condition comprises:
locking the first network access mode under the condition that the equipment to be networked monitors the configuration information packet; or, locking the second network access mode under the condition that the device to be networked detects a preset frame; or, the third network access mode is locked under the condition that the device to be networked establishes the Bluetooth connection with the terminal.
4. The method according to claim 3, wherein after locking one of the first network entry mode, the second network entry mode, and the third network entry mode according to a preset trigger condition, the method further comprises:
in the case of locking the first network access mode, closing the third network access mode; or, in the case of locking the second network access mode, closing the first network access mode; or, in the case of locking the third network access mode, closing the first network access mode.
5. The method according to claim 3 or 4, wherein the locking one of the first network access mode, the second network access mode, and the third network access mode according to a preset trigger condition further comprises:
under the condition that the first network access mode is locked and the device to be networked does not acquire the configuration information within a preset first period, unlocking the first network access mode and re-executing the following operations: starting the first network access mode, the second network access mode and the third network access mode, and acquiring the configuration information through one of the first network access mode, the second network access mode and the third network access mode; alternatively, the first and second electrodes may be,
under the condition that the second network access mode is locked and the device to be networked does not acquire the configuration information within a preset second period, unlocking the second network access mode and re-executing the following operations: starting the first network access mode, the second network access mode and the third network access mode, and acquiring the configuration information through one of the first network access mode, the second network access mode and the third network access mode; alternatively, the first and second electrodes may be,
under the condition that the third network access mode is locked and the device to be networked does not acquire the configuration information in a preset third period, unlocking the third network access mode and re-executing the following operations: and starting the first network access mode, the second network access mode and the third network access mode, and acquiring the configuration information through one of the first network access mode, the second network access mode and the third network access mode.
6. The method of claim 3, wherein obtaining configuration information via one of the first network access mode, the second network access mode, and the third network access mode comprises:
and acquiring the configuration information through the locked network access mode.
7. The method of claim 1, wherein the performing the network entry operation according to the configuration information comprises:
under the condition that the network access operation executed according to the configuration information fails, the following operations are executed again:
and starting the first network access mode, the second network access mode and the third network access mode, and acquiring the configuration information through one of the first network access mode, the second network access mode and the third network access mode.
8. The device networking device is applied to a device to be networked, and comprises:
the device comprises an acquisition module, a first network access module, a second network access module and a third network access module, wherein the acquisition module is used for starting the first network access mode, the second network access mode and the third network access mode and acquiring configuration information through one of the first network access mode, the second network access mode and the third network access mode;
the network access module is used for executing network access operation according to the configuration information;
the first network access mode is used for indicating the equipment to be accessed to the network to monitor a configuration information packet broadcasted or multicasted by a terminal, and the configuration information packet carries the configuration information; the second network access mode is used for indicating the equipment to be accessed to the network to receive the configuration information sent by the terminal through wireless access; and the third network access mode is used for indicating the equipment to be accessed to receive the configuration information sent by the terminal through a Bluetooth radio frequency channel.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202010632037.1A 2020-07-03 2020-07-03 Equipment network access method and device, computer readable storage medium and electronic device Pending CN111885563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010632037.1A CN111885563A (en) 2020-07-03 2020-07-03 Equipment network access method and device, computer readable storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010632037.1A CN111885563A (en) 2020-07-03 2020-07-03 Equipment network access method and device, computer readable storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN111885563A true CN111885563A (en) 2020-11-03

Family

ID=73150210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010632037.1A Pending CN111885563A (en) 2020-07-03 2020-07-03 Equipment network access method and device, computer readable storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111885563A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413037A (en) * 2016-10-31 2017-02-15 青岛海尔科技有限公司 Network access method and device for interment-of-things equipment, equipment and mobile terminal
CN107846672A (en) * 2017-10-31 2018-03-27 泰凌微电子(上海)有限公司 Communication pattern system of selection, IoT equipment and the storage medium of multimode IoT equipment
CN108494638A (en) * 2018-02-09 2018-09-04 海尔优家智能科技(北京)有限公司 A kind of method, router, terminal and medium that configuration equipment networks
CN108616521A (en) * 2018-04-12 2018-10-02 青岛海尔科技有限公司 Method for network access, device, equipment and readable storage medium storing program for executing
CN111065137A (en) * 2019-12-17 2020-04-24 海信集团有限公司 Method for accessing intelligent equipment to network based on Bluetooth and wireless network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413037A (en) * 2016-10-31 2017-02-15 青岛海尔科技有限公司 Network access method and device for interment-of-things equipment, equipment and mobile terminal
CN107846672A (en) * 2017-10-31 2018-03-27 泰凌微电子(上海)有限公司 Communication pattern system of selection, IoT equipment and the storage medium of multimode IoT equipment
CN108494638A (en) * 2018-02-09 2018-09-04 海尔优家智能科技(北京)有限公司 A kind of method, router, terminal and medium that configuration equipment networks
CN108616521A (en) * 2018-04-12 2018-10-02 青岛海尔科技有限公司 Method for network access, device, equipment and readable storage medium storing program for executing
CN111065137A (en) * 2019-12-17 2020-04-24 海信集团有限公司 Method for accessing intelligent equipment to network based on Bluetooth and wireless network

Similar Documents

Publication Publication Date Title
EP2924951B1 (en) Configuration of networks using switch device access of remote server
EP2924950A1 (en) Authentication of client devices in networks
EP2924949A1 (en) Configuration of networks using client device access of remote server
CN105120507A (en) Data packet monitoring method and system
CN113259978B (en) MDT measurement method, user terminal and network side equipment
CN111405492A (en) Method, device, storage medium, and electronic device for connecting to target network
US20210105632A1 (en) Assisted discovery of a local private 3gpp network via a local private non-3gpp wireless network
CN103517300A (en) Self-discovery method, device and system of distributed base station
CN106255177A (en) The transmission method of a kind of equipment state and device
CN102858023A (en) Method and equipment for role discovery and automatic wireless configuration of grid nodes
EP4124123A1 (en) Network configuration options for reduced capability device coexistence with legacy new radio devices
CN114158038B (en) Communication method, device and storage medium
CN111226463A (en) Processing method and device for link establishment failure and computer storage medium
CN110621028B (en) Network distribution method, network distribution device and electronic equipment
CN110621053B (en) Network distribution method, network distribution device and electronic equipment
CN113543282B (en) Wireless roaming method and system
CN113038499A (en) Terminal Wi-Fi compatibility testing method, device, system, equipment and medium
CN117221868A (en) Network registration method, device and readable storage medium
CN111885563A (en) Equipment network access method and device, computer readable storage medium and electronic device
CN111050356A (en) Data transmission processing method and device, storage medium and electronic device
CN115499886A (en) MPS management method and related device
CN114584496A (en) Device discovery method, device, client and storage medium
CN114586419A (en) Cell search method applied to terminal and communication device
CN114389943A (en) Network configuration method, device, equipment and computer storage medium
CN114071433A (en) Anti-interference method, device and system for Zigbee network

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: 20201103

RJ01 Rejection of invention patent application after publication