CN114980266A - WiFi network access method, communication method, peripheral equipment and storage medium - Google Patents
WiFi network access method, communication method, peripheral equipment and storage medium Download PDFInfo
- Publication number
- CN114980266A CN114980266A CN202210532260.8A CN202210532260A CN114980266A CN 114980266 A CN114980266 A CN 114980266A CN 202210532260 A CN202210532260 A CN 202210532260A CN 114980266 A CN114980266 A CN 114980266A
- Authority
- CN
- China
- Prior art keywords
- control terminal
- broadcast
- peripheral equipment
- bluetooth
- packet
- 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
Links
- 230000002093 peripheral effect Effects 0.000 title claims abstract description 275
- 238000000034 method Methods 0.000 title claims abstract description 74
- 238000004891 communication Methods 0.000 title claims abstract description 37
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 claims description 20
- 230000006870 function Effects 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 6
- 230000006855 networking Effects 0.000 claims description 6
- 230000008859 change Effects 0.000 abstract description 3
- 238000003825 pressing Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000007639 printing Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000001413 cellular effect Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000007648 laser printing Methods 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/08—Access restriction or access information delivery, e.g. discovery data delivery
- H04W48/10—Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00127—Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
- H04N1/00281—Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a telecommunication apparatus, e.g. a switched network of teleprinters for the distribution of text-based information, a selective call terminal
- H04N1/00315—Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a telecommunication apparatus, e.g. a switched network of teleprinters for the distribution of text-based information, a selective call terminal with a radio transmission apparatus
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the application provides a WiFi network access method, a communication method, peripheral equipment and a storage medium, wherein the WiFi network access method comprises the following steps: when the peripheral equipment enters a distribution network state, the first Bluetooth module enters a first broadcast state; sending a first type of broadcast packet to a control terminal through a first Bluetooth module, wherein the first type of broadcast packet comprises a service UUID, identification information of peripheral equipment and an equipment ID, and the identification information of the peripheral equipment can enable a user to preferentially select the peripheral equipment in a display interface of the control terminal to configure a network; establishing Bluetooth connection between the peripheral equipment and the control terminal; receiving distribution network information of the router from the control terminal through the first Bluetooth module; and accessing the WiFi module to the WiFi network according to the distribution network information of the router. By adopting the technical scheme provided by the embodiment of the application, the user can start to change the Bluetooth broadcast state of the peripheral equipment by pressing a key, and the first broadcast state of the peripheral equipment can be preferentially displayed by the control terminal, so that the user can rapidly configure the wireless network of the peripheral equipment.
Description
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a WiFi network access method, a communication method, a peripheral device, and a storage medium.
Background
As a peripheral device, a printer needs to be configured with a network of printers through a control terminal such as a PC or a mobile phone, so that the printer can be connected to a wireless network. In the prior art, the common network distribution mode includes: the control terminal scans the printers in a Bluetooth mode, and enables a user to select one target printer to configure the network in a scanned printer list, but when a plurality of printers exist in the printer list, the user cannot quickly select the printer needing to configure the network, so that selection errors exist, and user experience is poor.
Disclosure of Invention
In view of this, the present application provides a WiFi network access method, a communication method, a peripheral device and a storage medium, so as to solve the problem in the prior art that a user cannot quickly select a printer that needs to configure a network, and a user experience is not good due to a selection error.
In a first aspect, an embodiment of the present application provides a WiFi network access method, which is applied to a peripheral device, where the peripheral device includes a first bluetooth module and a WiFi module, and the method includes: when the peripheral equipment enters a distribution network state, the first Bluetooth module enters a first broadcast state;
sending a first type of broadcast packet to a control terminal through the first Bluetooth module, wherein the first type of broadcast packet comprises a service UUID, identification information of the peripheral equipment and an equipment ID, and the identification information of the peripheral equipment can enable a user to preferentially select the peripheral equipment in a display interface of the control terminal to configure a network;
establishing Bluetooth connection between the peripheral equipment and the control terminal;
receiving distribution network information of a router from the control terminal through the first Bluetooth module;
and accessing the WiFi module to a WiFi network according to the distribution network information of the router.
In one possible implementation, when the peripheral device enters a distribution network state, the entering of the first bluetooth module into a first broadcast state includes:
and a user starts distribution network operation in the peripheral equipment, the first Bluetooth module is switched to the first broadcast state from a second broadcast state, and a second broadcast packet sent by the first Bluetooth module in the second broadcast state is different from the first broadcast packet.
In one possible implementation manner, the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure the network includes:
and the control terminal receives the first broadcast packet and preferentially displays the equipment ID of the peripheral equipment at the first position of the equipment list of the display interface according to the identification information of the peripheral equipment.
In a possible implementation manner, the receiving, by the first bluetooth module, distribution network information of a router from the control terminal includes: receiving a first data packet, wherein the first data packet comprises a total packet number and a checking value of sub packets; and receiving a second data packet, detecting whether the second data packet is correct or not according to the check value of the first data packet, and analyzing the second data packet to obtain the distribution network information of the router if the second data packet is correct.
In a second aspect, an embodiment of the present application provides a communication method applied to a peripheral device, where the peripheral device includes a first bluetooth module, and the first bluetooth module has a function of cyclically broadcasting broadcast packets of different protocols, and the method includes cyclically executing the following steps:
sending a first broadcast packet packaged according to a first Bluetooth protocol to a control terminal through the first Bluetooth module;
sending a second broadcast packet packaged according to a second Bluetooth protocol to the control terminal through the first Bluetooth module;
wherein the first Bluetooth protocol and the second Bluetooth protocol are different.
In a possible implementation manner, the sending, by the first bluetooth module, a first broadcast packet encapsulated according to a first bluetooth protocol to a control terminal includes:
encapsulating a first broadcast packet according to a first bluetooth protocol;
starting Bluetooth broadcast, and sending the first broadcast packet to a control terminal through the first Bluetooth module;
the sending of the second broadcast packet encapsulated according to the second bluetooth protocol to the control terminal through the first bluetooth module includes:
encapsulating a second broadcast packet according to a second bluetooth protocol;
and starting Bluetooth broadcast, and sending the second broadcast packet to a control terminal through the first Bluetooth module.
In a possible implementation manner, the first broadcast packet includes a service UUID, identification information of the peripheral device, and a device ID, where the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure a network;
establishing Bluetooth connection between the peripheral equipment and the control terminal;
receiving distribution network information of a router from the control terminal through the first Bluetooth module;
accessing the WiFi module to a WiFi network according to the distribution network information of the router;
the receiving, by the first bluetooth module, the distribution network information of the router from the control terminal includes: receiving a first data packet, wherein the first data packet comprises a total packet number and a checking value of sub packets; receiving a second data packet, detecting whether the second data packet is correct according to the check value of the first data packet, and analyzing the second data packet to obtain distribution network information of the router if the second data packet is correct;
further comprising:
a user starts distribution network operation in the peripheral equipment, the first Bluetooth module is switched from a second broadcast state to a first broadcast state, and a first broadcast packet packaged according to a first Bluetooth protocol is broadcast to a control terminal through the first Bluetooth module in the first broadcast state; and the second broadcast packet sent by the first Bluetooth module in the second broadcast state is different from the first broadcast packet.
In a third aspect, an embodiment of the present application provides a WiFi network access method, which is applied to a control terminal, where the control terminal includes a second bluetooth module, and the method includes:
acquiring identification information of a peripheral device through the second Bluetooth module;
wherein, obtaining the identification information of a peripheral device through the second bluetooth module comprises:
controlling the control terminal to enter a scanning state, and acquiring a first broadcast packet sent by the peripheral equipment, wherein the first broadcast packet comprises a service UUID, identification information of the peripheral equipment and an equipment ID, and the identification information of the peripheral equipment can enable a user to preferentially select the peripheral equipment in a display interface of the control terminal to configure a network;
analyzing the first broadcast packet to obtain the identification information;
preferentially displaying the equipment ID of the peripheral equipment on a first equipment list of a display interface according to the identification information;
and establishing Bluetooth connection with the peripheral equipment according to user selection, and sending the distribution network information of the router to the peripheral equipment.
In one possible implementation manner, the method further includes:
and receiving a successful network access message returned by the peripheral equipment, sending a disconnection instruction to the peripheral equipment, and disconnecting the Bluetooth connection with the peripheral equipment.
In a possible implementation manner, the sending the distribution network information of the router to the peripheral device includes: sending a first data packet, wherein the first data packet comprises the total packet number and the checking value of the sub-packet; and sending a second data packet to enable the peripheral equipment to detect whether the second data packet is correct or not according to the check value of the first data packet, and if so, analyzing the second data packet to acquire the distribution network information of the router.
In one possible implementation, the device list of the display interface includes a bluetooth-enabled peripheral device list and/or a networked device list;
wherein the controlling the control terminal to enter the scanning state comprises: controlling a second Bluetooth module of the control terminal to search for peripheral devices supporting Bluetooth, and/or controlling the control terminal to search for peripheral devices already connected to a network, and/or controlling the control terminal to search for peripheral devices already communicating with a cloud server;
when the user selects the peripheral equipment which is connected with the network or the peripheral equipment which is communicated with the cloud server, the control terminal and the peripheral equipment which is connected with the network or the peripheral equipment which is communicated with the cloud server realize a binding relationship.
In one possible implementation manner, the displaying the device list of the interface further includes: and the peripheral equipment sending the SSID establishes direct connection communication with the peripheral equipment and sends the distribution network information of the router to the peripheral equipment when the user selects the peripheral equipment sending the SSID.
In a fourth aspect, an embodiment of the present application provides a communication method, which is applied to a control terminal, where the control terminal includes a second bluetooth module, and the method includes:
acquiring a first broadcast packet encapsulated by peripheral equipment according to a first Bluetooth protocol;
if the first Bluetooth protocol is a protocol supported by a first application program of the control terminal, analyzing the first broadcast packet by using the first application program;
and/or the presence of a gas in the gas,
acquiring a second broadcast packet encapsulated by the peripheral equipment according to a second Bluetooth protocol;
and if the second Bluetooth protocol is a protocol supported by a second application program of the control terminal, analyzing the second broadcast packet by using the second application program.
In one possible implementation manner, after the obtaining of the first broadcast packet encapsulated by the peripheral device according to the first bluetooth protocol, the method further includes:
if the first Bluetooth protocol is not a protocol supported by a first application program of the control terminal, the first application program is not used for analyzing the first broadcast packet; after obtaining a second broadcast packet encapsulated by the peripheral device according to a second bluetooth protocol, the method further comprises:
and if the second Bluetooth protocol is not a protocol supported by a second application program of the control terminal, not using the second application program to analyze the second broadcast packet.
In a possible implementation manner, the first broadcast packet includes a service UUID, identification information of the peripheral device, and a device ID, where the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure a network;
establishing Bluetooth connection between the peripheral equipment and the control terminal;
sending the distribution network information of the router from the control terminal to the peripheral equipment through the second Bluetooth module, so that the peripheral equipment is accessed to a WiFi network according to the distribution network information of the router;
the sending of the distribution network information of the router from the control terminal to the peripheral device through the second bluetooth module comprises: sending a first data packet, wherein the first data packet comprises the total packet number and a checking value of the sub-packet; sending a second data packet to enable the peripheral equipment to detect whether the second data packet is correct or not according to the check value of the first data packet, and if the second data packet is correct, the peripheral equipment analyzes the second data packet to obtain distribution network information of the router;
further comprising:
a user starts distribution network operation in the peripheral equipment, a first Bluetooth module of the peripheral equipment is switched from a second broadcast state to a first broadcast state, and a first broadcast packet packaged according to a first Bluetooth protocol is broadcast to a control terminal through the first Bluetooth module in the first broadcast state; and in the second broadcast state, a second broadcast packet sent by the first Bluetooth module is different from the first broadcast packet, wherein the first application program is used for analyzing the first broadcast packet and the second broadcast packet.
In a fifth aspect, embodiments of the present application provide a peripheral device, including a memory, a processor, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of the first and second aspects.
In a sixth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed, implements the steps of the method according to any one of the first and second aspects.
By adopting the technical scheme provided by the embodiment of the application, the following technical effects are achieved:
1. the user can start and change the Bluetooth broadcast state of the peripheral equipment by pressing a key;
2. the first broadcast state of the peripheral equipment can be preferentially displayed by the control terminal so as to enable a user to rapidly configure the wireless network of the peripheral equipment;
3. the peripheral device supports various Bluetooth protocols, and the compatibility of the peripheral device can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic view of another application scenario provided in the embodiment of the present application;
fig. 3 is a schematic flowchart of a WiFi network access method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a WiFi network access method according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating a packet splitting according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for adding a peripheral device according to an embodiment of the present disclosure;
fig. 7 is a communication method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a peripheral device according to an embodiment of the present invention.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The peripheral device according to the embodiment of the present application may be an image forming apparatus, and may also be a peripheral device having another function, which is not particularly limited in the embodiment of the present application. Among them, the image forming apparatus is a device having at least one function related to image formation, which may include but is not limited to: a print function, a scan function, a copy function, and a fax function. For example:
a single function printer: an image forming apparatus with only a printing function.
A multifunctional printer: the image forming apparatus with printing, copying, scanning and/or facsimile functions can also selectively set the number of paper cassettes.
The digital compound machine: based on the copying function, the laser printer has standard or optional printing, scanning and facsimile functions, adopts digital code principle, and laser printing mode to output file, and may be used in editing image and text as required.
The following illustrates a scenario in which the WiFi network access method and the communication method provided in the embodiments of the present application are applicable.
Referring to fig. 1, a schematic view of an application scenario provided in the embodiment of the present application is shown. As shown in fig. 1, the application scenario includes: a control terminal 110 and an image forming apparatus 120; among them, the control terminal 110 has data communication with the image forming apparatus 120. The image forming apparatus 120 may include, but is not limited to, the following devices: a single function printer, a multifunction printer, a complex machine, etc.
The control terminal 110 may be an electronic device, such as a computer, which is installed with a print driver, or an electronic device, such as a mobile phone or a mobile tablet, which can perform communication with the image forming apparatus 120, and may also be generally referred to as a user terminal, a client terminal, or a host.
The connection mode between the control terminal 110 and the image forming apparatus 120 is not limited in the embodiment of the present application. In one possible implementation, the control terminal 110 and the image forming apparatus 120 may be connected through a local area network; in another possible implementation, the image forming apparatus 120 may be connected to the control terminal 110 through a USB cable; in another possible implementation, the image forming apparatus 120 may be connected to the control terminal 110 by wireless means, such as bluetooth or Wi-Fi Direct.
In the embodiment of the present invention, the print job may be transmitted by the control terminal 110 to the image forming apparatus 120 to perform the printout.
Referring to fig. 2, a schematic view of another application scenario provided in the embodiment of the present application is shown. As shown in fig. 2, in the embodiment of the present application, the peripheral device 120 includes a first bluetooth module and a WiFi module, and the peripheral device 120 may establish communication with the router through the WiFi module. That is, peripheral 120 is to support both WiFi and bluetooth. The control terminal 110 includes a second bluetooth module, and the control terminal 110 may establish a bluetooth connection with the first bluetooth module of the peripheral device 120 through the second bluetooth module to implement bluetooth communication. It should be noted that the first Bluetooth module and the second Bluetooth module may be BLE (Bluetooth Low Energy) modules, and may also be standard Bluetooth modules. Those skilled in the art can adapt the data transmission and reception between the peripheral device 120 and the control terminal 110 and the information processing in the peripheral device 120 and the control terminal 110 according to the difference between the bluetooth low energy technology and the standard bluetooth technology, and such modifications are within the scope of protection of the present application.
The first embodiment:
the embodiment of the application provides a WiFi network access method, which improves the network that a user rapidly configures peripheral equipment, such as a printer, so that the printer can be rapidly connected with a wireless network. The following detailed description is made with reference to the accompanying drawings.
Referring to fig. 3, a schematic flow chart of a WiFi network access method provided in the embodiment of the present application is shown. The method can be applied to the application scenarios shown in fig. 1 and 2, as shown in fig. 3, which mainly includes the following steps.
Step S301: when the peripheral equipment enters a distribution network state, the first Bluetooth module enters a first broadcast state.
In a possible implementation manner, a user starts a distribution network operation in the peripheral device, the first bluetooth module switches from the second broadcast state to the first broadcast state, and a second broadcast packet sent by the first bluetooth module in the second broadcast state is different from the first broadcast packet. In specific implementation, a user can start the peripheral equipment to enter a distribution network state through a panel key of the peripheral equipment, and the first Bluetooth module is switched from the second broadcast state to the first broadcast state.
In one possible implementation mode, when the peripheral equipment is started for the first time after leaving factory, the first Bluetooth module is started to enter a first broadcast state, so that a user can rapidly configure a wireless network of the peripheral equipment; after the configuration is connected to the wireless network, the first Bluetooth module is switched to a second broadcast state and can be used for interaction of other messages; when a user needs to reconfigure the wireless network of the peripheral equipment, the broadcast state of the first Bluetooth module can be switched by starting the key to enter the first broadcast state.
In a possible implementation manner, if a user starts a key to operate the peripheral device to enter the distribution network state, when a first bluetooth module of the peripheral device is in a working state, the first bluetooth module enters a second broadcast state, and sends out a second broadcast packet, where the second broadcast packet does not include identification information, and in the second broadcast state, the control terminal detects the peripheral device and establishes a bluetooth connection to perform information interaction, and optionally, in the second broadcast state, only the bluetooth connection can be established to perform other information interaction, and information interaction for configuring a network cannot be performed.
In one possible implementation, when the WiFi module of the peripheral device is turned on and the router is connected, the first bluetooth module is in the second broadcast state; when the WiFi module of the peripheral equipment is started, but the router is not connected, the first Bluetooth module can be set to automatically enter the first broadcast state, and can also be set to enter the first broadcast state through the starting of a user key.
In a possible implementation manner, in the peripheral device, a separate key may be provided to start the first bluetooth module to enter the first broadcast state, or an existing key in the peripheral device may be multiplexed, which is not specifically limited in this embodiment of the present application.
Step S302: and sending a first broadcast packet to the control terminal through the first Bluetooth module.
Specifically, in the first broadcast state, the first bluetooth module of the peripheral device broadcasts a first type of broadcast packet to the outside. And the control terminal enters a scanning state and acquires the first broadcast packet through the second Bluetooth module. The first broadcast packet includes a service UUID, identification information of the peripheral device, and a device ID. The service UUID may be used to identify whether the corresponding peripheral device conforms to a communication protocol agreed between the control terminals. Because there may be more BLE devices broadcasting their broadcast packets outwards at the same time around the same control terminal, only the BLE devices meeting the agreed communication protocol will be displayed in the device list of the control terminal APP at this time, and the BLE devices not meeting the agreed communication protocol will not be displayed. The identification information of the peripheral device may enable the control terminal to preferentially display the device ID of the peripheral device to allow the user to preferentially select the peripheral device for rapid configuration of the peripheral device for connection to the wireless network.
In one possible implementation, the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure the network includes: the control terminal receives the first broadcast packet and preferentially displays the device ID of the peripheral device on the first position of the device list of the display interface according to the identification information of the peripheral device.
Specifically, when the peripheral device enters the first broadcast state, the broadcast data is as follows:
the identity is used for setting the position as 1 after clicking the preset key and lasting for 30s, and the control terminal identifies the position and preferentially displays the peripheral equipment in the search list.
Step S303: and establishing Bluetooth connection between the peripheral equipment and the control terminal.
In this embodiment, the identification information of the peripheral device in the first broadcast packet may preferentially display the device ID of the peripheral device in the first position of the device list of the display interface of the terminal device, so that the user may trigger the bluetooth connection between the peripheral device and the control terminal by clicking the device ID of the peripheral device. Specifically, the bluetooth connection is a connection between a first bluetooth module of the peripheral device and a second bluetooth module of the terminal device.
Step S304: and sending the distribution network information of the router to the peripheral equipment through the second Bluetooth module.
Specifically, after the bluetooth connection is established between the peripheral device and the control terminal, the next network distribution operation can be performed.
In a possible implementation manner, the operation of the distribution network comprises that a user selects an SSID of a router needing to be connected at a control terminal, inputs a password, and then sends distribution network information to the peripheral equipment through Bluetooth after the password is determined, so that a WiFi module of the peripheral equipment is connected with a wireless network.
Before entering the formal distribution network process, the peripheral equipment needs to start a Service, and the Service includes the following two characteristics:
a first feature: ssid _ info
Content providing method and apparatus | Description of the invention |
Characteristic name | ssid_info |
UUID | Need to contain "1C01" |
Authority | write(withresponse) |
Description of the invention | For receiving wifi information |
The corresponding data structure is shown in the following code:
note that if this structure is larger than 20 bytes, it will be sent in packets, each packet being a maximum of 20 bytes. To ensure that the packetization is sent correctly, this feature needs to have write (with response) rights.
The second characteristic: device _ state
Content providing method and apparatus | Description of the invention |
Characteristic name | device_state |
UUID | Need to contain "1C02" |
Authority | notify |
Description of the invention | Informing the management end of the networking progress |
The corresponding data structure is as follows:
step S305: and accessing the WiFi module to the WiFi network according to the distribution network information of the router.
Specifically, after the distribution network is successful, the peripheral device immediately notifies the link _ link success to prompt that the distribution network is successful. In order to improve the user experience, if the peripheral device can determine that the WiFi cannot be connected, notify ILink _ link wifierr is required. At this time, the control terminal prompts the user to modify the router information.
For convenience of understanding, the WiFi network access method provided in the embodiments of the present application is described in detail below with reference to a specific application scenario.
Referring to fig. 4, a flowchart of a WiFi network access method provided in the embodiment of the present application is shown. In this embodiment, the peripheral device is an image forming apparatus including a control module (a first bluetooth module is further provided on the control module) and a WiFi module; the control terminal is provided with an application program APP, and the control terminal can communicate with the image forming device through the APP. As shown in fig. 4, it mainly includes the following steps.
Step S401: and the user triggers the distribution network flow through the control terminal.
Specifically, the user can trigger the distribution network flow through the APP of the control terminal, and finds the image forming device to be distributed with the network through the Bluetooth.
Step S402: and the user triggers the distribution network flow through the image forming device.
It should be noted that step S401 and step S402 are not consecutive.
Step S403: the image forming apparatus transmits a first type broadcast packet through the first bluetooth module.
Specifically, the first broadcast packet includes a service UUID, identification information of the printer, and a device ID.
Step S404: the control terminal parses the first broadcast packet, identifies the image forming apparatus, and preferentially displays the device ID of the image forming apparatus at the front end of the Bluetooth search list according to the identification information.
Step S405: and establishing Bluetooth connection between the image forming device and the control terminal.
It is understood that since the device ID of the image forming apparatus is displayed at the front end of the bluetooth search list, the user can preferentially select the image forming apparatus with which the control terminal establishes a bluetooth connection.
Step S406: the image forming apparatus transmits two feature values, ssid _ info and device _ state, to the control terminal.
After the image forming apparatus establishes a bluetooth connection with the control terminal, the image forming apparatus returns two feature values, i.e., ssid _ info and device _ state, to the control terminal. Specifically, the two feature values ssid _ info and device _ state are returned to the APP of the control terminal.
Step S407: the control terminal writes information (SSID and password) that the user selects a router that needs to be connected to SSID _ info and transmits the information to the image forming apparatus.
Specifically, the control terminal may transmit the ssid _ info to the first bluetooth module of the image forming apparatus through the second bluetooth module.
Step S408: the image forming apparatus transmits ssid _ info to the WiFi module.
Specifically, the first bluetooth module of the image forming apparatus sends the SSID _ info to the WiFi module, so that the WiFi module acquires the SSID and the password to connect to the router according to the SSID _ info.
Step S409: the WiFi module writes the WiFi connection state into the device _ state and transmits the WiFi connection state to a first Bluetooth module of the image forming device.
Step S410: the image forming apparatus transmits device _ state to the control terminal through the first bluetooth module.
The device _ state is used for informing the control terminal of the state and the result of the distribution network. For example, a network distribution success or network distribution failure, etc.
In a possible implementation manner, when the SSID and the password of the router selected by the user to be connected exceed a predetermined byte, packetizing information of the router is required in step S407, and the APP packetizes the SSID and the password of the router and concatenates the total packet number and a Cyclic Redundancy Check (CRC) Check value of each packet into a first type of data packet; after receiving the first kind of data packet, the image forming device stores the data of the first kind of data packet, distinguishes the serial number of the subsequent second kind of data packet according to the CRC value in the first kind of data packet, and splices the data carried by the second kind of data packet to restore the information of the router. Specifically, if the data packets are divided into 10 data packets to be sent, the first data packet includes the total number of the data packets 10 and 10 CRC check values; when receiving the second data packet, the image forming device checks the CRC value carried by the second data packet and the stored CRC value of the first data packet, if the correct packet is found, the image forming device stores the packet, analyzes the second data packet which is checked to be correct, and splices out the SSID and the password of the router.
Referring to fig. 5, a schematic diagram of a packet splitting according to an embodiment of the present application is provided. As shown in fig. 5, in the first type of data packet, the total packet number is 1 byte; in the second type of data packet, the CRC check value is 2 bytes and the data is 18 bytes. Of course, those skilled in the art may adopt other data packet splitting manners according to actual needs, for example, the total packet number, the CRC check value, and/or the data are set to other byte numbers, which is not particularly limited in the embodiment of the present application.
By the sub-packet mode, the information of the super-long router can be sent in a sub-packet mode, and the transmission safety of the data packet is ensured.
By adopting the technical scheme provided by the embodiment of the application, the following technical effects are achieved:
1. the user can start and change the Bluetooth broadcast state of the peripheral equipment by pressing a key;
2. the first broadcast status of the peripheral device may be preferentially displayed by the control terminal to allow a user to quickly configure the wireless network of the peripheral device.
Example two:
it is understood that the WiFi network access method is described in the above embodiments. On the basis of the implementation, the application also provides a method for adding the peripheral equipment in the control terminal after the peripheral equipment is accessed to the WiFi network.
Referring to fig. 6, a schematic flow chart of a method for adding a peripheral device according to an embodiment of the present application is provided. As shown in fig. 6, it mainly includes the following steps.
Step S601: the user clicks on the add device on the control terminal.
Specifically, the user may click on an APP of the control terminal to add a device, which is to add a peripheral device.
Step S602: the control terminal performs a search to display the searched device list.
In one possible implementation, the device list may include: a list of bluetooth enabled devices and/or a list of networked devices.
Step S603: when a user selects a peripheral device supporting Bluetooth, establishing Bluetooth connection with the peripheral device supporting Bluetooth, and sending router information to the peripheral device; when the peripheral equipment supporting Bluetooth is connected with the network, the control terminal identifies the peripheral equipment in the network and establishes a binding relationship.
Specifically, when a user needs to establish bluetooth connection with a peripheral device and presses a predetermined key on the peripheral device, the device name of the peripheral device with the predetermined key pressed is displayed at the front end of the list in the device list, so that the user can quickly select the peripheral device needing bluetooth network distribution to quickly configure a network for the peripheral device, and establish wireless network connection with the peripheral device after network configuration, so as to add the peripheral device.
When a user presses a preset key on peripheral equipment, the equipment name of the peripheral equipment which presses the preset key is displayed at the front end of the list in an equipment list, the specific implementation is the same as the description of the first embodiment, when the peripheral equipment which supports Bluetooth initiates Bluetooth broadcasting, a control terminal receives a first broadcasting packet or a second broadcasting packet, and the control terminal preferentially displays the peripheral equipment which sends the first broadcasting packet at the front end of the equipment list, so that the user can quickly identify the peripheral equipment which needs to be configured with a network, and the peripheral equipment which is configured with the network can be quickly bound.
Step S604: when the user selects the peripheral equipment which is already networked, a binding request is initiated with the peripheral equipment, and a binding relation is established.
Specifically, the networked device list includes peripheral devices that have configured a wireless network, or peripheral devices that have connected to the network in a wired manner, or peripheral devices that have established communication with the cloud server; when the control terminal searches for the networked devices, all the peripheral devices connected to the same local area network are searched in the local area network connected to the control terminal, further, the control terminal can also search for the online peripheral devices communicated with the cloud server from the cloud server through the cellular network or the wide area network, and the searched peripheral devices are displayed in the networked device list. When a user selects a networked peripheral device, the control terminal may perform a fast binding with the peripheral device.
Through the embodiment of the application, a user can quickly search the peripheral equipment (such as an image forming device) connected with the same Wi-Fi network by using the Wi-Fi network of the mobile phone in the control terminal (such as the mobile phone), can search the peripheral equipment in cloud communication when the mobile phone uses a mobile cellular network, and can add different peripheral equipment to realize wide mobile printing communication.
In one possible implementation, the displayed device list may further include: peripheral devices that send out SSIDs; when a user selects the peripheral equipment which sends the SSID, direct connection communication is established with the peripheral equipment, the control terminal transmits router information to the peripheral equipment which sends the SSID so that the peripheral equipment which sends the SSID is connected with a wireless network, then the control terminal establishes communication with the peripheral equipment in the wireless network, and binding operation is executed.
In a possible implementation manner, the step of establishing, by the control terminal, direct communication with the peripheral device specifically includes: the control terminal establishes Direct communication with the soft AP of the peripheral equipment or establishes point-to-point connection with the peripheral equipment in a Wi-Fi Direct mode.
By adopting the technical scheme provided by the embodiment of the application, when a user initiates the binding of equipment or the addition of equipment in the control terminal, the control terminal displays the searched peripheral equipment, and displays the peripheral equipment list supporting Bluetooth and/or the peripheral equipment list supporting Wi-Fi or networking according to the groups, so that the user can conveniently and quickly identify the desired target equipment, and the selection difficulty of the user is caused by the fact that one equipment list displays all the searched peripheral equipment.
Example three:
in the prior art, the first bluetooth module of the peripheral device sends the broadcast in the same protocol, and the control terminal parses the broadcast according to the bluetooth protocol to obtain corresponding data. However, if the peripheral device and the control terminal support different bluetooth protocols, the peripheral device and the control terminal cannot perform bluetooth communication.
To solve the problem, an embodiment of the present application provides a communication method.
Referring to fig. 7, a communication method according to an embodiment of the present application is provided. The method can be applied to the application scenarios shown in fig. 1 and 2, as shown in fig. 7, which mainly includes the following steps.
Step S701: the peripheral device sends a first broadcast packet encapsulated according to a first Bluetooth protocol to the control terminal.
In embodiments of the present application, the peripheral device may support multiple bluetooth protocols. For example, a first bluetooth protocol and a second bluetooth protocol. It should be noted that, in the embodiment of the present application, the first bluetooth protocol and the second bluetooth protocol are taken as examples for explanation, and the embodiment of the present application does not specifically limit this. For example, in some possible implementations, the peripheral device may also support more than 3 bluetooth protocols.
Firstly, the peripheral equipment encapsulates a first broadcast packet according to a first Bluetooth protocol; then, the first Bluetooth module starts Bluetooth broadcast and sends a first broadcast packet to the control terminal through the first Bluetooth module.
Step S702: and if the first Bluetooth protocol is a protocol supported by a first application program of the control terminal, analyzing the first broadcast packet by using the first application program.
It is understood that the control terminal may or may not support the first bluetooth protocol.
If the first Bluetooth protocol is a protocol supported by a first application program of the control terminal, analyzing the first broadcast packet by using the first application program; and if the first Bluetooth protocol is a protocol which is not supported by the control terminal, the first broadcast packet is not analyzed by using a first application program, and the first broadcast packet is discarded.
Step S703: and the peripheral equipment sends a second broadcast packet packaged according to a second Bluetooth protocol to the control terminal.
First, the peripheral device may encapsulate a second broadcast packet according to a second bluetooth protocol; and then, starting Bluetooth broadcast, and sending the second broadcast packet to a control terminal through the first Bluetooth module.
In one possible implementation, after the peripheral device finishes transmitting the first broadcast packet, the peripheral device may delay transmitting the second broadcast packet after a preset time. For example, the delay time is 500ms, 800ms, etc., and the embodiment of the present application does not specifically limit this.
Step S704: and if the second Bluetooth protocol is a protocol supported by a second application program of the control terminal, analyzing the second broadcast packet by using the second application program.
It is understood that the control terminal may or may not support the second bluetooth protocol.
If the second Bluetooth protocol is a protocol supported by a second application program of the control terminal, analyzing the second broadcast packet by using the second application program; and if the second Bluetooth protocol is an unsupported protocol of the control terminal, not using a second application program to analyze the second broadcast packet, and discarding the second broadcast packet.
In summary, in the embodiment of the present application, the peripheral device supports multiple bluetooth protocols, so that the compatibility of the peripheral device can be improved.
In one possible implementation, the first broadcast packet and/or the second broadcast packet include a first broadcast packet and a second broadcast packet. The first broadcast packet is only sent out when the network is distributed, and the second broadcast packet is sent out when the network is not distributed, so that normal Bluetooth communication is carried out. For specific contents of the first broadcast packet and the second broadcast packet, reference may be made to the description of the foregoing embodiments, and for brevity, detailed description is omitted here.
Specifically, a user starts distribution network operation in peripheral equipment, a first Bluetooth module is switched to a first broadcast state from a second broadcast state, and a first broadcast packet packaged according to a first Bluetooth protocol is broadcast to a control terminal through the first Bluetooth module in the first broadcast state; and in a second broadcast state, the first Bluetooth module sends a second broadcast packet which is encapsulated according to the first Bluetooth protocol and is broadcast to the control terminal, wherein the first broadcast packet is different from the second broadcast packet. If the first bluetooth protocol is a protocol supported by a first application program of the control terminal, the control terminal may use the first application program to parse the first broadcast packet and the second broadcast packet.
In one possible implementation manner, the first broadcast packet and/or the second broadcast packet includes a service UUID, identification information of the peripheral device, and a device ID. The service UUID may be used to identify whether the corresponding peripheral device conforms to a communication protocol agreed between the control terminals. Because there may be more BLE devices broadcasting their broadcast packets outwards at the same time around the same control terminal, only the BLE devices meeting the agreed communication protocol will be displayed in the device list of the control terminal APP at this time, and the BLE devices not meeting the agreed communication protocol will not be displayed. The identification information of the peripheral device may enable the control terminal to preferentially display the device ID of the peripheral device to allow the user to preferentially select the peripheral device for rapid configuration of the peripheral device for connection to the wireless network.
In a possible implementation manner, after the control terminal uses the first application program to parse the first broadcast packet, and/or after the control terminal uses the second application program to parse the second broadcast packet, the bluetooth connection between the control terminal and the peripheral device may be established according to data obtained by parsing.
It can be understood that after the bluetooth connection is established between the peripheral equipment and the control terminal, the next network distribution operation can be performed. Specifically, the control terminal sends the distribution network information of the router to a first Bluetooth module of the peripheral equipment through a second Bluetooth module, and the peripheral equipment accesses the WiFi module to the WiFi network according to the distribution network information of the router.
In one possible implementation, when the distribution network information (SSID and password of the router) of the router exceeds a predetermined byte, the distribution network information of the router needs to be packetized and sent. Specifically, the control terminal performs packet processing on the SSID and the password of the router, and splices the total packet number and a Cyclic Redundancy Check (CRC) Check value of each packet into a first type of data packet; after receiving the first kind of data packet, the image forming device stores the data of the first kind of data packet, distinguishes the serial number of the subsequent second kind of data packet according to the CRC value in the first kind of data packet, and splices the data carried by the second kind of data packet to restore the information of the router. Specifically, if the data packets are divided into 10 data packets to be sent, the first data packet includes the total number of the data packets 10 and 10 CRC check values; when receiving the second data packet, the image forming device checks the CRC value carried by the second data packet and the stored CRC value of the first data packet, if the correct packet is found, the image forming device stores the packet, analyzes the second data packet which is checked to be correct, and splices out the SSID and the password of the router. For specific contents of the operation of the distribution network, reference may be made to the description of the above embodiments, and for brevity, detailed description is omitted here.
By the sub-packet mode, the information of the super-long router can be sent in a sub-packet mode, and the transmission safety of the data packet is ensured.
Corresponding to the above embodiments, the present application also provides a peripheral device. Fig. 8 is a schematic structural diagram of a peripheral device according to an embodiment of the present invention, where the peripheral device 800 may include: a processor 801, a memory 802, and a communication unit 803. These components communicate over one or more buses, and those skilled in the art will appreciate that the configuration of the peripherals shown in the figures are not meant to limit embodiments of the present invention, and may be in a bus configuration, a star configuration, a combination of more or less components than those shown, or a different arrangement of components.
The communication unit 803 is configured to establish a communication channel so that the memory 802 can communicate with other devices. Receiving the user data sent by other devices or sending the user data to other devices.
The processor 801, which is a control center of the storage device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and/or processes data by operating or executing software programs and/or modules stored in the memory 802 and calling data stored in the memory. The processor may be composed of Integrated Circuits (ICs), for example, a single packaged IC, or a plurality of packaged ICs connected to the same or different functions. For example, processor 801 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
The memory 802, for storing instructions executed by the processor 801, may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The execution instructions in memory 802, when executed by processor 801, enable peripheral device 800 to perform some or all of the steps in the above-described method embodiments.
In a specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the calling method provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and the like, refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided by the present invention, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (17)
1. A WiFi networking method is applied to a peripheral device, and is characterized in that the peripheral device comprises a first Bluetooth module and a WiFi module, and the method comprises the following steps: when the peripheral equipment enters a distribution network state, the first Bluetooth module enters a first broadcast state;
sending a first type of broadcast packet to a control terminal through the first Bluetooth module, wherein the first type of broadcast packet comprises a service UUID, identification information of the peripheral equipment and an equipment ID, and the identification information of the peripheral equipment can enable a user to preferentially select the peripheral equipment in a display interface of the control terminal to configure a network;
establishing Bluetooth connection between the peripheral equipment and the control terminal;
receiving distribution network information of a router from the control terminal through the first Bluetooth module;
and accessing the WiFi module to a WiFi network according to the distribution network information of the router.
2. The WiFi networking method of claim 1, wherein when the peripheral device enters a network distribution state, the first bluetooth module entering a first broadcast state comprises:
and a user starts distribution network operation in the peripheral equipment, the first Bluetooth module is switched to the first broadcast state from a second broadcast state, and a second broadcast packet sent by the first Bluetooth module in the second broadcast state is different from the first broadcast packet.
3. The WiFi networking method of claim 1, wherein the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure a network comprises:
and the control terminal receives the first broadcast packet and preferentially displays the equipment ID of the peripheral equipment at the first position of the equipment list of the display interface according to the identification information of the peripheral equipment.
4. The WiFi networking method of claim 1, wherein the receiving, by the first Bluetooth module, network configuration information of a router from the control terminal comprises: receiving a first data packet, wherein the first data packet comprises a total packet number and a checking value of sub packets; and receiving a second data packet, detecting whether the second data packet is correct or not according to the check value of the first data packet, and analyzing the second data packet to obtain the distribution network information of the router if the second data packet is correct.
5. A communication method is applied to a peripheral device, and the peripheral device comprises a first Bluetooth module which has a function of circularly broadcasting broadcast packets of different protocols, and the method comprises the following steps of circularly executing:
sending a first broadcast packet packaged according to a first Bluetooth protocol to a control terminal through the first Bluetooth module;
sending a second broadcast packet packaged according to a second Bluetooth protocol to the control terminal through the first Bluetooth module;
wherein the first Bluetooth protocol and the second Bluetooth protocol are different.
6. The method of claim 5, wherein sending a first broadcast packet encapsulated according to a first Bluetooth protocol to a control terminal via the first Bluetooth module comprises:
encapsulating a first broadcast packet according to a first bluetooth protocol;
starting Bluetooth broadcast, and sending the first broadcast packet to a control terminal through the first Bluetooth module;
the sending of the second broadcast packet encapsulated according to the second bluetooth protocol to the control terminal through the first bluetooth module includes:
encapsulating a second broadcast packet according to a second bluetooth protocol;
and starting Bluetooth broadcast, and sending the second broadcast packet to a control terminal through the first Bluetooth module.
7. The method of claim 5, wherein the first broadcast packet comprises a service UUID, identification information of the peripheral device and a device ID, and the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure a network;
establishing Bluetooth connection between the peripheral equipment and the control terminal;
receiving distribution network information of a router from the control terminal through the first Bluetooth module;
accessing the WiFi module to a WiFi network according to the distribution network information of the router;
the receiving, by the first bluetooth module, the distribution network information of the router from the control terminal includes: receiving a first data packet, wherein the first data packet comprises a total packet number and a checking value of sub packets; receiving a second data packet, detecting whether the second data packet is correct according to the check value of the first data packet, and analyzing the second data packet to obtain distribution network information of the router if the second data packet is correct;
further comprising:
a user starts distribution network operation in the peripheral equipment, the first Bluetooth module is switched from a second broadcast state to a first broadcast state, and a first broadcast packet packaged according to a first Bluetooth protocol is broadcast to a control terminal through the first Bluetooth module in the first broadcast state; and the second broadcast packet sent by the first Bluetooth module in the second broadcast state is different from the first broadcast packet.
8. A WiFi network access method is applied to a control terminal, the control terminal comprises a second Bluetooth module, and the method is characterized by comprising the following steps:
acquiring identification information of a peripheral device through the second Bluetooth module;
wherein, obtaining the identification information of a peripheral device through the second bluetooth module comprises:
controlling the control terminal to enter a scanning state, and acquiring a first broadcast packet sent by the peripheral equipment, wherein the first broadcast packet comprises a service UUID, identification information of the peripheral equipment and an equipment ID, and the identification information of the peripheral equipment can enable a user to preferentially select the peripheral equipment in a display interface of the control terminal to configure a network;
analyzing the first broadcast packet to obtain the identification information;
preferentially displaying the equipment ID of the peripheral equipment on a first equipment list of a display interface according to the identification information;
and establishing Bluetooth connection with the peripheral equipment according to user selection, and sending the distribution network information of the router to the peripheral equipment.
9. The method of claim 8, further comprising:
and receiving a successful network access message returned by the peripheral equipment, sending a disconnection instruction to the peripheral equipment, and disconnecting the Bluetooth connection with the peripheral equipment.
10. The method of claim 8, wherein sending the distribution network information of the router to the peripheral device comprises: sending a first data packet, wherein the first data packet comprises the total packet number and a checking value of the sub-packet; and sending a second data packet to enable the peripheral equipment to detect whether the second data packet is correct or not according to the check value of the first data packet, and if so, analyzing the second data packet to obtain the distribution network information of the router.
11. The method of claim 8, the list of devices of the display interface comprising a list of bluetooth enabled peripheral devices and/or a list of networked devices;
wherein the controlling the control terminal to enter the scanning state comprises: controlling a second Bluetooth module of the control terminal to search for peripheral devices supporting Bluetooth, and/or controlling the control terminal to search for peripheral devices already connected to a network, and/or controlling the control terminal to search for peripheral devices already communicating with a cloud server;
when the user selects the peripheral equipment which is connected with the network or the peripheral equipment which is communicated with the cloud server, the control terminal and the peripheral equipment which is connected with the network or the peripheral equipment which is communicated with the cloud server realize a binding relationship.
12. The method of claim 8, the displaying the list of devices of the interface further comprising: and the peripheral equipment sending the SSID establishes direct connection communication with the peripheral equipment and sends the distribution network information of the router to the peripheral equipment when the user selects the peripheral equipment sending the SSID.
13. A communication method is applied to a control terminal, the control terminal comprises a second Bluetooth module, and the method is characterized by comprising the following steps:
acquiring a first broadcast packet encapsulated by peripheral equipment according to a first Bluetooth protocol;
if the first Bluetooth protocol is a protocol supported by a first application program of the control terminal, analyzing the first broadcast packet by using the first application program;
and/or the presence of a gas in the gas,
acquiring a second broadcast packet encapsulated by the peripheral equipment according to a second Bluetooth protocol;
and if the second Bluetooth protocol is a protocol supported by a second application program of the control terminal, analyzing the second broadcast packet by using the second application program.
14. The method of claim 13, wherein after said obtaining the first broadcast packet encapsulated by the peripheral device according to the first bluetooth protocol, the method further comprises:
if the first Bluetooth protocol is not a protocol supported by a first application program of the control terminal, the first application program is not used for analyzing the first broadcast packet; after obtaining a second broadcast packet encapsulated by the peripheral device according to a second bluetooth protocol, the method further comprises:
and if the second Bluetooth protocol is not the protocol supported by the second application program of the control terminal, not using the second application program to analyze the second broadcast packet.
15. The method of claim 13, wherein the first broadcast packet comprises a service UUID, identification information of the peripheral device and a device ID, and the identification information of the peripheral device enables a user to preferentially select the peripheral device in a display interface of the control terminal to configure a network;
establishing Bluetooth connection between the peripheral equipment and the control terminal;
sending the distribution network information of the router from the control terminal to the peripheral equipment through the second Bluetooth module, so that the peripheral equipment is accessed to a WiFi network according to the distribution network information of the router;
the sending of the distribution network information of the router from the control terminal to the peripheral device through the second bluetooth module comprises: sending a first data packet, wherein the first data packet comprises the total packet number and a checking value of the sub-packet; sending a second data packet to enable the peripheral equipment to detect whether the second data packet is correct or not according to the check value of the first data packet, and if the second data packet is correct, the peripheral equipment analyzes the second data packet to obtain distribution network information of the router;
further comprising:
a user starts distribution network operation in the peripheral equipment, a first Bluetooth module of the peripheral equipment is switched from a second broadcast state to a first broadcast state, and a first broadcast packet packaged according to a first Bluetooth protocol is broadcast to a control terminal through the first Bluetooth module in the first broadcast state; and in the second broadcast state, a second broadcast packet sent by the first Bluetooth module is different from the first broadcast packet, wherein the first application program is used for analyzing the first broadcast packet and the second broadcast packet.
16. A peripheral device comprising a memory, a processor, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-7.
17. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22203457.1A EP4175335B1 (en) | 2021-10-27 | 2022-10-25 | Wifi network access method, peripheral apparatus, and storage medium |
US17/974,270 US20230126360A1 (en) | 2021-10-27 | 2022-10-26 | Wifi network access method, communication method, peripheral apparatus, and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111257540 | 2021-10-27 | ||
CN2021112575404 | 2021-10-27 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114980266A true CN114980266A (en) | 2022-08-30 |
Family
ID=82982361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210532260.8A Pending CN114980266A (en) | 2021-10-27 | 2022-04-27 | WiFi network access method, communication method, peripheral equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114980266A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115460674A (en) * | 2022-09-19 | 2022-12-09 | 珠海奔图电子有限公司 | Network distribution method and device |
RU2829113C1 (en) * | 2022-09-19 | 2024-10-24 | Чжухай Пантум Электроникс Кo., Лтд. | Method and apparatus for configuring network |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104539324A (en) * | 2014-12-25 | 2015-04-22 | 惠州Tcl移动通信有限公司 | Bluetooth low-power-consumption networking interconnecting method and system |
CN105873182A (en) * | 2015-12-18 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | Communication method and device |
CN107087247A (en) * | 2017-03-27 | 2017-08-22 | 宇龙计算机通信科技(深圳)有限公司 | A kind of bluetooth processing method and processing device |
CN107231606A (en) * | 2017-07-19 | 2017-10-03 | 北京京东尚科信息技术有限公司 | WiFi method of network entry, intelligent hardware devices and electric terminal |
CN107801229A (en) * | 2017-08-31 | 2018-03-13 | 捷开通讯(深圳)有限公司 | Smart home is with network method, terminal, equipment and the device with store function |
CN108513283A (en) * | 2018-03-13 | 2018-09-07 | 青岛海尔科技有限公司 | One kind matching network method, equipment, terminal, medium and computer equipment |
CN108886677A (en) * | 2016-04-14 | 2018-11-23 | 高通股份有限公司 | System and method for bluetooth equipment discovery |
CN109089247A (en) * | 2018-07-24 | 2018-12-25 | 深圳Tcl新技术有限公司 | Using starting method, system, terminal device and computer readable storage medium |
CN110166974A (en) * | 2019-05-30 | 2019-08-23 | 拉扎斯网络科技(上海)有限公司 | Method and device for establishing communication connection, electronic equipment and storage medium |
CN113518407A (en) * | 2021-08-04 | 2021-10-19 | 广东好太太智能家居有限公司 | WiFi network distribution method and system for intelligent equipment, electronic equipment and medium |
-
2022
- 2022-04-27 CN CN202210532260.8A patent/CN114980266A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104539324A (en) * | 2014-12-25 | 2015-04-22 | 惠州Tcl移动通信有限公司 | Bluetooth low-power-consumption networking interconnecting method and system |
CN105873182A (en) * | 2015-12-18 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | Communication method and device |
CN108886677A (en) * | 2016-04-14 | 2018-11-23 | 高通股份有限公司 | System and method for bluetooth equipment discovery |
CN107087247A (en) * | 2017-03-27 | 2017-08-22 | 宇龙计算机通信科技(深圳)有限公司 | A kind of bluetooth processing method and processing device |
CN107231606A (en) * | 2017-07-19 | 2017-10-03 | 北京京东尚科信息技术有限公司 | WiFi method of network entry, intelligent hardware devices and electric terminal |
CN107801229A (en) * | 2017-08-31 | 2018-03-13 | 捷开通讯(深圳)有限公司 | Smart home is with network method, terminal, equipment and the device with store function |
CN108513283A (en) * | 2018-03-13 | 2018-09-07 | 青岛海尔科技有限公司 | One kind matching network method, equipment, terminal, medium and computer equipment |
CN109089247A (en) * | 2018-07-24 | 2018-12-25 | 深圳Tcl新技术有限公司 | Using starting method, system, terminal device and computer readable storage medium |
CN110166974A (en) * | 2019-05-30 | 2019-08-23 | 拉扎斯网络科技(上海)有限公司 | Method and device for establishing communication connection, electronic equipment and storage medium |
CN113518407A (en) * | 2021-08-04 | 2021-10-19 | 广东好太太智能家居有限公司 | WiFi network distribution method and system for intelligent equipment, electronic equipment and medium |
Non-Patent Citations (1)
Title |
---|
匿名: "How to Share Your Wi-Fi Password From Your Phone", pages 1 - 3, Retrieved from the Internet <URL:https://web.archive.org/web/20211015085429/https://www.highspeedinternet.com/resources/how-to-share-wifi-passord-from-your-phone> * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115460674A (en) * | 2022-09-19 | 2022-12-09 | 珠海奔图电子有限公司 | Network distribution method and device |
EP4340435A1 (en) * | 2022-09-19 | 2024-03-20 | Zhuhai Pantum Electronics Co., Ltd. | Method and apparatus for network configuration |
RU2829113C1 (en) * | 2022-09-19 | 2024-10-24 | Чжухай Пантум Электроникс Кo., Лтд. | Method and apparatus for configuring network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7720057B2 (en) | Packet relay apparatus and control method for data relay apparatus | |
CN104123108B (en) | Communication device and its control method | |
US8676157B2 (en) | Wireless network system | |
WO2019100834A1 (en) | Multi-frequency band device connection method and system | |
CN104038925B (en) | Communication device and communication system | |
US8810839B2 (en) | Information processing apparatus for transferring image data, server apparatus for receiving transferred image data, and control methods and storage media therefor | |
CN102833876A (en) | Wireless communication device | |
US7363483B2 (en) | System for rebooting relay apparatus based on detection of completely no communication establishment data presence | |
CN109582256B (en) | Printing method, device and system | |
US10382923B2 (en) | Communication apparatus capable of preventing data erroneous transmission, control method therefor, and storage medium storing control program therefor | |
US9807271B2 (en) | Function performing apparatus, non-transitory computer-readable medium storing computer-readable instructions for communication apparatus, and communication apparatus | |
US20180063364A1 (en) | Information processing device and non-transitory recording medium | |
CN112020120A (en) | Network configuration method, device, equipment and system | |
EP3171263A1 (en) | Projection system with portable device for automatically configuring wireless link and displaying images | |
CN114980266A (en) | WiFi network access method, communication method, peripheral equipment and storage medium | |
CN111586691A (en) | Method and device for configuring wireless connection and wireless connectable equipment | |
EP3267656B1 (en) | Methods and apparatuses for message processing during pppoe authentication | |
EP4175335B1 (en) | Wifi network access method, peripheral apparatus, and storage medium | |
CN101808311B (en) | System, device and method for upgrading wireless terminal software | |
CN112637221B (en) | Equipment control method and device | |
CN109451497B (en) | Wireless network connection method and device, electronic equipment and storage medium | |
CN108023780B (en) | Gateway setting method and system of convergence terminal and convergence terminal | |
CN113676923B (en) | Distribution network method, distribution network related equipment, distribution network related device and storage medium | |
CN111490910A (en) | Device information scanning method, terminal device and computer readable storage medium | |
CN112152888B (en) | Information writing method and device for household appliance and equipment |
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 |