CN117440349A - Networking method and electronic equipment - Google Patents

Networking method and electronic equipment Download PDF

Info

Publication number
CN117440349A
CN117440349A CN202210826205.XA CN202210826205A CN117440349A CN 117440349 A CN117440349 A CN 117440349A CN 202210826205 A CN202210826205 A CN 202210826205A CN 117440349 A CN117440349 A CN 117440349A
Authority
CN
China
Prior art keywords
broadcast
frequency
identification
signal
equipment
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
CN202210826205.XA
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210826205.XA priority Critical patent/CN117440349A/en
Priority to PCT/CN2023/106088 priority patent/WO2024012343A1/en
Publication of CN117440349A publication Critical patent/CN117440349A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0431Key distribution or pre-distribution; Key agreement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

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

Abstract

The embodiment of the application provides a networking method and electronic equipment, wherein in the method, first equipment sends first broadcast and transmits ultrasonic waves with first frequency; receiving a response signal from the second device, the response signal characterizing the reception of the first broadcast and the ultrasonic wave by the second device; negotiating with the second device, and when the first device is determined to be the master device, transmitting a second broadcast, wherein the second broadcast comprises: an identification of the first device and an identification of the Wi-Fi direct channel; after establishing connection with the second equipment, negotiating with the second equipment to obtain a first session key; transmitting connection information encrypted by the first session key to the second device, the connection information including: the service set identifies the SSID and password. The networking method provided by the embodiment of the application is simple to operate and high in networking efficiency.

Description

Networking method and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of wireless communication, in particular to a networking method and electronic equipment.
Background
The sound box system consists of a plurality of sound boxes, and the connection networking of the plurality of sound boxes is a key step for constructing the sound box system. How to connect a plurality of sound boxes quickly and safely is important.
At present, a user can sequentially allocate a network to each sound box, and connect a plurality of sound boxes to the same local area network to realize connection of the sound boxes. But the mode has the advantages of complex operation, long network distribution time and low efficiency.
Disclosure of Invention
The embodiment of the application provides a networking method and electronic equipment, and networking operation is simple and efficiency is high.
The first aspect provides a networking method applied to a first device. In the method, a first device transmits a first broadcast and emits ultrasound at a first frequency. The second device may also transmit the first broadcast, as well as ultrasonic waves at the second frequency. In one embodiment, if a third device is also included in the networking scenario, the third device may also transmit the first broadcast, as well as ultrasound at a third frequency. The frequencies of the ultrasonic waves emitted by the different devices are different so that the other devices can identify the first device, the second device and the third device. The first broadcast sent by the first device comprises the identification of the first device and the first device, the first broadcast sent by the second device comprises the identification of the second device, the first broadcast sent by the third device comprises the identification of the third device, and the first broadcast is used for discovering other devices. In the following, the networking scenario including the first device and the second device is taken as an example to describe the steps executed by the third device, and reference may be made to the description related to the second device.
The device may also monitor the first broadcast from the other device and detect the ultrasonic waves from the other device while transmitting the first broadcast and the ultrasonic waves. The second device receives the first broadcast and ultrasonic waves with the first frequency, the second device sends response signals to the first device, and accordingly, the first device can receive the response signals from the second device. Wherein the response signal characterizes the reception by the second device of the first broadcast and the ultrasound of the first frequency.
In response to a response signal of the second device, the first device negotiates with the second device, and when the first device is determined to be the master device, the first device transmits a second broadcast, wherein the second broadcast comprises: the identity of the first device, and the identity of the Wi-Fi direct channel. The second device, in response to the second broadcast, may establish a connection with the first device on the Wi-Fi direct channel according to the identity of the first device.
After the first device establishes connection with the second device, the first device negotiates with the second device to obtain a first session key, and the first device uses connection information encrypted by the first session key, where the connection information includes: the service set identifies the SSID and password. The first device sends the connection information encrypted by the first session key to the second device, the second device responds to the connection information encrypted by the first session key, the encrypted connection information can be decrypted by using the first session key to obtain an SSID and a password, and the second device can establish encrypted connection with the first device according to the SSID and the password. The second device establishes encryption connection with the first device, so that data transmission security between the first device and the second device can be ensured.
In the application, the networking process does not need multiple operations of users, the networking efficiency is high, all the devices can be connected with each other, the same router is not needed, and the application range is wide. In addition, different devices can emit ultrasonic waves with different frequencies, and the purpose is that: devices in the same room are determined to network with the devices in the same room. If the second device receives the first broadcast of the first device, the second device and the first device can be in the same room or different rooms, but if the second device receives the ultrasonic wave with the first frequency, the second device and the first device are represented to be in the same room, so that the first device and the second device in the same room can be networked, erroneous connection is avoided, and networking accuracy can be improved.
In one possible implementation, after the first device receives the response signal from the second device, the first device negotiates with the second device to determine the master device, e.g., the device with the strongest processing capability may be the master device. In one possible implementation, the first device and the second device negotiation may determine candidate masters, which may be at least one. Wherein when the candidate master device is one, the candidate master device may be regarded as the master device.
When the candidate master device is plural, the candidate master device may output first hint information for instructing a user to determine a master device among the candidate master devices. When the first device is included in the candidate master device, the first device may output a first hint information. And the first equipment responds to the operation that the user determines that the first equipment is the main equipment, and determines that the first equipment is the main equipment.
In the application, the multiple devices can negotiate to obtain the master device, or the user confirms the master device. The user confirms that the main equipment is the step needing user participation in the multi-equipment networking process, and the operation is simple.
The following describes a manner in which a first device transmits a first broadcast, transmits ultrasonic waves of a first frequency, and a second device transmits a response signal:
first, the first broadcast sent by the first device may include: an identification of the first device, a device type of the first device, and an identification for indicating the first frequency. The identification for indicating the first frequency may be, for example, the first frequency or a number of the first frequency. The identification indicating the first frequency characterizes the first broadcast transmitting the ultrasonic waves of the first frequency such that the second device can identify the ultrasonic waves transmitted by the first device among the received ultrasonic waves.
In this embodiment, when the second device receives the first broadcast and the first frequency ultrasonic wave, the second device may send a response signal to the first device, the response signal characterizing that the second device received the first broadcast and the first frequency ultrasonic wave. In this way, the first device may determine whether the first device and the second device are in the same room according to whether the second device transmits the response signal, where if the first device receives the response signal from the second device, the first device determines that the first device and the second device are in the same room, and if the first device does not receive the response signal from the second device, the first device determines that the first device and the second device are not in the same room.
In the embodiment of the application, the first device can be connected with the second device in the same room, and error connection can be avoided.
Second, the first broadcast sent by the first device may include: identification of the first device, device type of the first device. The second device may carry an identification in the response signal indicating said first frequency in order to characterize the reception of the ultrasonic wave by the second device. It will be appreciated that if the second device does not receive ultrasound, no identification indicating the first frequency is included in the response signal. In this way, the first device can determine whether the second device receives the ultrasonic wave of the first frequency, that is, whether the second device is in the same room as the first device, based on the response signal from the second device. In the embodiment of the application, the first device can be connected with the second device in the same room, and error connection can be avoided.
Third, the second device may respond to the first broadcast, the ultrasonic waves of the first frequency, respectively. In this implementation, the response signal includes: a first sub-signal and a second sub-signal. Wherein a first device may transmit a first broadcast and ultrasound at a first frequency, and when a second device receives the first broadcast, may transmit a first sub-signal to the first device, and correspondingly, the first device may receive the first sub-signal from the second device, the first sub-signal being indicative of the second device receiving the first broadcast. When a second device receives ultrasound waves at a first frequency, the second device may transmit a second sub-signal to the first device, and accordingly, the first device may receive the second sub-signal from the second device, the second sub-signal being indicative of the second device receiving ultrasound waves at the first frequency.
In one possible implementation, the first device may first transmit a first broadcast and when the second device receives the first broadcast, may transmit a first sub-signal to the first device. The first device may transmit ultrasonic waves of a first frequency in response to the first sub-signal, and the second device may transmit a second sub-signal to the first device when the second device receives the ultrasonic waves of the first frequency.
In this implementation, the first device may determine that the second device is co-located with the first device based on whether the first sub-signal and the second sub-signal are received from the second device. Wherein when the first device receives the first sub-signal and the second sub-signal from the second device, the first device may determine that the first device is co-located with the second device, and when the first device does not receive the first sub-signal or the second sub-signal from the second device, the first device may determine that the first device is not co-located with the second device. In the embodiment of the application, the first device can be connected with the second device in the same room, and error connection can be avoided.
It should be appreciated that after determining that the master device is the first device, the first device may broadcast the identification of the Wi-Fi direct channel, so that devices receiving the second broadcast may establish a connection with the first device, and in order to ensure the security of the wireless connection, in one possible implementation, after the first device establishes a connection with the second device, the first device may authenticate, and after the second device passes the authentication, the first device may establish an encrypted connection with the second device.
Wherein the authentication is used to determine whether the second device is a device that is responsive to the first broadcast and the ultrasound, the authentication is used to determine whether a preset personal identification PIN code in the second device and a preset PIN code in the first device are the same. And negotiating with the second device to obtain the first session key when the second device is a device responding to the first broadcast and the ultrasonic wave and the preset PIN code in the second device is the same as the preset PIN code in the first device.
In the implementation manner, the first device can improve the security of wireless connection between the first device and the second device through authentication and authorization of the second device. When the third device is included in the networking scene, the first device can authenticate and authenticate the second device and the third device in parallel, and the processing speed of authentication and authentication of the first device can be improved. The authentication and authentication of the third device by the first device may refer to the relevant description of the authentication and authentication of the second device by the first device.
In the implementation manner, the second equipment through authentication and authentication can establish encryption connection with the first equipment, so that the data transmission security between the first equipment and the second equipment can be ensured.
In one possible implementation, if any of the devices that have been networked fails, a new device may be replaced for networking.
For example, when a master fails, a new master may be replaced and the network may be re-established according to the networking method described above. For example, when a slave device fails, a new slave device may be replaced, which may be referred to as a third device, for example. The third device may transmit the first broadcast and the ultrasonic wave of the third frequency, and when the first device receives the first broadcast and the ultrasonic wave of the third frequency from the third device, may output second prompt information, where the second prompt information is used to instruct a user to confirm whether to connect the third device with the first device.
The first device may send the second broadcast in response to the user determining to connect the third device with the first device, where the second broadcast includes an identifier of the first device and an identifier of a Wi-Fi direct channel. The third device receives the second broadcast and may establish a connection with the first device over the Wi-Fi direct channel. After the first device establishes connection with the third device, negotiating with the third device to obtain a second session key, and the first device sends the connection information encrypted by the second session key to the third device, the third device can decrypt the connection information by using the first session key, and then establish encrypted connection with the first device according to the connection information.
In the implementation mode, any equipment in the networking equipment fails, and can replace new equipment without binding and selling, so that the maintenance cost is low.
The second aspect provides a networking method applied to a second device. In the method, a second device receives a first broadcast from a first device and ultrasonic waves of a first frequency, and sends a response signal to the first device; the second device negotiates with the first device, and when the first device is determined to be the main device, a second broadcast from the first device is received, wherein the second broadcast comprises: the identity of the first device, and the identity of the Wi-Fi direct channel. And the second device establishes connection with the first device on the Wi-Fi direct channel according to the identification of the first device and the identification of the Wi-Fi direct channel.
The second device negotiates with the first device to obtain a first session key, and receives encrypted connection information from the first device, where the connection information includes: service set identification SSID and password; and the second equipment decrypts the encrypted connection information by adopting the first session key to obtain the connection information, and establishes encrypted connection with the first equipment according to the connection information.
In one possible implementation, the first broadcast includes: an identification for indicating the first frequency; alternatively, the response signal includes: an identification for indicating the first frequency.
In one possible implementation, the first broadcast and the second broadcast are both bluetooth broadcasts.
In one possible implementation, the response signal includes: a first sub-signal and a second sub-signal, said transmitting a response signal to said first device, comprising: transmitting the first sub-signal to the first device in response to receiving the first broadcast; the second sub-signal is transmitted to the first device in response to receiving the ultrasonic wave at the first frequency.
In one possible implementation, the method further includes: transmitting a first broadcast and transmitting ultrasonic waves at a second frequency, the first frequency being different from the second frequency.
In one possible implementation, when the second device is a candidate master device, the second device may output first prompt information to instruct a user to determine a master device among the candidate master devices.
In a possible implementation manner, when the second device is a master device, the second device may perform actions of the master device, and the actions of the master device may be described with reference to the correlation in the first aspect.
In a third aspect, an embodiment of the present application provides a networking system, where the networking system includes: a first device and a second device. The first device is configured to perform the networking method in the first aspect, and the second device is configured to perform the networking method in the second aspect.
In a fourth aspect, embodiments of the present application provide an electronic device, which may include: a processor and a memory. The memory is for storing computer executable program code, the program code comprising instructions; the instructions, when executed by a processor, cause the electronic device to perform the method as in the first to second aspects.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first to second aspects described above.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the methods of the first to second aspects described above.
The advantages of each of the possible implementation manners of the second aspect to the sixth aspect may be referred to as the advantages brought by the first aspect, and are not described herein.
Drawings
FIG. 1 is a schematic diagram of a system architecture applicable to the present application;
FIG. 2 is a schematic structural view of a sound box according to an embodiment of the present application;
fig. 3 is a schematic flow chart of an embodiment of a networking method provided in the embodiments of the present application;
fig. 4 is a schematic diagram of a speaker networking provided in an embodiment of the present application;
fig. 5 is another schematic diagram of a speaker networking provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Fig. 1 is a schematic diagram of a system architecture to which the present application is applicable. Fig. 1 illustrates an example of a sound box system constructed by a plurality of sound boxes. Referring to fig. 1, the system architecture includes a plurality of speakers, namely, a left speaker 11, a right speaker 12, a left surround speaker 13, a right surround speaker 14, and a subwoofer speaker 15. Wherein, left sound box 11, right sound box 12, left surround sound box 13, right surround sound box 14, and subwoofer sound box 15 can be through wireless connection constitution audio amplifier system. It should be understood that the types and numbers of sound boxes in fig. 1 are exemplary, and do not constitute any limitation on the system architecture applicable to the embodiments of the present application.
In the sound box system, each sound box can output the audio of different sound channels according to the performance of the sound box system, so that the audio output by the sound box system can achieve a stereo effect. For example, if left speaker 11 may output left channel audio, right speaker 12 may output right channel audio, left surround speaker 13 may output left surround audio, right surround speaker 14 may output right surround audio, and subwoofer speaker 15 may output bass channel audio, so that a user may hear audio with a stereo effect.
Wherein, a plurality of audio amplifier constitution audio amplifier system's key one step is: a plurality of sound boxes are connected through wireless to form a network. In one embodiment, a user may sequentially perform network configuration on a plurality of speakers on a terminal, so that each speaker is connected to the same lan, that is, the plurality of speakers form a network through wireless connection, and the plurality of speakers form a speaker system. For example, a user may first allocate a first sound box to a network in an Application (APP) of the terminal, then add a second sound box, and allocate the second sound box to the network until the allocation of a plurality of sound boxes is completed. It should be understood that each speaker accessing the same lan can be understood as: each speaker is connected to the same Access Point (AP), for example, the AP may be a router.
However, the mode requires users to sequentially distribute the network to a plurality of sound boxes, the operation is complex, the network distribution time is long, the efficiency is low, and the sound boxes need to be connected to the same local area network by relying on the same AP.
In one embodiment, the roles of each speaker may be preset during the manufacturing process of the speakers, and the keys may be preset in each speaker. The roles of the speakers are preset, for example, the left speaker 11 is set as a master speaker, and the other speakers are set as slave speakers. When the multi-sound box is in wireless connection, based on a preset role, the slave sound box can be connected into the master sound box according to the secret key by adopting connection modes such as a wireless loudspeaker, audio (wireless speaker and audio, WISA) and the like, so that the wireless connection of the multi-sound box is realized.
In this embodiment, because the role and the key of each speaker are preset, the plurality of speakers need to be sold in a set, and maintenance cost is high.
Therefore, a networking method with wide application range and high speed and safety is needed to realize wireless connection of a plurality of sound boxes. The networking method provided by the embodiment of the application does not depend on an AP (e.g. a router), does not need to preset roles and keys of the sound boxes, but negotiates among the sound boxes to establish wireless connection, so that the networking efficiency is high, any sound box can be replaced after being failed, the application range is wide, and the maintenance cost is low. It should be appreciated that the multi-device group list features in embodiments of the present application: the multiple devices are connected wirelessly to form a network.
Fig. 2 is a schematic structural diagram of a sound box according to an embodiment of the present application. It should be understood that the structure of each of the speakers shown in fig. 1 may be identical, and reference may be made to the description of fig. 2. Referring to fig. 2, sound box 20 may include: a key 21, an indicator light 22, a microphone 23, a speaker 24, a bluetooth chip 25, a wireless fidelity (wireless fidelity, wi-Fi) chip 26, a processor 27, and an antenna 28.
Sound box 20 may establish a bluetooth channel with other devices via bluetooth chip 25 and antenna 28 to enable bluetooth communication. Speaker 20 may establish Wi-Fi channels with other devices through Wi-Fi chip 26 and antenna 28 to enable Wi-Fi communications. In one embodiment, the Bluetooth chip 25 and the Wi-Fi chip 26 may share an antenna 28, or the Bluetooth chip 25 and the Wi-Fi chip 26 may each correspond to a separate antenna 28. It should be appreciated that the bluetooth chip 25 and Wi-Fi chip 26 are illustrated in fig. 2 as sharing an antenna 28.
Processor 27 may be configured to execute S301 to S314 in the following embodiments to complete the multi-speaker networking.
In one embodiment, processor 27 may include: the device comprises an ultrasonic detection module, a user interaction module, a device discovery module, a networking management module, an authentication module and a connection management module. Wherein the name of each module in the processor 27 is given by way of example, wherein some modules (or all modules) may be integrated into a single body.
The user interaction module is used for managing the keys 21, the indicator lights 22, the microphone 23 and the loudspeaker 24. For example, the user interaction module may detect the user's operation of the key 21 and collect sound through the microphone 23. In addition, the user interaction module may control the indicator lamp 23 to flash, display different colors, and the like, and the user interaction module may also control the speaker 24 to play audio.
And the equipment discovery module is used for discovering other sound boxes which are the basis for networking with the other sound boxes. In one embodiment, the device discovery module may discover other speakers by using bluetooth broadcast or Wi-Fi broadcast to network with other speakers. For example, the device discovery module may send Wi-Fi probe frames (Wi-Fi probes) to discover other speakers. In one embodiment, the device discovery module may perform S301-S308 in the embodiments described below.
In one embodiment, an Ultra Wide Band (UWB) tag may also be disposed on the speaker 20, and the device discovery module may use UWB technology to discover other speakers.
In an embodiment, the device discovery module may also discover other speakers using WLAN awareness (Wi-Fi aware) technology, and in this embodiment, a method adopted by the device discovery module to discover other speakers is not limited, and in the following embodiment, a device discovery method using bluetooth broadcasting is described as an example.
And the ultrasonic detection module is used for transmitting ultrasonic waves and detecting ultrasonic waves transmitted by other sound boxes.
In one embodiment, the device discovery module is further configured to detect whether other speakers are in the same room (same room) as the speaker according to the emitted ultrasonic waves, and further perform networking with the speakers in the same room.
And the authentication module is used for authenticating and authenticating other sound boxes. In one embodiment, the authentication module may perform S309-S310 in the following embodiments.
In one embodiment, after the speakers discover other speakers, they may be interconnected through a communication network to enable interaction of wireless signals. The communication network may be, but is not limited to: wi-Fi hotspot networks, wi-Fi peer-to-peer (P2P) networks, WISA networks, and the like. Wi-Fi point-to-point connections can also be referred to as Wi-Fi direct (Wi-Fi direct).
The following embodiments are described by taking the connection between sound boxes through Wi-Fi point-to-point connection as an example. In such an embodiment, the connection management module is configured to manage Wi-Fi P2P layers, such as start and stop of Group Owners (GO), and the like. And the connection management module is also used for establishing a physical channel for authentication by the authentication module, establishing a subsequent service channel and managing service connection. In one embodiment, the connection management module may perform S311-S314 in the embodiments described below.
The networking management module can be understood as a central management module and is used for managing the ultrasonic detection module, the user interaction module, the equipment discovery module, the authentication module and the connection management module. For example, after the loudspeaker box discovers other loudspeaker boxes, the networking management module can call the ultrasonic detection module to complete detection in the same room, and screen the loudspeaker boxes in the same room. When the screened sound boxes meet networking requirements, the user interaction module can be triggered to remind the user, so that the user can confirm the main sound box. After the user confirms the main sound box, the networking management module invokes the authentication module to finish the authentication and the authentication of the sound box according to the main equipment confirmed by the user. After passing the authentication and the authentication, the networking management module calls the connection management module to complete the wireless network connection of each sound box, namely, the sound box networking is completed.
In one embodiment, sound box 20 may also include a display screen. The display screen is used for displaying the man-machine interaction interface of the sound box, and is not shown in fig. 2.
It will be appreciated that the configuration shown in fig. 2 does not constitute a particular limitation of the enclosure. In other embodiments of the present application, the sound box may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
It should be understood that the networking method provided by the embodiment of the application is not only suitable for a scene of networking a plurality of sound boxes, but also suitable for a scene of networking by other equipment. The networking method provided by the embodiment of the application can be suitable for networking of intelligent household appliances in a home environment, and also suitable for networking of industrial wireless terminals in a factory environment, and the embodiment of the application is not limited in a scene where the networking method is applicable.
In the following embodiments, a plurality of electronic devices are described as an example of networking, where the plurality of electronic devices may include: the networking process of the first device, the second device, and the third device is described below in the networking process of the first device, the second device, and the third device.
The electronic device in the embodiment of the present application may be referred to as a User Equipment (UE), a terminal (terminal), etc., for example, the electronic device may be a mobile phone, a tablet (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a handheld device with a wireless communication function, a computing device, a vehicle-mounted device, or a wearable device, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in an industrial control (industrial control), a terminal in a smart home (smart home), etc., and the form of the electronic device is not specifically limited in the embodiment of the present application.
The networking method provided by the embodiment of the application is described below with reference to specific embodiments. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 3 is a flow chart of an embodiment of a networking method according to an embodiment of the present application. Referring to fig. 3, the networking method provided in the embodiment of the present application may include:
s301, the first device transmits a first bluetooth broadcast.
When multiple devices are networked, the user may turn on each device and turn on each device's bluetooth functionality, as well as wireless local area network (wireless local area network, WLAN) functionality. Each device may perform steps S301-S305, where the steps performed by each device are illustrated with respect to the first device.
After the first device turns on the bluetooth function, a bluetooth scan (e.g., bluetooth low energy (bluetooth low energy, BLE) scan) may be performed and the first bluetooth broadcast from the other devices is listened to. The first device may transmit a first bluetooth broadcast on an inquiry scan channel (inquiry scan channel). In one embodiment, the first device may transmit the first Wi-Fi broadcast when the first device transmits the Wi-Fi broadcast discovery device. Wherein the first broadcast includes: the first bluetooth broadcast or the first Wi-Fi broadcast is taken as an example for explanation in the embodiment of the present application.
The first bluetooth broadcast is used to discover other devices around the first device. For example, other devices surrounding the first device may respond to the first bluetooth broadcast when receiving the first bluetooth broadcast. The first device receives the response signals of the other devices, and can determine that the other devices exist around the first device, namely, find the other devices.
Similarly, the first device may also listen for a first bluetooth broadcast from the other device on the inquiry scan channel in response to the first bluetooth broadcast from the other device.
In one embodiment, the first bluetooth broadcast may include: the identity of the first device and the device type of the first device. The identification of the first device may be a name, model number, etc. of the first device. Such as when the first device is a speaker, the device type of the first device may indicate that the first device is specifically a speaker of that type, such as a subwoofer speaker, a left surround speaker, etc. In one embodiment, the first bluetooth broadcast may be a BLE broadcast, or a legacy bluetooth BR broadcast.
S302, the first device transmits ultrasonic waves.
It should be understood that S302 and S301 may be performed simultaneously, without distinction of the order of the two.
The purpose of the first device emitting ultrasound waves is: screening out devices in the same room as the first device. Because the ultrasonic waves are reflected when encountering obstacles during transmission in the air, the ultrasonic waves cannot pass through the wall, and the device which is in the same room as the first device can receive the ultrasonic waves emitted by the first device, but the device which is not in the same room as the first device cannot receive the ultrasonic waves emitted by the first device.
In one embodiment, the frequency of the ultrasonic waves emitted by each device may be different so that the device receiving the ultrasonic waves may distinguish between the devices emitting the ultrasonic waves. For example, the first device may emit ultrasonic waves at a first frequency.
S303, the second device transmits a response signal to the first device.
After the second device turns on the bluetooth function, bluetooth scanning may be performed and first bluetooth broadcasts from other devices are monitored.
In one embodiment, the first bluetooth broadcast may further include: an identification of the frequency of the ultrasonic wave transmitted by the first device, such as the identification may be a first frequency. In this embodiment, if the second device is in the same room as the first device, the second device may receive the ultrasonic wave emitted by the first device and may acquire the frequency of the ultrasonic wave. When the second device monitors the first bluetooth broadcast and receives the ultrasonic wave of the first frequency, the second device may send a response signal to the first device. The response signal characterizes the second device receiving a first broadcast from the first device and an ultrasonic wave at a first frequency. In such an embodiment, the response signal may include: the identity of the second device and the device type of the second device.
The identifier of the second device may be a name, a model number, etc. of the second device. The device type of the second device may be, for example: sound boxes, mobile phones, watches, etc. For example, when the device type of the second device is a speaker, the device type of the second device is also used to indicate a specific speaker class, e.g., the type of the speaker may be a left speaker, a right speaker, etc. That is, when the second device is another type of device, the device type of the second device is also used to indicate the specific type of device.
In one embodiment, the first bluetooth broadcast may not include: the identification of the frequency of the ultrasonic wave transmitted by the first device, when the second device monitors the first bluetooth broadcast and receives the ultrasonic wave of the first frequency, may send a response signal to the first device, in which embodiment the response signal may include: an identification of the second device, a device type of the second device, and an identification for indicating that the second device received the ultrasonic wave of the first frequency. In one embodiment, the identification for indicating that the second device received the ultrasonic wave of the first frequency may be: identification of the first frequency, such as the first frequency.
In one embodiment, the second device, upon receiving the first bluetooth broadcast and the ultrasonic wave at the first frequency, may send a signal (e.g., a first sub-signal and a second sub-signal), respectively, to the first device to characterize that the second device received the first bluetooth broadcast and the ultrasonic wave at the first frequency, respectively. Wherein the response signal may comprise a first sub-signal and a second sub-signal. In such an embodiment, the identification of the first frequency may or may not be included in the first bluetooth broadcast.
In such an embodiment, when the second device monitors the first bluetooth broadcast, a first sub-signal may be transmitted to the first device, the first sub-signal characterizing that the second device received the first bluetooth broadcast. The first sub-signal includes: the identity of the second device and the device type of the second device. The first device may transmit ultrasonic waves at a first frequency in response to receiving the first sub-signal from the second device. If the second device receives ultrasonic waves of the first frequency, a second sub-signal may be sent to the first device, the second sub-signal being used to characterize the reception of ultrasonic waves of the first frequency by the second device.
Wherein when the first bluetooth broadcast includes the identification of the first frequency, the identification of the second device and the device type of the second device may be included in the second sub-signal. When the first bluetooth broadcast does not include the identification of the first frequency, the second sub-signal may include: an identification of the second device, a device type of the second device, and an identification for indicating that the second device received the ultrasonic wave of the first frequency.
In one embodiment, the second device is unable to receive the ultrasonic waves of the first frequency transmitted by the first device if the second device is not co-located with the first device. In this embodiment, the response signal may include: the identity of the second device and the device type of the second device.
In one embodiment, the first device may also measure the distance between the second device and the first device in other ranging manners, and the first device may detect whether the first device and the second device are in the same room according to the distance between the second device and the first device. Wherein the first device may determine that the second device is co-located with the first device when the distance of the second device from the first device is less than or equal to a preset distance. When the distance between the second device and the first device is greater than the preset distance, the first device may determine that the second device is not co-located with the first device. Among them, ranging means may include, but are not limited to: infrared ranging, bluetooth ranging, etc.
The following embodiments will be described by taking the example that the second device and the first device are in the same room.
It should be appreciated that the interaction flow between the first device and the third device is also illustrated in fig. 3, and the interaction flow between the first device and the third device may refer to the interaction flow between the first device and the second device. In fig. 3, the third device is illustrated as being in the same room as the first device.
S304, the first device determines the devices to be networked according to the response signals from the devices.
After the first device transmits the first bluetooth broadcast, other devices with bluetooth functions turned on around the first device may respond to the first bluetooth broadcast, so that the first device may receive response signals from the plurality of devices. For example, the plurality of devices may include a second device, a third device, and a fourth device, which is described below as being not co-located with the first device.
And the first equipment determines equipment to be networked according to the response signals from the equipment. In one embodiment, the first device may use the device that sent the response signal and is in the same room as the first device as the device to be networked.
In one embodiment, since the device that "receives both the first broadcast signal from the first device and the ultrasonic wave of the first frequency" can transmit the response signal to the first device, the first device can determine that the device transmitting the response signal is in the same room as the first device, and thus can use the device transmitting the response signal as the device to be networked.
In an embodiment, because the device detecting the ultrasonic wave of the first frequency may carry an identification for indicating that the second device receives the ultrasonic wave of the first frequency in the response signal, the first device may further determine the device to be networked according to the received response signal.
For example, the first device may receive response signals from the second device, the third device, and the fourth device, and thus may determine that the second device, the third device, and the fourth device may each listen to the first broadcast signal. In addition, the first device may further detect a response signal from the second device, a response signal from the third device, and whether the response signal of the fourth device includes "an identifier for indicating that the ultrasonic wave of the first frequency is detected", and determine whether the second device, the third device, and the fourth device are in the same room as the first device.
For example, the response signal from the second device and the response signal from the third device each include a "first frequency", but the response signal from the fourth device does not include a "first frequency", the first device may determine that the second device and the third device are co-located with the first device, and the fourth device is not co-located with the first device. In this way, the first device may use the first device, the second device, and the third device as devices to be networked.
In the embodiment of the application, the first device sends the response signal and is in the same room as the first device, so that the first device can be prevented from being connected with other devices in other families or other environments in a wireless manner, erroneous connection can be avoided, and networking accuracy is improved.
The following description will take the first device, the second device, and the third device as devices to be networked as examples.
S305, the first device, the second device and the third device negotiate to determine candidate master devices.
The first device, the second device, and the third device negotiate to determine a candidate master device for purposes of: and determining roles of the first device, the second device and the third device, so that the first device, the second device and the third device can be connected in a wireless mode according to the roles of the first device, the second device and the third device. Roles may include master and slave. The master device is included in devices to be networked, and devices other than the master device in the devices to be networked may be referred to as slave devices. And the master device is used for establishing a communication channel with the slave device so as to support service data transmission. In one embodiment, the candidate master device may be a device with high processing power among the devices to be networked.
After the first device determines the device to be networked, the first candidate master device may be determined according to the device types of the first device, the second device, and the third device, and the first candidate master device may be at least one. For example, the first device is taken as a left sound box, the second device is taken as a right sound box, and the third device is taken as a subwoofer sound box for illustration, because the left sound box and the right sound box have strong processing capability, the first device can determine the left sound box (first device) and the right sound box (second device) as first candidate main devices.
In one embodiment, after the first device determines the first candidate master device, the identification of the first candidate master device may be synchronized with the second device and the third device, where the identification of the first candidate master device includes: the identification of the left sound box and the identification of the right sound box. Similarly, the first device may also receive the identification of the second candidate master device determined by the second device, and the identification of the third candidate master device determined by the third device. That is, the first device may receive the identification of the candidate master device determined by the other devices.
The first device may determine the candidate master device according to the first candidate master device, the second candidate master device, and the third candidate master device.
For example, the first device may consider a device included in each of the first candidate master, the second candidate master, and the third candidate master as a candidate master. Alternatively, the first device may use the first N devices having the largest number of occurrences among the first candidate master device, the second candidate master device, and the third candidate master device as candidate master devices. N is an integer greater than or equal to 1.
For example, the first device, the second device, and the third device may also determine the candidate master device using the same determination rule, so that the candidate master devices determined by the first device, the second device, and the third device may be the same, e.g., the first candidate master device, the second candidate master device, and the third candidate master device may be the same, and the first device may use the first candidate master device as the candidate master device.
The candidate master device including the first device and the second device is described below as an example.
And S306, outputting prompt information by the candidate master device, wherein the prompt information is used for prompting a user to select the master device.
In one embodiment, the hint information output by the candidate host device may be referred to as a first hint information.
The step S305 teaches that the first device may determine the candidate master device, and similarly, the second device, and the third device may also determine the candidate master device, because the candidate master devices determined by the first device, the second device, and the third device are the same using the same determination rule. Because each device may determine a candidate master device, the device determined to be a candidate master device may output a hint message to characterize itself as a candidate master device.
In one embodiment, after the candidate masters determined by the first device, the second device and the third device, the candidate masters determined by the first device, the second device and the third device may be synchronized with each other, and when the candidate masters are consistent, the candidate masters may output a prompt message.
In fig. 3, the candidate master device includes a first device and a second device, for example, if the first device and the second device can both determine that the candidate master device is the first device and the second device, the first device and the second device can both output prompt information. The prompting information is used for prompting a user to select the main equipment.
In one embodiment, taking the first device as an example, the first device may output the prompt information in a voice manner, for example, the first device may play "press a key on a sound box, and determine the master device of the networking. Or, in order to make it easier for the user to see which devices output the prompt information more clearly, the first device may also control the indicator light on the first device to flash or display different colors, so that the user can quickly determine the candidate master device, so as to select the master device from the candidate master devices.
In one embodiment, when the first device includes a display screen, the first device may also display a prompt message on the display screen. The method for outputting the prompt information by the candidate master device is not limited.
In one embodiment, the first device, the second device, and the third device may negotiate to determine the master device without user confirmation.
S307, in response to the user confirming the operation of the main device, the main device sends a second Bluetooth broadcast, wherein the second Bluetooth broadcast comprises the GO name and the identification of the Wi-Fi P2P channel.
In one embodiment, the first device may also broadcast the GO name and Wi-Fi P2P by sending a Wi-Fi broadcast, in which the master device may send a second Wi-Fi broadcast in response to the user confirming operation of the master device. The second bluetooth broadcast and the second Wi-Fi broadcast may be referred to as a second broadcast, and in this embodiment of the present application, the second broadcast is taken as an example of the second bluetooth broadcast.
In fig. 3, the user is shown as an example of confirming the first device as the master device. For example, the user may press a key on the first device confirming that the first device is the master device.
The first device may send a second bluetooth broadcast in response to the user confirming operation of the master device, such as the first device detecting operation of a user pressing a key on the first device. The second bluetooth broadcast is used to establish a Wi-Fi P2P connection with the slave device. In one embodiment, the second bluetooth broadcast may include: GO name, and identification of Wi-Fi P2P channel. The GO is the primary device, i.e., the first device, and the GO name may be referred to as the identity of the first device.
Wherein, the GO name can be: a service set identification (service set identifier, SSID), or a media access control address (media access control address, MAC) of the master device (first device). The second device, the third device, among the devices to be networked, except the GO may be referred to as a Group Client (GC). The identification of Wi-Fi P2P channels may be: channel number, or frequency band in which the channel is located, etc.
S308, the second device establishes a connection with the first device on the Wi-Fi P2P channel.
Similarly, the third device may also establish a connection with the first device over the Wi-Fi P2P channel.
The second device monitors the bluetooth broadcast in the inquiry scanning channel, and can monitor the second bluetooth broadcast, so that the GO name and the identification of the Wi-Fi P2P channel can be obtained. The second device may establish a connection with the first device on the W-iFi P2P channel according to the GO name.
In one embodiment, the second device may feed back a connection response message to the first device in the Wi-Fi P2P channel in response to listening to the second bluetooth broadcast, characterizing that the second device establishes a temporary connection with the first device over the Wi-Fi P2P channel. It should be appreciated that Wi-Fi P2P channels may be referred to simply as P2P channels. In one embodiment, the process by which the second device may establish a connection with the first device over the Wi-Fi P2P channel may be described with reference to the associated description in the Wi-Fi P2P protocol.
S309, the first device authenticates the second device.
When the first equipment authenticates and authenticates the second equipment, the third equipment can be authenticated and authenticated in parallel, and therefore authentication and authentication efficiency is improved.
Taking the first device authenticating the second device as an example, the first device authenticating the second device can be understood as: the first device determines whether the second device is a device in the device to be networked, and when the second device is determined to be the device in the device to be networked, authentication passes, and authentication operation can be performed.
The authentication process comprises the following steps: in one embodiment, in response to the second bluetooth broadcast, when the second device feeds back a connection response message in the Wi-Fi P2P channel, the connection response message may include: and the identifier is used for indicating the second equipment to be the equipment in the equipment to be networked. For example, the connection response message may include an identifier of the second device, or other identifiers for indicating that the second device is included in the device to be networked, where a value of the flag bit is 1 indicates that the second device is included in the device to be networked. The first device may determine, according to the connection response message, whether the second device is included in the device to be networked.
Authentication process: in one embodiment, the first device and the second device each have stored therein a preset key, such as a personal identification (personal identification number, PIN) code. The first device authenticating the second device can be understood as: the first device determines whether the preset PIN in the second device is the same as the preset PIN code in the first device.
The second device may send the encrypted preset PIN code in the second device to the first device by using an encryption algorithm, and after the first device decrypts the preset PIN code in the second device, if it is determined that the preset PIN code in the second device is the same as the preset PIN code in the first device, the second device authenticates the second device, and if the preset PIN code in the second device is different from the preset PIN code in the first device, the second device authenticates the second device.
In one embodiment, the first device may also employ a simple cryptographic exponential key exchange (simple password authenticated exponential key exchange, SPEKE) algorithm to determine whether the preset PIN code in the second device is the same as the preset PIN code in the first device.
And S310, when the second device passes authentication and the authentication passes, the first device and the second device negotiate to obtain a first session key.
A session key for encrypting and decrypting data transmitted between two devices. It should be noted that the first device and the second device negotiate to obtain a first session key and similarly the first device and the third device negotiate to obtain a second session key, the first session key and the second session key being different. In this way, the session key between each group client GC and the group owner GO is different, which can improve data security.
In one embodiment, the first device and the second device may negotiate a first session key using a SPEKE algorithm when the second device authenticates and the authentication passes. Wherein the SPEKE algorithm comprises two phases, a key exchange phase and a key authentication phase. In the key exchange stage, the first device and the second device obtain a session key through negotiation, in the key authentication stage, the first device and the second device mutually confirm the session key known by the opposite side, and when the session key known by the opposite side is confirmed to be consistent, the session key can be used as the first session key.
S311, the first device encrypts the connection information by using the first session key to obtain the first connection information.
The connection information may include: service set identification (service set identifier, SSID) and password. In one embodiment, the connection information may be referred to as GO node information.
The first device may encrypt the connection information using the first session key to obtain the first connection information, so as to ensure security of the connection information. The first connection information is encrypted connection information.
In the embodiment of the application, the encryption and decryption algorithm is not limited, and the encryption and decryption algorithm may include, but is not limited to: hash algorithm, message-digest algorithm (md5).
S312, the first device sends the first connection information to the second device on the Wi-Fi P2P channel.
S313, the second device decrypts the first connection information by using the first session key to obtain the connection information.
The second device decrypts the first connection information and may obtain the SSID and password.
S314, the second device accesses the encrypted GO (first device) on the Wi-Fi P2P channel by adopting the SSID and the password.
The second device can access the encrypted GO (first device) on the Wi-Fi P2P channel by adopting the SSID and the password, i.e. the second device establishes an encrypted connection with the first device. Thus, the first device and the second device can transmit encrypted data on an unencrypted channel, and the security of data transmission is ensured.
Similarly, the first device may encrypt the connection information using the second session key to obtain second connection information, and send the second connection information to the third device on the Wi-Fi P2P channel. And the third device decrypts the second connection information by using the second session key to obtain the connection information, and the third device can obtain the SSID and the password if decrypting. The third device may access an encrypted GO (first device) on a Wi-Fi P2P channel using an SSID and password. Thus, the first device and the third device can transmit encrypted data on an unencrypted channel, and the security of data transmission can be ensured.
The second device and the third device respectively establish encryption connection with the first device, namely the first device, the second device and the third device complete networking. After the first device, the second device and the third device are networked, the first device can respectively transmit service data to the second device and the third device through Wi-Fi P2P channels, so that smooth execution of the service is ensured. For example, after the speakers shown in fig. 1 are networked, the first device (such as a left speaker) may send audio data to other speakers on the Wi-Fi P2P channel, and multiple speakers may play audio, so that the user may hear the audio with a stereo effect.
Fig. 4 is a schematic diagram of a speaker networking provided in an embodiment of the present application. Referring to a in fig. 4, after a user turns on a sound box, and turns on a bluetooth function and a WLAN function of the sound box, each sound box may transmit a first bluetooth broadcast and an ultrasonic wave. Note that the frequencies of the ultrasonic waves transmitted from different sound boxes are different, and the frequencies of the ultrasonic waves are not shown in a in fig. 4. After each sound box executes S301-S305, if the determined candidate main devices are the left sound box and the right sound box, the indicator lights of the left sound box and the right sound box flash or display different colors, and play the prompt information such as "press the key on the sound box, determine the main device of the networking", as shown in b in fig. 4. Referring to b in fig. 4, if the user presses a key on the left speaker, the left speaker may determine that the user is the master device, and perform S307-S314 to wirelessly connect with each speaker to complete the networking.
Fig. 5 is another schematic diagram of a speaker networking provided in an embodiment of the present application. Referring to fig. 5, the process of speaker networking may be divided into four stages, namely: a device discovery phase, a temporary connection phase, an authentication and authorization phase and a service network establishment phase.
In the device discovery stage, the sound box starts BLE scanning, can send BLE broadcasting, emit ultrasonic waves and start ultrasonic detection. The device discovery phase may determine the speakers to be networked and determine the master speakers. The master soundbox may disclose the GO name and identification of the Wi-Fi P2P channel through the bluetooth channel. In one embodiment, the device discovery phase may include S301-S307.
And in the temporary connection stage, the slave sound box establishes connection with the master sound box through a Wi-Fi P2P channel to complete the establishment of a Wi-Fi P2P physical link, namely, establish the Wi-Fi P2P channel. In one embodiment, the temporary connection phase may include S308.
In the authentication and authorization stage, the master loudspeaker box can perform authentication and authorization on each slave loudspeaker box in parallel and negotiate a session key. In one embodiment, the temporary connection phase may include S309-S310.
In the service network establishment stage, the master sound box can encrypt the connection information, and the encrypted connection information is transmitted to each slave sound box on the non-encrypted Wi-Fi P2P channel, so that each sound box can establish encrypted connection with the master sound box to complete networking. In one embodiment, the service network establishment phase may include S311-S314.
The networking flow shown in fig. 3 to 5 is a flow when a plurality of devices are first networked. Taking the sound box as an example, it is understood that after each sound box is first networked, each slave sound box can directly access the encrypted master sound box on the Wi-Fi P2P channel by adopting SSID and password when each sound box is electrified next time, so that networking is completed.
In the embodiment of the application, when a plurality of devices are networked, the devices can determine the device to be networked by combining the device discovery with ultrasonic detection, the device to be networked can determine candidate master devices, and the master devices are determined by means of participation of users. After determining the master device, the master device may establish a temporary connection with the slave devices, and after the master device concurrently authenticates and authenticates each slave device, the master device may negotiate a session key, and further transmit encrypted data over the wireless channel, so that the slave device establishes an encrypted connection with the master device to complete networking. The networking process of a plurality of devices only needs to confirm the main device by a user, the operation is simple, the networking efficiency is high, the devices can be connected with each other, the same router is not needed, and the application range is wide. In addition, any equipment fails, can be replaced in time, and has low maintenance cost.
In one embodiment, after any of the speakers fails, the user may purchase the same type of speaker, trigger a new speaker and a networked speaker to be restored, or trigger a new speaker to be added to the networked speaker.
If the main sound box (such as the left sound box) fails, the user can purchase a new left sound box, and the user can restore other sound boxes to factory settings, such as the user restores the bass sound box, the right sound box, the left surrounding sound box and the right surrounding sound box to factory settings. Alternatively, the user may operate (e.g., key) on other speakers to trigger the other speakers to reenter the group network state. After the other sound boxes are restored to the factory setting or re-enter the networking state, the other sound boxes can be re-networked with the newly purchased left sound box according to the flow in fig. 3.
If the slave loudspeaker box fails, the slave loudspeaker box is a bass loudspeaker box, a user can purchase a new bass loudspeaker box, and the Bluetooth function and the WLAN function of the bass loudspeaker box are opened, so that the bass loudspeaker box can send first Bluetooth broadcasting and ultrasonic waves. The main sound box monitors the first Bluetooth broadcast from the subwoofer sound box, and can output second prompt information to prompt a user whether to add the scanned subwoofer sound box into the networking, namely prompt the user to confirm whether to connect the subwoofer sound box with the main sound box. If the main speaker detects that the user agrees to connect the subwoofer speaker with the main speaker, S307-S314 may be executed to add a new subwoofer speaker to the networking. In one embodiment, the new subwoofer enclosure may be referred to as a third device, and the frequency of the ultrasonic waves emitted by the third device is a third frequency.
In the embodiment of the application, any one of the networked devices fails, a user can timely replace new devices, and the multi-device networking is triggered, so that the operation is simple and convenient, and the use of the user is not affected.
In an embodiment, the embodiment of the application further provides an electronic device, where the electronic device may be the first device, the second device, or the third device described in the foregoing embodiment. Referring to fig. 6, the electronic device may include: a processor 601 (e.g., CPU), a memory 602. The memory 602 may include a random-access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one magnetic disk memory, in which various instructions may be stored in the memory 602 for performing various processing functions and implementing method steps of the present application.
Optionally, the electronic device related to the present application may further include: a power supply 603, a communication bus 604 and a communication port 605. The communication port 605 is used to enable connection communication between the electronic device and other peripheral devices. In an embodiment of the present application, the memory 602 is used to store computer executable program code, which includes instructions; when the processor 601 executes the instructions, the instructions cause the processor 601 of the electronic device to perform the actions in the above method embodiments, which achieve similar principles and technical effects, and are not described herein.
It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (application specific integrated circuit, ASIC), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general purpose processor, such as a central processing unit (central processing unit, CPU) or other processor that may invoke the program code, such as a controller. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
The term "plurality" herein refers to two or more. The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship; in the formula, the character "/" indicates that the front and rear associated objects are a "division" relationship. In addition, it should be understood that in the description of this application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not for indicating or implying any relative importance or order.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiments of the present application, the sequence number of each process described above does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Claims (14)

1. A networking method, applied to a first device, comprising:
transmitting a first broadcast and transmitting ultrasonic waves of a first frequency;
receiving a response signal from a second device, the response signal characterizing the reception of the first broadcast and the ultrasound wave by the second device;
negotiating with the second device, and when the first device is determined to be the master device, sending a second broadcast, where the second broadcast includes: the identification of the first device and the identification of the Wi-Fi direct channel;
after establishing connection with the second equipment, negotiating with the second equipment to obtain a first session key;
transmitting connection information encrypted by the first session key to the second device, the connection information including: the service set identifies the SSID and password.
2. The method of claim 1, wherein prior to transmitting the second broadcast, further comprising:
negotiating with the second device to determine candidate master devices;
when the first equipment is contained in the candidate main equipment, outputting first prompt information, wherein the first prompt information is used for indicating a user to determine the main equipment in the candidate main equipment;
and responding to the operation that the user determines that the first equipment is the main equipment, and determining that the first equipment is the main equipment.
3. The method according to claim 1 or 2, wherein the first broadcast comprises: an identification for indicating the first frequency; or,
the response signal includes: an identification for indicating the first frequency.
4. A method according to any of claims 1-3, wherein the first broadcast and the second broadcast are both bluetooth broadcasts.
5. The method of any one of claims 1-4, wherein the response signal comprises: a first sub-signal and a second sub-signal, the receiving a response signal from a second device, comprising:
receiving the first sub-signal from the second device, the first sub-signal characterizing the second device received the first broadcast;
the second sub-signal is received from the second device, the second sub-signal being indicative of the second device receiving the ultrasound wave.
6. The method of any of claims 1-5, wherein prior to negotiating with the second device to obtain the first session key, further comprising:
authenticating and authenticating the second device, wherein the authentication is used for determining whether the second device is a device responding to the first broadcast and the ultrasonic wave, and the authentication is used for determining whether a preset personal identification PIN code in the second device is the same as a preset PIN code in the first device;
Said negotiating with said second device to obtain a first session key comprising:
and negotiating with the second device to obtain the first session key when the second device is a device responding to the first broadcast and the ultrasonic wave and the preset PIN code in the second device is the same as the preset PIN code in the first device.
7. The method according to any one of claims 1-6, further comprising:
outputting second prompt information if receiving the first broadcast and the ultrasonic wave with the third frequency from the third equipment, wherein the second prompt information is used for indicating a user to confirm whether the third equipment is connected with the first equipment;
transmitting the second broadcast in response to the user determining to connect the third device with the first device;
after establishing connection with the third device, negotiating with the third device to obtain a second session key;
and sending the connection information encrypted by the second session key to the third device.
8. A networking method, characterized by being applied to a second device, comprising:
receiving a first broadcast and ultrasonic waves of a first frequency from a first device;
Transmitting a response signal to the first device;
negotiating with the first device, and when the first device is determined to be a master device, receiving a second broadcast from the first device, wherein the second broadcast includes: the identification of the first device and the identification of the Wi-Fi direct channel;
establishing connection with the first device on the Wi-Fi direct channel according to the identification of the first device and the identification of the Wi-Fi direct channel;
negotiating with the first device to obtain a first session key;
receiving encrypted connection information from the first device, the connection information comprising: service set identification SSID and password;
decrypting the encrypted connection information by adopting the first session key to obtain the connection information;
and establishing encryption connection with the first equipment according to the connection information.
9. The method of claim 8, wherein the first broadcast comprises: an identification for indicating the first frequency; or,
the response signal includes: an identification for indicating the first frequency.
10. The method of claim 8 or 9, wherein the first broadcast and the second broadcast are both bluetooth broadcasts.
11. The method according to any one of claims 8-10, wherein the response signal comprises: a first sub-signal and a second sub-signal, said transmitting a response signal to said first device, comprising:
transmitting the first sub-signal to the first device in response to receiving the first broadcast;
the second sub-signal is transmitted to the first device in response to receiving the ultrasonic wave at the first frequency.
12. The method of claim 8, wherein the method further comprises:
transmitting a first broadcast and transmitting ultrasonic waves at a second frequency, the first frequency being different from the second frequency.
13. An electronic device, comprising: a processor and a memory;
the memory stores computer instructions;
the processor executing computer instructions stored in the memory, causing the processor to perform the method of any one of claims 1-12.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program or instructions, which when executed, implement the method of any of claims 1-12.
CN202210826205.XA 2022-07-14 2022-07-14 Networking method and electronic equipment Pending CN117440349A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210826205.XA CN117440349A (en) 2022-07-14 2022-07-14 Networking method and electronic equipment
PCT/CN2023/106088 WO2024012343A1 (en) 2022-07-14 2023-07-06 Networking method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210826205.XA CN117440349A (en) 2022-07-14 2022-07-14 Networking method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117440349A true CN117440349A (en) 2024-01-23

Family

ID=89535541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210826205.XA Pending CN117440349A (en) 2022-07-14 2022-07-14 Networking method and electronic equipment

Country Status (2)

Country Link
CN (1) CN117440349A (en)
WO (1) WO2024012343A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118354325B (en) * 2024-06-18 2024-09-24 深圳旷世科技有限公司 Multi-room hybrid networking method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102383383B1 (en) * 2017-08-08 2022-04-06 삼성전자 주식회사 Electronic device and method for forming wi-fi direct group thereof
CN111800768A (en) * 2020-06-17 2020-10-20 上海传英信息技术有限公司 Method, apparatus and computer-readable storage medium for connection
CN112039604A (en) * 2020-09-07 2020-12-04 北京小米移动软件有限公司 Equipment rapid networking technology based on intelligent home scene
CN114390491A (en) * 2020-10-20 2022-04-22 华为技术有限公司 Networking method, device and system
CN114679708A (en) * 2020-12-25 2022-06-28 华为技术有限公司 Communication method, system and electronic equipment
CN114157659B (en) * 2022-02-10 2022-06-21 荣耀终端有限公司 File sharing method and terminal equipment

Also Published As

Publication number Publication date
WO2024012343A1 (en) 2024-01-18

Similar Documents

Publication Publication Date Title
US11259178B2 (en) Bluetooth mesh network provisioning authentication
US10284953B2 (en) Maintaining grouping information for audio speakers devices
JP6054419B2 (en) Apparatus, system and method for IP address discovery for tunnel direct link setup
US7983615B2 (en) Configuring and connecting to a media wireless network
US11824892B2 (en) Terminal matching method and apparatus
EP3794853A1 (en) Secure systems and methods for establishing wireless audio sharing connection
CN108323246B (en) Networking method, chip and wireless network system
JP6210607B2 (en) Remote system configuration using audio ports
KR20140084258A (en) One-click connect/disconnect feature for wireless devices forming a mesh network
US8654679B2 (en) Communication apparatus, control method thereof, and computer program
KR20110054737A (en) Secure channel establishment method and apparatus in short range communication
JP2016538770A (en) System and method for integrated mesh authentication and association
WO2022143071A1 (en) Connection establishment method and electronic device
CN114885295B (en) Equipment network distribution method, device, equipment and storage medium
TW202112101A (en) Key generation and terminal provisioning method and apparatus, and devices
WO2024012343A1 (en) Networking method and electronic device
JP4494121B2 (en) Wireless LAN connection system, wireless LAN connection method, and access point
KR20220161044A (en) Method and apparatus for configuring mac (media access control) address for uwb (ultra wide band) communication
WO2018205328A1 (en) System and method for accessing wireless network by device
WO2022042170A1 (en) Iot device and authorization method therefor
CN113115153A (en) Processing method, Bluetooth headset and management platform
WO2023246056A1 (en) Device connection method and apparatus, and storage medium and chip
TWI756902B (en) Distribution network system and method thereof
WO2022042740A1 (en) Data transmission method and electronic device
TW201826819A (en) Discovery of and communication with trusted devices

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