WO2024012343A1 - 组网方法和电子设备 - Google Patents

组网方法和电子设备 Download PDF

Info

Publication number
WO2024012343A1
WO2024012343A1 PCT/CN2023/106088 CN2023106088W WO2024012343A1 WO 2024012343 A1 WO2024012343 A1 WO 2024012343A1 CN 2023106088 W CN2023106088 W CN 2023106088W WO 2024012343 A1 WO2024012343 A1 WO 2024012343A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
frequency
speaker
signal
ultrasonic wave
Prior art date
Application number
PCT/CN2023/106088
Other languages
English (en)
French (fr)
Inventor
程力
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024012343A1 publication Critical patent/WO2024012343A1/zh

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

Definitions

  • the embodiments of the present application relate to the field of wireless communication technology, and in particular, to a networking method and electronic device.
  • the speaker system consists of multiple speakers.
  • the connection and networking of multiple speakers is a key step in building a speaker system. How to connect multiple speakers quickly and safely is crucial.
  • Embodiments of the present application provide a networking method and electronic equipment, with simple networking operation and high efficiency.
  • the first aspect provides a networking method, which is applied to the first device.
  • the first device sends a first broadcast and transmits ultrasonic waves of a first frequency.
  • the second device may also send the first broadcast, and the ultrasonic waves of the second frequency.
  • the networking scenario also includes a third device, the third device can also send the first broadcast and the ultrasonic wave of the third frequency.
  • Different devices emit ultrasonic waves at different frequencies, so that other devices can identify the first device, the second device, and the third device.
  • the first broadcast sent by the first device includes the identifier of the first device and the first device
  • the first broadcast sent by the second device includes the identifier of the second device
  • the first broadcast sent by the third device includes the identifier of the third device. Identification, the first broadcast is used to discover other devices.
  • the following description takes a networking scenario including a first device and a second device as an example. For steps performed by the third device, refer to the relevant description of the second device.
  • the device can also listen to the first broadcast from other devices and detect the ultrasonic waves from other devices.
  • the second device receives the first broadcast and the ultrasonic wave of the first frequency, and the second device sends a response signal to the first device.
  • the first device can receive the response signal from the second device.
  • the response signal represents that the second device has received the first broadcast and the ultrasonic wave of the first frequency.
  • the first device negotiates with the second device.
  • the first device sends a second broadcast, and the second broadcast includes: the The identity of the first device and the identity of the Wi-Fi direct channel.
  • the second device may establish a connection with the first device on the Wi-Fi Direct channel according to the identification of the first device.
  • the first device After the first device establishes a connection with the second device, the first device negotiates with the second device to obtain a first session key, and the first device uses the first session key to encrypt connection information, where the connection information includes : Service set identification SSID and password.
  • the first device sends the connection information encrypted with the first session key to the second device, and the second device, in response to the connection information encrypted with the first session key, may decrypt the encrypted connection using the first session key. information and obtain the SSID and password.
  • the second device can establish an encrypted connection with the first device based on the SSID and password. Wherein, the second device establishes an encrypted connection with the first device, which can ensure the security of data transmission between the first device and the second device.
  • the networking process does not require multiple operations by the user, the networking efficiency is high, and the devices can be connected to each other without relying on the same router, and the application range is wide.
  • different devices can emit ultrasonic waves of different frequencies. The purpose is to determine the devices in the same room so as to form a network with the devices in the same room. If the second device receives the first broadcast from the first device, the second device may be in the same room or in a different room as the first device. However, if the second device receives the ultrasonic wave of the first frequency, it means that the second device and the first device are in the same room. In this way, the first device can network with the second device in the same room to avoid misconnection and improve the accuracy of networking.
  • the first device negotiates with the second device to determine the master device. For example, the device with the strongest processing capability may be used as the master device.
  • the first device and the second device negotiate to determine candidate master devices, and there may be at least one candidate master device. Among them, when there is one candidate master device, you can Make this candidate master device the master device.
  • the candidate master device may output first prompt information, and the first prompt information is used to instruct the user to determine the master device among the candidate master devices.
  • the first device may output the first prompt information.
  • the first device determines the first device as a master device.
  • multiple devices can negotiate to obtain the master device, or the user can confirm the master device.
  • the user confirms that the main device is a multi-device networking step that requires user participation and is simple to operate.
  • the following describes the manner in which the first device sends the first broadcast, transmits the ultrasonic wave of the first frequency, and the second device sends the response signal:
  • the first broadcast sent by the first device may include: an identifier of the first device, a device type of the first device, and an identifier indicating the first frequency.
  • the identifier used to indicate the first frequency may be, for example, the first frequency or the number of the first frequency.
  • the identifier used to indicate the first frequency represents that the first broadcast emits ultrasonic waves of the first frequency, so that the second device can identify the ultrasonic waves sent by the first device among the received ultrasonic waves.
  • the second device when the second device receives the first broadcast and the ultrasonic wave of the first frequency, the second device may send a response signal to the first device, where the response signal represents the reception of the first broadcast by the second device. to the first broadcast and the first frequency ultrasound.
  • the first device can determine whether the first device and the second device are in the same room based on whether the second device sends a response signal.
  • the first device determines whether the first device is in the same room as the second device. The devices are in the same room. If the first device does not receive a response signal from the second device, the first device determines that it is not in the same room as the second device.
  • the first device can establish a connection with the second device in the same room, thereby avoiding misconnection.
  • the first broadcast sent by the first device may include: the identification of the first device and the device type of the first device.
  • the second device may carry an identifier indicating the first frequency in the response signal. It should be understood that if the second device does not receive the ultrasonic wave, the response signal does not include an identifier indicating the first frequency.
  • the first device can determine whether the second device receives the ultrasonic wave of the first frequency based on the response signal from the second device, that is, whether the second device and the first device are in the same room. In this embodiment of the present application, the first device can establish a connection with the second device in the same room, thereby avoiding misconnection.
  • the second device can respond to the first broadcast and the ultrasonic wave of the first frequency respectively.
  • the response signal includes: a first sub-signal and a second sub-signal.
  • the first device can send the first broadcast and the ultrasonic wave of the first frequency.
  • the second device receives the first broadcast, it can send the first sub-signal to the first device.
  • the first device can receive the first sub-signal from the first broadcast. The first sub-signal of the second device indicates that the second device has received the first broadcast.
  • the second device When the second device receives the ultrasonic wave of the first frequency, the second device can send the second sub-signal to the first device, and accordingly, the first device can receive the second sub-signal from the second device, so The second sub-signal represents that the second device receives the ultrasonic wave of the first frequency.
  • the first device may send the first broadcast first, and when the second device receives the first broadcast, it may send the first sub-signal to the first device.
  • the first device may transmit an ultrasonic wave of the first frequency in response to the first sub-signal, and when the second device receives the ultrasonic wave of the first frequency, the second device may send the second sub-signal to the first device.
  • the first device may determine that the second device and the first device are in the same room 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 can determine that it is in the same room as the second device. When the first device does not receive the first sub-signal from the second device, signal or a second sub-signal, the first device can determine that it is not in the same room as the second device. In this embodiment of the present application, the first device can establish a connection with the second device in the same room, thereby avoiding misconnection.
  • the first device can broadcast the identifier of the Wi-Fi direct channel, so that all devices that receive the second broadcast can establish a connection with the first device.
  • the first device can authenticate and authenticate the second device, and the second device passes the authentication and authentication. Afterwards, the first device can establish an encrypted connection with the second device.
  • the authentication is used to determine whether the second device is a device that responds to the first broadcast and the ultrasonic wave, and the authentication is used to determine a preset personal identification PIN code in the second device. Whether it is the same as the default PIN code in the first device.
  • the second device is a device that responds to the first broadcast and the ultrasonic wave
  • the preset PIN code in the second device is the same as the preset PIN code in the first device
  • the The second device negotiates to obtain the first session key.
  • the first device can improve the security of the wireless connection between the first device and the second device by authenticating and authenticating the second device.
  • the first device can recognize the second device and the third device in parallel.
  • Certification and authentication can improve the processing speed of the first device authentication and authentication.
  • the first device authenticates and authenticates the third device refer to the relevant description of the first device authenticating and authenticating the second device.
  • the authenticated and authenticated second device can establish an encrypted connection with the first device, thereby ensuring the security of data transmission between the first device and the second device.
  • a new device can be replaced for networking.
  • a new master device when the master device fails, a new master device can be replaced, and the network can be re-established according to the networking method as described above.
  • a slave device fails, a new slave device can be replaced, and the new slave device can be called a third device, for example.
  • the third device may send the first broadcast and the ultrasonic wave of the third frequency.
  • the first device receives the first broadcast and the ultrasonic wave of the third frequency from the third device, it may output second prompt information.
  • the second prompt information is expressed in Instructing the user to confirm whether to connect the third device to the first device.
  • the first device may send the second broadcast, where the second broadcast includes the identification of the first device and the Wi -The identification of the Fi direct channel.
  • the third device receives the second broadcast and can establish a connection with the first device on the Wi-Fi direct channel.
  • the first device negotiates with the third device to obtain a second session key, and the first device sends the second session key encrypted to the third device.
  • Connection information the third device can use the first session key to decrypt the connection information, and then establish an encrypted connection with the first device based on the connection information.
  • any device in the network fails, it can be replaced with a new device without bundling and selling, and the maintenance cost is low.
  • the second aspect provides a networking method, which is applied to the second device.
  • the second device receives the first broadcast and the ultrasonic wave of the first frequency from the first device, and sends a response signal to the first device; the second device negotiates with the first device, and when it is determined that the first device When the device is the master device, it receives a second broadcast from the first device.
  • the second broadcast includes: the identifier of the first device and the identifier of the Wi-Fi direct channel.
  • the second device establishes a connection with the first device on the Wi-Fi Direct channel according to the identifier of the first device and the identifier of the Wi-Fi Direct channel.
  • the second device negotiates with the first device to obtain the first session key, and receives encrypted connection information from the first device.
  • the connection information includes: service set identifier SSID and password; the second device uses the The first session key decrypts the encrypted connection information to obtain the connection information, and establishes an encrypted connection with the first device based on the connection information.
  • the first broadcast includes: an identifier indicating the first frequency; or the response signal includes: an identifier indicating the first frequency.
  • both the first broadcast and the second broadcast are Bluetooth broadcasts.
  • the response signal includes: a first sub-signal and a second sub-signal
  • sending the response signal to the first device includes: in response to receiving the first broadcast, The first device sends the first sub-signal; in response to receiving the ultrasonic wave of the first frequency, the second sub-signal is sent to the first device.
  • the method further includes: transmitting a first broadcast, and transmitting ultrasonic waves of a second frequency, where the first frequency is different from the second frequency.
  • the second device when the second device is a candidate master device, the second device may output first prompt information to instruct the user to determine the master device among the candidate master devices.
  • the second device when the second device is the master device, the second device can perform the actions of the master device.
  • the actions of the master device refer to the relevant description in the first aspect.
  • embodiments of the present application provide a networking system, which includes: a first device and a second device.
  • the first device is used to perform the networking method in the first aspect
  • the second device is used to perform the networking method in the second aspect.
  • embodiments of the present application provide an electronic device, which may include: a processor and a memory.
  • the memory is used to store computer-executable program code, and the program code includes instructions; when the processor executes the instructions, the instructions cause the electronic device to perform the methods in the first to second aspects.
  • embodiments of the present application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute the methods in the above first to second aspects.
  • embodiments of the present application provide a computer-readable storage medium that stores instructions that, when run on a computer, cause the computer to execute the above-mentioned first to second aspects. method.
  • Figure 1 is a schematic diagram of a system architecture applicable to this application
  • Figure 2 is a schematic structural diagram of a speaker in an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of an embodiment of the networking method provided by the embodiment of the present application.
  • Figure 4 is a schematic diagram of a speaker network provided by an embodiment of the present application.
  • Figure 5 is another schematic diagram of a speaker network provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Figure 1 is a schematic diagram of a system architecture applicable to this application.
  • Figure 1 takes an example of building a speaker system with multiple speakers.
  • the system architecture includes multiple speakers, including a left speaker 11, a right speaker 12, a left surround speaker 13, a right surround speaker 14, and a subwoofer speaker 15.
  • the left speaker 11, the right speaker 12, the left surround speaker 13, the right surround speaker 14, and the subwoofer speaker 15 can be connected through wireless connections to form a speaker system.
  • the type and number of speakers in Figure 1 are examples and do not constitute a limitation on the system architecture applicable to the embodiments of the present application.
  • each speaker can output audio of different channels according to its own performance, so that the audio output by the speaker system can achieve a stereo effect.
  • the left speaker 11 can output left channel audio
  • the right speaker 12 can output right channel audio
  • the left surround speaker 13 can output left surround audio
  • the right surround speaker 14 can output right surround audio
  • the speaker 15 can output bass channel audio, so that the user can hear audio with a stereo effect.
  • the key step for multiple speakers to form a speaker system is: multiple speakers are connected to form a network through wireless connections.
  • the user can configure the network for multiple speakers in sequence on the terminal, allowing each speaker to access the same local area network. That is, multiple speakers form a network through wireless connection, and multiple speakers form a speaker system.
  • the user can first configure the network for the first speaker in the terminal application (application, APP), then add the second speaker, and configure the network for the second speaker until the network distribution of multiple speakers is completed.
  • connecting each speaker to the same LAN can be understood as: connecting each speaker to the same access point (AP), for example, the AP can be a router.
  • this method requires the user to configure the network for multiple speakers in sequence, which is cumbersome, takes a long time to configure the network, and has low efficiency. Moreover, the multiple speakers need to rely on the same AP to access the same LAN.
  • the role of each speaker can be preset, and the key can be preset in each speaker.
  • the role of each speaker is preset, such as the left speaker 11 is set as the master speaker, and the other speakers are set as slave speakers.
  • the slave speaker can use wireless speaker and audio (wireless speaker and audio, WISA) and other connection methods according to the key to connect to the main speaker to achieve wireless connection of multiple speakers. .
  • the embodiment of this application provides a networking method that does not rely on AP (such as a router) and does not need to pre-set the role and key of each speaker. Instead, the speakers negotiate to establish a wireless connection.
  • the networking efficiency is high, and any The speaker can be replaced if it fails, with a wide range of applications and low maintenance costs.
  • the multi-device networking in the embodiment of this application means that multiple devices are wirelessly connected to form a network.
  • FIG 2 is a schematic structural diagram of a speaker in an embodiment of the present application. It should be understood that the structure of each speaker shown in Figure 1 can be the same, and reference can be made to the description of Figure 2 .
  • the speaker 20 may include: a button 21, an indicator light 22, a microphone 23, a speaker 24, a Bluetooth chip 25, a wireless fidelity (Wi-Fi) chip 26, a processor 27, and an antenna 28.
  • Wi-Fi wireless fidelity
  • the speaker 20 can establish a Bluetooth channel with other devices through the Bluetooth chip 25 and the antenna 28 to achieve Bluetooth communication.
  • the speaker 20 can establish a Wi-Fi channel with other devices through the Wi-Fi chip 26 and the antenna 28 to achieve Wi-Fi communication.
  • the Bluetooth chip 25 and the Wi-Fi chip 26 may share the antenna 28, or the Bluetooth chip 25 and the Wi-Fi chip 26 may correspond to separate antennas 28 respectively. It should be understood that in FIG. 2 , the Bluetooth chip 25 and the Wi-Fi chip 26 share the antenna 28 as an example for illustration.
  • the processor 27 can be used to execute S301-S314 in the following embodiment to complete the multi-speaker networking.
  • the processor 27 may include: an ultrasonic detection module, a user interaction module, a device discovery module, and a network management module. module, authentication and authentication module, and connection management module.
  • the names of each module in the processor 27 are examples, and some modules (or all modules) may be integrated into one body.
  • the user interaction module is used to manage buttons 21, indicator lights 22, microphones 23, and speakers 24.
  • the user interaction module can detect the user's operation on the button 21 and collect the sound through the microphone 23 .
  • the user interaction module can control the indicator light 23 to flash, display different colors, etc., and the user interaction module can also control the speaker 24 to play audio.
  • the device discovery module is used to discover other speakers. Discovering other speakers is the basis for networking with other speakers.
  • the device discovery module can use Bluetooth broadcast or Wi-Fi broadcast to discover other speakers to form a network with other speakers.
  • the device discovery module can send a Wi-Fi probe frame (Wi-Fi probe) to discover other speakers.
  • the device discovery module may perform S301-S308 in the following embodiment.
  • an ultra wide band (UWB) tag can also be set on the speaker 20, and the device discovery module can use UWB technology to discover other speakers.
  • UWB ultra wide band
  • the device discovery module can also use WLAN awareness overview (Wi-Fi aware) technology to discover other speakers.
  • WLAN awareness overview Wi-Fi aware
  • the following embodiments The following uses Bluetooth broadcasting to discover devices as an example.
  • Ultrasonic detection module is used to emit ultrasonic waves and detect ultrasonic waves emitted by other speakers.
  • the device discovery module is also used to detect whether other speakers are in the same room (same room) as the speaker based on the emitted ultrasonic waves, and then form a network with the speakers in the same room.
  • Authentication and authentication module used to authenticate and authenticate other speakers.
  • the authentication and authentication module may execute S309-S310 in the following embodiment.
  • the speakers after the speakers discover other speakers, they can be interconnected through a communication network to achieve wireless signal interaction.
  • the communication network may be, but is not limited to, a Wi-Fi hotspot network, a Wi-Fi peer-to-peer (P2P) network, a WISA network, etc.
  • Wi-Fi point-to-point connection can also be called Wi-Fi direct.
  • connection management module is used to manage the Wi-Fi P2P layer, such as starting and stopping the group owner (group owner, GO).
  • the connection management module is also used to establish physical channels for authentication and authentication by the authentication and authentication module, establish subsequent business channels, and manage business connections.
  • the connection management module may perform S311-S314 in the following embodiment.
  • the network management module can be understood as the central management module, which is used to manage the ultrasonic detection module, user interaction module, device discovery module, authentication module, and connection management module. For example, after the speakers discover other speakers, the network management module can call the ultrasonic detection module to complete the same room detection and filter out the speakers in the same room. When the selected speakers meet the networking requirements, the user interaction module can be triggered to remind the user to confirm the main speaker. After the user confirms the main speaker, the network management module calls the authentication and authentication module to complete the authentication and authentication of the speaker based on the main device confirmed by the user. After the authentication and authentication are passed, the network management module calls the connection management module to complete the wireless network connection of each speaker, that is, the speaker networking is completed.
  • the speaker 20 may also include a display screen.
  • the display screen is used to display the human-computer interaction interface of the speaker.
  • the display screen is not shown in Figure 2.
  • the structure shown in Figure 2 does not constitute a specific limitation on the speaker.
  • the speaker box may include more or less components than shown in the figure, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the networking method provided by the embodiment of the present application is not only applicable to the scenario of networking multiple speakers, but also can be applied to the scenario of networking of other devices.
  • the networking method provided by the embodiments of this application can be applied to the networking of smart home appliances in a home environment, and can also be applied to the networking of industrial wireless terminals in a factory environment.
  • the networking method is applicable to the scenarios in which the embodiments of this application are applicable. No restrictions.
  • a network of multiple electronic devices is used as an example for description.
  • the multiple electronic devices may include: a first device, a second device, a third device, etc.
  • the first device, the second device The networking method provided by the embodiments of this application is described below.
  • the electronic device in the embodiment of the present application may be called user equipment (UE), terminal, etc.
  • the electronic device may be a mobile phone, a tablet computer (portable android device, PAD), a personal digital device (personal digital device) assistant (PDA), handheld device, computing device, vehicle-mounted device or wearable device with wireless communication function, virtual reality (VR) terminal device, augmented reality (AR) terminal device, industrial control (industrial control) ) in wireless Terminals, terminals in smart homes, etc.
  • the form of the electronic device is not specifically limited.
  • FIG. 3 is a schematic flowchart of an embodiment of the networking method provided by the embodiment of the present application.
  • the networking method provided by the embodiment of the present application may include:
  • the first device sends the first Bluetooth broadcast.
  • each device When multiple devices are networked, users can turn on each device and turn on the Bluetooth function and wireless local area network (WLAN) function of each device.
  • WLAN wireless local area network
  • Each device can perform steps S301-S305.
  • the first device is taken as an example to illustrate the steps performed by each device.
  • the first device After the first device turns on the Bluetooth function, it can perform Bluetooth scanning (such as Bluetooth low energy (BLE) scanning) and monitor the first Bluetooth broadcast from other devices.
  • the first device may send the first Bluetooth advertisement on the inquiry scan channel.
  • the first device when the first device sends a Wi-Fi broadcast to discover the device, the first device may send the first Wi-Fi broadcast.
  • the first broadcast includes: a first Bluetooth broadcast or a first Wi-Fi broadcast. In the embodiment of this application, the first broadcast is the first Bluetooth broadcast as an example for description.
  • the first Bluetooth broadcast is used to discover other devices around the first device. For example, other devices around the first device may respond to the first Bluetooth broadcast when receiving the first Bluetooth broadcast. When the first device receives response signals from other devices, it can determine that other devices exist around the first device, that is, it discovers other devices.
  • the first device may also monitor the first Bluetooth broadcast from other devices on the inquiry scan channel to respond to the first Bluetooth broadcast from other devices.
  • the first Bluetooth broadcast may include: an identification of the first device and a device type of the first device.
  • the identification of the first device may be the name, model, etc. of the first device.
  • the device type of the first device may indicate what type of speaker the first device is, such as a subwoofer speaker, a left surround speaker, a left speaker, etc.
  • the first Bluetooth broadcast may be a BLE broadcast or a traditional Bluetooth BR broadcast.
  • the first device emits ultrasonic waves.
  • S302 and S301 can be executed at the same time, and there is no distinction between the two.
  • the purpose of the first device emitting ultrasonic waves is to screen out devices that are in the same room as the first device. Because ultrasonic waves will be reflected when they encounter obstacles when transmitting in the air, the ultrasonic waves cannot pass through walls. Devices in the same room as the first device can receive the ultrasonic waves emitted by the first device, but devices not in the same room as the first device can receive the ultrasonic waves emitted by the first device. The ultrasonic wave emitted by the first device cannot be received.
  • the frequency of the ultrasonic waves emitted by each device may be different, so that the device that receives the ultrasonic waves can distinguish the device that transmits the ultrasonic waves.
  • the first device may emit ultrasonic waves of a first frequency.
  • the second device sends a response signal to the first device.
  • the second device After the second device turns on the Bluetooth function, it can perform Bluetooth scanning and monitor the first Bluetooth broadcast from other devices.
  • the first Bluetooth broadcast may further include: an identifier of the frequency of the ultrasonic wave transmitted by the first device, for example, the identifier may be the first frequency.
  • the second device can receive the ultrasonic wave emitted by the first device and can obtain the frequency of the ultrasonic wave.
  • the second device listens to 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 represents that the second device receives the first broadcast from the first device and the ultrasonic wave of the first frequency.
  • the response signal may include: the identifier of the second device and the device type of the second device.
  • the identifier of the second device may be the name, model, etc. of the second device.
  • the device type of the second device may be: speaker, mobile phone, watch, etc.
  • the device type of the second device is also used to indicate a specific speaker category.
  • the speaker type may be a left speaker, a right speaker, etc. That is to say, 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 the device.
  • the first Bluetooth broadcast may not include: an identifier of the frequency of the ultrasonic wave transmitted by the first device.
  • the second device listens to the first Bluetooth broadcast and receives the ultrasonic wave of the first frequency, it may send a message to the second device.
  • the first device sends a response signal.
  • the response signal may include: an identifier of the second device, a device type of the second device, and an identifier indicating that the second device has received ultrasonic waves of the first frequency.
  • the identifier used to indicate that the second device receives the ultrasonic wave of the first frequency may be: an identifier of the first frequency, such as the first frequency.
  • the second device when the second device receives the first Bluetooth broadcast and the ultrasonic wave of the first frequency, it may send a signal (for example, a first sub-signal and a second sub-signal) to the first device respectively to represent The second device receives the first Bluetooth broadcast and the ultrasonic wave of the first frequency respectively.
  • the response signal may include a first sub-signal and a second sub-signal.
  • the first Bluetooth broadcast may include an identifier of the first frequency, or may not include an identifier of the first frequency.
  • the second device when the second device monitors the first Bluetooth broadcast, it may send a first sub-signal to the first device, where the first sub-signal indicates that the second device has received the first Bluetooth broadcast.
  • the first sub-signal includes: the identifier of the second device and the device type of the second device.
  • the first device may transmit ultrasound waves of the first frequency in response to receiving the first sub-signal from the second device. If the second device receives the ultrasonic wave of the first frequency, it can send a second sub-signal to the first device.
  • the second sub-signal is used to represent that the second device has received the ultrasonic wave of the first frequency.
  • the second sub-signal when the first Bluetooth broadcast includes the identifier of the first frequency, the second sub-signal may include the identifier of the second device and the device type of the second device.
  • the second sub-signal may include: the identifier of the second device, the device type of the second device, and an ultrasonic wave used to indicate that the second device has received the first frequency. logo.
  • the response signal may include: the identification of the second device and the device type of the second device.
  • the first device can also use other ranging methods to measure the distance between the second device and the first device.
  • the first device can detect the distance between the first device and the first device based on the distance between the second device and the first device. Whether the two devices are in the same room. Wherein, when the distance between the second device and the first device is less than or equal to a preset distance, the first device may determine that the second device and the first device are in the same room. 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 in the same room as the first device.
  • the ranging methods may include but are not limited to: infrared ranging, Bluetooth ranging, and other methods.
  • the second device and the first device are in the same room as an example for description.
  • FIG. 3 also shows the interaction process between the first device and the third device.
  • the interaction process between the first device and the third device may refer to the interaction process between the first device and the second device.
  • the third device and the first device are in the same room for illustration.
  • the first device determines the devices to be networked based on the response signals from each device.
  • the first device After the first device sends the first Bluetooth broadcast, other devices around the first device that have the Bluetooth function turned on can respond to the first Bluetooth broadcast, so the first device can receive response signals from multiple devices.
  • the plurality of devices may include a second device, a third device, and a fourth device. The following description takes the example that the fourth device and the first device are not in the same room.
  • the first device determines the device to be networked based on the response signals from each device.
  • the first device may use a device that has sent a response signal and is in the same room as the first device as a device to be networked.
  • the device that "both receives the first broadcast signal from the first device and receives the ultrasonic wave of the first frequency" can send a response signal to the first device
  • the first device can determine to send the response
  • the device sending the signal is in the same room as the first device, so the device sending the response signal can be used as the device to be networked.
  • the device that detects the ultrasonic wave of the first frequency can carry an identifier in the response signal to indicate that the second device has received the ultrasonic wave of the first frequency.
  • the first device The device to be networked can also be determined based on the received response signal.
  • the first device can receive response signals from the second device, the third device, and the fourth device, and therefore it can be determined that the second device, the third device, and the fourth device can all listen to the first broadcast signal.
  • the first device may also detect whether the response signal from the second device, the response signal from the third device, and the response signal from the fourth device include "an identification indicating the detection of ultrasonic waves of the first frequency", and determine whether the Whether the second device, the third device, and the fourth device are in the same room as the first device.
  • the response signal from the second device and the response signal from the third device both include the "first frequency”, but the response signal from the fourth device does not include the "first frequency", and the first device can determine the first frequency.
  • the second device and the third device are in the same room as the first device, and the fourth device is not in the same room as the first device. In this way, the first device can use the first device, the second device, and the third device as devices to be networked.
  • the first device uses a device that has sent a response signal and is in the same room as the first device as a device to be networked, which can prevent the first device from wirelessly connecting with devices in other homes or other environments. It can avoid misconnections and improve the accuracy of networking.
  • the following description takes the first device, the second device, and the third device as the devices to be networked as an example.
  • S305 The first device, the second device, and the third device negotiate to determine a candidate master device.
  • the first device, the second device, and the third device negotiate to determine the candidate master device for the purpose of: determining the first device, the second device, and the role of the third device to facilitate wireless connection between the first device, the second device and the third device according to their roles.
  • Roles can include master and slave devices.
  • the master device is included in the devices to be networked, and the devices other than the master device in the devices to be networked can be called slave devices.
  • the master device is used to establish a communication channel with the slave device to support business data transmission.
  • the candidate master device may be a device with strong processing capabilities among the devices to be networked.
  • the first device may determine a first candidate master device according to the device types of the first device, the second device, and the third device. There may be at least one first candidate master device.
  • the first device is a left speaker
  • the second device is a right speaker
  • the third device is a subwoofer speaker. Because the left speaker and the right speaker have strong processing capabilities, the first device A left speaker (first device) and a right speaker (second device) may be determined as first candidate master devices.
  • the first device after the first device determines the first candidate master device, it can synchronize the identity of the first candidate master device with the second device and the third device.
  • the identity of the first candidate master device includes: left speaker logo, and the logo of the right speaker.
  • the first device may also receive the identity of the second candidate master device determined by the second device, and the identity of the third candidate master device determined by the third device. That is to say, the first device may receive the identification of the candidate master device determined by other devices.
  • the first device may determine the candidate master device based on the first candidate master device, the second candidate master device, and the third candidate master device.
  • the first device may use devices included in the first candidate master device, the second candidate master device, and the third candidate master device as candidate master devices.
  • the first device may use the top N devices with the most 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.
  • the first device, the second device, and the third device can also use the same determination rule to determine candidate master devices, so the candidate master devices determined by the first device, the second device, and the third device can be If the first candidate master device, the second candidate master device, and the third candidate master device are the same, the first device may use the first candidate master device as the candidate master device.
  • the following description takes the candidate master device including the first device and the second device as an example.
  • the candidate master device outputs prompt information, and the prompt information is used to prompt the user to select the master device.
  • the prompt information output by the candidate master device may be called first prompt information.
  • S305 describes that the first device can determine the candidate master device. Similarly, the second device and the third device can also determine the candidate master device. Because the same determination rules are used, the first device, the second device and the third device can also determine the candidate master device. The candidate master devices determined by the three devices are the same. Because each device can determine a candidate master device, the device determined as a candidate master device can output prompt information to represent itself as a candidate master device.
  • the candidate master device after the first device, the second device, and the third device determine the candidate master devices, they can also synchronize their determined candidate master devices with each other. When the candidate master devices are consistent, the candidate master device can output Prompt information.
  • Figure 3 takes the candidate master device as an example including a first device and a second device. If both the first device and the second device can determine that the candidate master device is the first device and the second device, then the first device and the second device All prompt messages can be output. Among them, the prompt information is used to prompt the user to select the main device.
  • the first device can output prompt information in a voice mode.
  • the first device can play "Press the button on the speaker to determine the master device of the network.”
  • the first device can 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 to select among the candidate master devices. Select the primary device.
  • the first device when the first device includes a display screen, the first device can also display prompt information on the display screen.
  • the embodiment of the present application does not limit the way in which the candidate master device outputs prompt information.
  • the first device, the second device, and the third device can negotiate to determine the master device without user confirmation.
  • the main device In response to the user confirming the operation of the main device, the main device sends a second Bluetooth broadcast.
  • the second Bluetooth broadcast includes the GO name and the identification of the Wi-Fi P2P channel.
  • the first device can also broadcast the GO name and Wi-Fi P2P by sending a Wi-Fi broadcast.
  • the main device in response to the user confirming the operation of the main device, can send a third 2. Wi-Fi Broadcasting.
  • the second Bluetooth broadcast and the second Wi-Fi broadcast may be called the second broadcast.
  • the second broadcast is the second Bluetooth broadcast as an example for description.
  • the user confirms that the first device is the master device as an example for illustration.
  • the user can press a button on the first device to confirm that the first device is the master device.
  • the first device may send a second Bluetooth broadcast, for example, if the first device detects the user's operation of pressing a button on the first device.
  • the second Bluetooth broadcast is used to establish a Wi-Fi P2P connection with the slave device.
  • the Bluetooth broadcast may include: GO name, and the identification of the Wi-Fi P2P channel.
  • GO is the main device, that is, the first device, and the GO name can be called the identification of the first device.
  • the GO name can be: service set identifier (SSID), or the media access control address (media access control address, MAC) of the main device (first device).
  • SSID service set identifier
  • MAC media access control address
  • the second device and the third device other than GO can be called group clients (GC).
  • the identifier of the Wi-Fi P2P channel can be: channel number, or the frequency band where the channel is located, etc.
  • the second device establishes a connection with the first device on the Wi-Fi P2P channel.
  • the third device can also establish a connection with the first device on the Wi-Fi P2P channel.
  • the second device monitors the Bluetooth broadcast on the query scanning channel, can monitor the second Bluetooth broadcast, and then can obtain the GO name and the identification of the Wi-Fi P2P channel.
  • the second device can establish a connection with the first device on the W-iFi P2P channel according to the GO name.
  • the second device in response to listening to the second Bluetooth broadcast, may feed back a connection response message to the first device in the Wi-Fi P2P channel, indicating that the second device communicates with the first device on the Wi-Fi P2P channel.
  • the device establishes a temporary connection.
  • the Wi-Fi P2P channel may be referred to as the P2P channel for short.
  • the process for the second device to establish a connection with the first device on the Wi-Fi P2P channel may refer to the relevant description in the Wi-Fi P2P protocol.
  • the first device When the first device authenticates and authenticates the second device, it can authenticate and authenticate the third device in parallel, thereby improving the efficiency of authentication and authentication.
  • the first device's authentication of the second device can be understood as: the first device determines whether the second device is a device among the network devices to be grouped, and then determines whether the second device is a device to be grouped. When the device is connected to the network device, the authentication is passed and the authentication operation can be performed.
  • the connection response message may include: used to indicate that the second device is to be grouped The identifier of the device in the network device.
  • the connection response message may include an identifier of the second device, or other identifiers used to indicate that the second device is included in the device to be networked.
  • a flag value of 1 indicates that the second device is included in the network to be connected. equipment.
  • the first device may determine whether the second device is included in the device to be networked according to the connection response message.
  • a preset key is stored in both the first device and the second device.
  • the preset key is such as a personal identification number (PIN) code.
  • PIN personal identification number
  • the authentication of the second device by the first device can be understood as: the first device determines whether the preset PIN code in the second device is the same as the preset PIN code in the first device.
  • the second device may use an encryption algorithm to send the encrypted preset PIN code in the second device to the first device. After the first device decrypts the preset PIN code in the second device, if it is determined that the second device If the default PIN code in the device is the same as the default PIN code in the first device, the second device is authenticated. If the default PIN code in the second device is different from the default PIN code in the first device, then The authentication of the second device failed.
  • the first device may also use a 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.
  • SPEKE simple password authenticated exponential key exchange
  • a session key used to encrypt and decrypt data transferred between two devices It should be noted that the first device and the second device negotiate to obtain the first session key. Similarly, the first device and the third device negotiate to obtain the second session key, the first session key and the second session key. different. In this way, the session keys between each group client GC and the group owner GO are different, which can improve data security.
  • the first device and the second device may use the SPEKE algorithm to negotiate to obtain the first session key.
  • the SPEKE algorithm includes two stages, the key exchange stage and the key authentication stage.
  • the key exchange phase the first device and the second device obtain the session key through negotiation.
  • the key authentication phase the first device and the second device confirm the session key known to each other. After confirming the session key known to the other party, If they are consistent, the session key can be used as the first session key.
  • the first device encrypts the connection information using the first session key to obtain the first connection information.
  • Connection information may include: service set identifier (SSID) and password.
  • SSID service set identifier
  • password password
  • the connection information may be called GO node information.
  • the first device may encrypt the connection information using the first session key to obtain the first connection information to ensure the security of the connection information.
  • the first connection information is encrypted connection information.
  • the encryption and decryption algorithms may include but are not limited to: hash algorithm and information digest algorithm. (message-digest algorithm 5, MD5).
  • the first device sends the first connection information to the second device on the Wi-Fi P2P channel.
  • the second device uses the first session key to decrypt the first connection information to obtain the connection information.
  • the second device decrypts the first connection information and can obtain the SSID and password.
  • the second device uses the SSID and password to access the encrypted GO (first device) on the Wi-Fi P2P channel.
  • the second device can access the encrypted GO (first device) on the Wi-Fi P2P channel using the SSID and password, that is, the second device establishes an encrypted connection with the first device. In this way, the first device and the second device can transmit encrypted data on an unencrypted channel, ensuring the security of data transmission.
  • the first device can use the second session key to encrypt the connection information, obtain the second connection information, and send the second connection information to the third device on the Wi-Fi P2P channel.
  • the third device uses the second session key to decrypt the second connection information to obtain the connection information.
  • the third device can obtain the SSID and password through decryption.
  • the third device can access the encrypted GO (first device) on the Wi-Fi P2P channel using the SSID and password. In this way, the first device and the third device can transmit encrypted data on an unencrypted channel, thereby ensuring the security of data transmission.
  • the second device and the third device respectively establish encrypted connections with the first device, that is, the first device, the second device and the third device complete the networking.
  • the first device can transmit business data to the second device and the third device respectively through the Wi-Fi P2P channel to ensure the smooth execution of the business.
  • the first device (such as the left speaker) can send audio data to other speakers on the Wi-Fi P2P channel, and multiple speakers can play audio so that the user can listen to audio with a stereo effect.
  • FIG 4 is a schematic diagram of a speaker network provided by an embodiment of the present application.
  • each speaker can send the first Bluetooth broadcast and ultrasonic wave. It should be noted that the frequencies of ultrasonic waves sent by different speakers are different, and the frequency of ultrasonic waves is not shown in a in Figure 4.
  • the candidate master device is determined to be the left speaker and the right speaker
  • the indicator lights of the left speaker and the right speaker will flash or display different colors, and a message such as "Press the button on the speaker” will be played.
  • determine the master device of the network" prompt message as shown in b in Figure 4.
  • the left speaker can determine that it is the master device and execute S307-S314 to wirelessly connect with each speaker to complete the network.
  • FIG. 5 is another schematic diagram of a speaker network provided by an embodiment of the present application.
  • the process of speaker networking can be divided into four stages, namely: device discovery stage, temporary connection stage, authentication and authentication stage, and business network establishment stage.
  • the speaker starts BLE scanning, can send BLE broadcasts, emit ultrasonic waves, and start ultrasonic detection.
  • the device discovery phase can determine the speakers to be networked and the main speakers.
  • the main speaker can expose the GO name and Wi-Fi P2P channel identification through the Bluetooth channel.
  • the device discovery phase may include S301-S307.
  • the slave speaker establishes a connection with the master speaker through the Wi-Fi P2P channel, completing the establishment of the Wi-Fi P2P physical link, that is, establishing the Wi-Fi P2P channel.
  • the temporary connection phase may include S308.
  • the master speaker can authenticate each slave speaker in parallel and negotiate the session key.
  • the temporary connection phase may include S309-S310.
  • the master speaker can encrypt the connection information and transmit the encrypted connection information to each slave speaker on the unencrypted Wi-Fi P2P channel.
  • Each speaker can establish an encrypted connection with the master speaker to complete the network.
  • the service network establishment phase may include S311-S314.
  • the networking process shown in Figure 3- Figure 5 is the process when multiple devices are networked for the first time. Taking speakers as an example, it should be understood that after each speaker is networked for the first time, the next time each speaker is powered on, each slave speaker can directly access the encrypted master speaker on the Wi-Fi P2P channel using the SSID and password. Networking is completed.
  • the devices when multiple devices are networked, the devices can determine the devices to be networked through device discovery combined with ultrasonic detection.
  • the devices to be networked can determine candidate master devices, and determine the master device with the help of user participation. equipment.
  • the master device After determining the master device, the master device can establish a temporary connection with the slave device.
  • the session key can be negotiated, and then the encrypted data can be transmitted on the wireless channel, so that the slave device Establish an encrypted connection with the main device to complete the networking.
  • the networking process of multiple devices only requires the user to confirm the main device. The operation is simple and the networking efficiency is high.
  • Each device can be connected to each other without relying on the same router. It has a wide range of applications. In addition, if any equipment fails, it can be replaced in time and the maintenance cost is low.
  • the user can purchase a speaker of the same type and trigger a new speaker and a networked speaker. Restart, or trigger new speakers to join the networked speakers.
  • the main speaker such as the left speaker
  • the user can purchase a new left speaker, and the user can restore the other speakers to factory settings.
  • the user can replace the subwoofer speaker, right speaker, left surround speaker, and right surround speaker. reset.
  • users can operate (such as pressing buttons) on other speakers to trigger other speakers to re-enter the networking state. After the other speakers are restored to factory settings or re-enter the networking state, the other speakers can be re-networked with the newly purchased left speaker according to the process in Figure 3.
  • the slave speaker can purchase a new subwoofer speaker and turn on the Bluetooth function and WLAN function of the subwoofer speaker, so that the subwoofer speaker can send the first Bluetooth broadcast and ultrasonic wave .
  • the main speaker monitors the first Bluetooth broadcast from the subwoofer speaker and can output a second prompt message to prompt the user whether to add the scanned subwoofer speaker to the network, that is, prompt the user to confirm whether to connect the subwoofer speaker to the main speaker. If the main speaker detects that the user agrees to connect the subwoofer speaker to the main speaker, S307-S314 can be executed to allow the new subwoofer speaker to join the network.
  • the new subwoofer speaker can be called a third device, and the frequency of the ultrasonic waves emitted by the third device is the third frequency.
  • any device among the networked devices fails, the user can promptly replace the device with a new one and trigger the re-networking of multiple devices.
  • the operation is simple and does not affect the user's use.
  • the embodiment of the present application further provides an electronic device, which may be the first device, the second device, or the third device described in the above embodiments.
  • the electronic device may include: a processor 601 (such as a CPU) and a memory 602 .
  • the memory 602 may include high-speed random-access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk memory.
  • RAM random-access memory
  • NVM non-volatile memory
  • Various instructions may be stored in the memory 602 , to complete various processing functions and implement the method steps of the present application.
  • the electronic device involved in this application may also include: a power supply 603, a communication bus 604, and a communication port 605.
  • the above-mentioned communication port 605 is used to realize connection and communication between the electronic device and other peripheral devices.
  • the memory 602 is used to store computer executable program code, and the program code 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 embodiment, which implements The principles and technical effects are similar and will not be repeated here.
  • modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as: one or more application specific integrated circuits (ASICs), or , one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), etc.
  • ASICs application specific integrated circuits
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the processing element can be a general processor, such as a central processing unit (CPU) or other processors that can call the program code such as a control device.
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • a computer program product includes one or more computer instructions.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g.
  • Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless means to transmit to another website site, computer, server or data center.
  • Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or other integrated media that contains one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.
  • the term "plurality” as used herein means two or more.
  • the term “and/or” in this article is just an association relationship that describes related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
  • the character "/" in this article generally means that the related objects before and after are an “or” relationship; in the formula, the character “/” means that the related objects before and after are a “division” relationship.
  • words such as “first” and “second” are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating. Or suggestive order.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution sequence of the process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

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

本申请实施例提供了一种组网方法和电子设备,该方法中,第一设备发送第一广播,以及发射第一频率的超声波;接收来自第二设备的响应信号,响应信号表征第二设备接收到第一广播和超声波;与第二设备协商,当确定第一设备为主设备时,发送第二广播,第二广播中包括:第一设备的标识,以及Wi-Fi直连信道的标识;与第二设备建立连接后,与第二设备协商得到第一会话密钥;向第二设备发送第一会话密钥加密的连接信息,连接信息包括:服务集标识SSID和密码。本申请实施例提供的组网方法,操作简单、组网效率高。

Description

组网方法和电子设备
本申请要求于2022年07月14日提交中国专利局、申请号为202210826205.X、申请名称为“组网方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及无线通信技术领域,尤其涉及一种组网方法和电子设备。
背景技术
音箱系统由多个音箱组成,多个音箱连接组网是构建音箱系统的关键一步。如何快速安全地将多个音箱连接起来至关重要。
目前,用户可以依次对每个音箱进行配网,将多个音箱接入同一局域网,实现音箱的连接。但该种方式操作繁琐、配网时间长,效率低。
发明内容
本申请实施例提供一种组网方法和电子设备,组网操作简单、效率高。
第一方面提供一种组网方法,应用于第一设备。该方法中,第一设备发送第一广播,以及发射第一频率的超声波。第二设备也可以发送第一广播,以及第二频率的超声波。在一种实施例中,若组网场景中还包括第三设备,则第三设备也可以发送第一广播,以及第三频率的超声波。不同设备发射的超声波的频率不同,以便于其他设备识别第一设备、第二设备以及第三设备。第一设备发送的第一广播中包括第一设备的标识和第一设备,第二设备发送的第一广播中包括第二设备的标识,第三设备发送的第一广播中包括第三设备的标识,第一广播用于发现其他设备。下述中以组网场景中包括第一设备、第二设备为例进行说明,第三设备执行的步骤可以参照第二设备的相关描述。
设备在发送第一广播以及超声波时,还可以监听来自其他设备的第一广播以及检测来自其他设备的超声波。其中,第二设备接收到第一广播,以及第一频率的超声波,第二设备向第一设备发送响应信号,相应的,第一设备可以接收来自第二设备的响应信号。其中,所述响应信号表征所述第二设备接收到所述第一广播和所述第一频率的超声波。
响应于第二设备的响应信号,第一设备与所述第二设备协商,当确定所述第一设备为主设备时,第一设备发送第二广播,所述第二广播中包括:所述第一设备的标识,以及Wi-Fi直连信道的标识。第二设备响应于第二广播,可以根据第一设备的标识,在Wi-Fi直连信道上与第一设备建立连接。
在第一设备与所述第二设备建立连接后,第一设备与所述第二设备协商得到第一会话密钥,第一设备使用第一会话密钥加密的连接信息,所述连接信息包括:服务集标识SSID和密码。第一设备向所述第二设备发送所述第一会话密钥加密的连接信息,第二设备响应于所述第一会话密钥加密的连接信息,可以使用第一会话密钥解密加密的连接信息,得到SSID和密码,第二设备可以根据SSID和密码,与第一设备建立加密连接。其中,第二设备与第一设备建立加密连接,可以保证第一设备和第二设备之间的数据传输安全。
本申请中,组网过程无需用户多次操作,组网效率高,且各设备之间可以相互连接,无需依赖同一路由器,应用范围广。另,不同设备可以发射不同频率的超声波,目的在于:确定处于同室的设备,以与处于同室的设备组网。如第二设备接收到第一设备的第一广播,第二设备可以与第一设备处于同室或者不同室,但是第二设备若接收到第一频率的超声波,表征第二设备与第一设备处于同室,这样第一设备可以与处于同室的第二设备进行组网,避免误连接,可以提高组网准确性。
在一种可能的实现方式中,在第一设备接收到来自第二设备的响应信号后,第一设备与第二设备协商可以确定主设备,如可以将处理能力最强的设备作为主设备。在一种可能的实现方式中,第一设备和第二设备协商可以确定候选主设备,候选主设备可以为至少一个。其中,当候选主设备为一个时,可以 将该候选主设备作为主设备。
当候选主设备为多个时,候选主设备可以输出第一提示信息,第一提示信息用于指示用户在所述候选主设备中确定主设备。其中,当第一设备包含于所述候选主设备中时,第一设备可以输出第一提示信息。第一设备响应于所述用户确定所述第一设备为主设备的操作,确定所述第一设备为主设备。
本申请中,多设备可以协商得到主设备,或者由用户确认主设备。其中,用户确认主设备为多设备组网过程中需要用户参与的步骤,操作简单。
下述对第一设备发送第一广播、发射第一频率的超声波,以及第二设备发送响应信号的方式进行说明:
其一,第一设备发送的第一广播中可以包括:第一设备的标识、第一设备的设备类型,以及用于指示第一频率的标识。用于指示第一频率的标识如可以为第一频率或第一频率的编号等。用于指示第一频率的标识表征第一广播发射第一频率的超声波,这样便于第二设备可以在接收到的超声波中识别第一设备发送的超声波。
在该实施例中,当所述第二设备接收到所述第一广播和所述第一频率的超声波时,第二设备可以向第一设备发送响应信号,响应信号表征所述第二设备接收到所述第一广播和所述第一频率超声波。如此,第一设备可以根据第二设备是否发送响应信号,确定第一设备与第二设备是否处于同室,其中,若第一设备接收到来自第二设备的响应信号,第一设备确定与第二设备处于同室,若第一设备未接收到来自第二设备的响应信号,第一设备确定与第二设备不处于同室。
本申请实施例中,第一设备可以与处于同室的第二设备建立连接,可以避免误连接。
其二,第一设备发送的第一广播中可以包括:第一设备的标识、第一设备的设备类型。第二设备为了表征第二设备接收到超声波,第二设备可以在响应信号中携带用于指示所述第一频率的标识。应理解,若第二设备未接收到超声波,响应信号中不包括用于指示所述第一频率的标识。如此,第一设备可以根据来自第二设备的响应信号,确定第二设备是否接收到第一频率的超声波,即是否第二设备与第一设备处于同室。本申请实施例中,第一设备可以与处于同室的第二设备建立连接,可以避免误连接。
其三,第二设备可以分别响应第一广播、第一频率的超声波。在该实现方式中,所述响应信号包括:第一子信号和第二子信号。其中,第一设备可以发送第一广播和第一频率的超声波,当第二设备接收到第一广播时,可以向第一设备发送第一子信号,相应的,第一设备可以接收来自所述第二设备的所述第一子信号,所述第一子信号表征所述第二设备接收到所述第一广播。当第二设备接收到第一频率的超声波时,第二设备可以向第一设备发送第二子信号,相应的,第一设备可以接收来自所述第二设备的所述第二子信号,所述第二子信号表征所述第二设备接收到所述第一频率的超声波。
在一种可能的实现方式中,第一设备可以先发送第一广播,当第二设备接收到第一广播时,可以向第一设备发送第一子信号。第一设备可以响应于第一子信号,可以发射第一频率的超声波,当第二设备接收到第一频率的超声波时,第二设备可以向第一设备发送第二子信号。
在该实现方式中,第一设备可以根据是否接收到来自第二设备的第一子信号和第二子信号,确定第二设备与第一设备处于同室。其中,当第一设备接收到来自第二设备的第一子信号和第二子信号,第一设备可以确定和第二设备处于同室,当第一设备未接收到来自第二设备的第一子信号或第二子信号,第一设备可以确定不和第二设备处于同室。本申请实施例中,第一设备可以与处于同室的第二设备建立连接,可以避免误连接。
应理解,在确定主设备为第一设备后,第一设备可以广播Wi-Fi直连信道的标识,这样接收到第二广播的设备均可以与第一设备建立连接,为了保证无线连接的安全性,在一种可能的实现方式中,在第一设备和第二设备建立连接后,第一设备可以对所述第二设备进行认证、鉴权,在第二设备认证通过,以及鉴权通过后,第一设备可以与第二设备建立加密连接。
其中,所述认证用于确定所述第二设备是否为响应于所述第一广播和所述超声波的设备,所述鉴权用于确定所述第二设备中的预设个人身份识别PIN码和所述第一设备中的预设PIN码是否相同。当所述第二设备为响应于所述第一广播和所述超声波的设备,以及所述第二设备中的预设PIN码和所述第一设备中的预设PIN码相同时,与所述第二设备协商得到所述第一会话密钥。
在该实现方式中,第一设备通过对第二设备的认证、鉴权,可以提高第一设备和第二设备无线连接的安全性。示例性的,当组网场景中包括第三设备时,第一设备可以并行对第二设备、第三设备进行认 证、鉴权,可以提高第一设备认证、鉴权的处理速度。第一设备对第三设备认证、鉴权的方式可以参照第一设备对第二设备认证、鉴权的相关描述。
在该实现方式中,通过认证、鉴权的第二设备可以与第一设备建立加密连接,可以保证第一设备和第二设备之间的数据传输安全。
在一种可能的实现方式中,若已组网的任一设备故障,可以替换新的设备进行组网。
示例性的,当主设备故障时,可以替换新的主设备,按照如上所述的组网方法,进行重新组网。示例性的,当从设备故障时,可以替换新的从设备,新的从设备如可以称为第三设备。第三设备可以发送第一广播以及第三频率的超声波,当第一设备接收到来自第三设备的第一广播和第三频率的超声波,可以输出第二提示信息,所述第二提示信息用于指示用户确认是否将所述第三设备与所述第一设备连接。
其中,第一设备响应于所述用户确定将所述第三设备与所述第一设备连接的操作,可以发送所述第二广播,第二广播中包括所述第一设备的标识,以及Wi-Fi直连信道的标识。第三设备接收第二广播,可以在Wi-Fi直连信道上与第一设备建立连接。在第一设备与所述第三设备建立连接后,与所述第三设备协商得到第二会话密钥,且第一设备向所述第三设备发送所述第二会话密钥加密的所述连接信息,第三设备可以使用第一会话密钥解密连接信息,进而根据连接信息,与第一设备建立加密连接。
在该实现方式中,以组网的设备中,任一设备故障,均可以替换新的设备,无需捆绑出售,维护成本低。
第二方面提供一种组网方法,应用于第二设备中。该方法中,第二设备接收来自第一设备的第一广播和第一频率的超声波,向所述第一设备发送响应信号;第二设备与所述第一设备协商,当确定所述第一设备为主设备时,接收来自所述第一设备的第二广播,所述第二广播中包括:所述第一设备的标识,以及Wi-Fi直连信道的标识。第二设备根据所述第一设备的标识以及所述Wi-Fi直连信道的标识,在所述Wi-Fi直连信道上与所述第一设备建立连接。
第二设备与所述第一设备协商得到第一会话密钥,接收来自所述第一设备的加密后的连接信息,所述连接信息包括:服务集标识SSID和密码;第二设备采用所述第一会话密钥解密加密后的连接信息,得到所述连接信息,且根据所述连接信息,与所述第一设备建立加密连接。
在一种可能的实现方式中,所述第一广播包括:用于指示所述第一频率的标识;或者,所述响应信号包括:用于指示所述第一频率的标识。
在一种可能的实现方式中,所述第一广播和所述第二广播均为蓝牙广播。
在一种可能的实现方式中,所述响应信号包括:第一子信号和第二子信号,所述向所述第一设备发送响应信号,包括:响应于接收到所述第一广播,向所述第一设备发送所述第一子信号;响应于接收到所述第一频率的超声波,向所述第一设备发送所述第二子信号。
在一种可能的实现方式中,所述方法还包括:发送第一广播,以及发射第二频率的超声波,所述第一频率与所述第二频率不同。
在一种可能的实现方式中,当第二设备为候选主设备时,第二设备可以输出第一提示信息,以指示用户在所述候选主设备中确定主设备。
在一种可能的实现方式中,当第二设备为主设备时,第二设备可以执行主设备的动作,主设备的动作可以参照第一方面中的相关描述。
第三方面,本申请实施例提供一种组网系统,该组网系统包括:第一设备和第二设备。第一设备用于执行第一方面中的组网方法,第二设备用于执行第二方面中的组网方法。
第四方面,本申请实施例提供一种电子设备,该电子设备可以包括:处理器、存储器。存储器用于存储计算机可执行程序代码,程序代码包括指令;当处理器执行指令时,指令使所述电子设备执行如第一方面至第二方面中的方法。
第五方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面至第二方面中的方法。
第六方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面至第二方面中的方法。
上述第二方面至第六方面的各可能的实现方式,其有益效果可以参见上述第一方面所带来的有益效果,在此不加赘述。
附图说明
图1为本申请适用的一种系统架构的示意图;
图2为本申请实施例中音箱的一种结构示意图;
图3为本申请实施例提供的组网方法的一种实施例的流程示意图;
图4为本申请实施例提供的音箱组网的一种示意图;
图5为本申请实施例提供的音箱组网的另一种示意图;
图6为本申请实施例提供的电子设备的一种结构示意图。
具体实施方式
图1为本申请适用的一种系统架构的示意图。图1中以多个音箱构建音箱系统为例进行说明。参照图1,该系统架构中包括多个音箱,分别为左置音箱11、右置音箱12、左环绕音箱13、右环绕音箱14,以及低音炮音箱15。其中,左置音箱11、右置音箱12、左环绕音箱13、右环绕音箱14,以及低音炮音箱15可以通过无线连接组成音箱系统。应理解,图1中的音箱的类型以及个数为示例说明,并不构成对本申请实施例适用的系统架构的限定。
在音箱系统中,各音箱可以根据自身性能,输出不同声道的音频,使得音箱系统输出的音频可以达到立体声效果。示例性的,如左置音箱11可以输出左声道音频,右置音箱12可以输出右声道音频,左环绕音箱13可以输出左环绕音频,右环绕音箱14可以输出右环绕音频,以及低音炮音箱15可以输出低音声道音频,使得用户可以听到具有立体声效果的音频。
其中,多个音箱组成音箱系统的关键一步是:多个音箱通过无线连接组成一个网络。在一种实施例中,用户可以在终端上依次对多个音箱进行配网,让各音箱接入同一局域网,即多个音箱通过无线连接组成一个网络,多个音箱组成了音箱系统。如用户可以在终端的应用程序(application,APP)中先将第一个音箱配网,然后再添加第二个音箱,且将第二个音箱配网,直至完成多个音箱的配网。应理解,各音箱接入同一局域网可以理解为:将各音箱接入同一接入点(access point,AP),如AP可以为路由器。
但该种方式需要用户依次对多个音箱进行配网,操作繁琐、配网时间长,效率低,且该多个音箱需要依赖同一AP接入同一局域网。
在一种实施例中,在音箱的生产制造过程中,可以预设每个音箱的角色,且在各音箱中预置密钥。其中,预设各音箱的角色如将左置音箱11设置为主音箱,将其他音箱设置为从音箱。在多音箱进行无线连接时,基于预设的角色,从音箱可以根据密钥,采用无线扬声器和音频(wireless speaker and audio,WISA)等连接方式,接入主音箱,实现多个音箱的无线连接。
该种实施例中,因为已预设每个音箱的角色以及密钥,因此该多个音箱需要成套售卖,维护成本高。
因此亟需一种适用范围广,且能够快速、安全的组网方法,实现多个音箱的无线连接。本申请实施例中提供一种组网方法,不依赖AP(如路由器),无需预先设置各音箱的角色和密钥,而是由音箱之间协商建立无线连接,组网效率高,且任一个音箱出现故障即可替换,适用范围广、维护成本低。应理解,本申请实施例中的多设备组网表征:多设备进行无线连接组成一个网络。
图2为本申请实施例中音箱的一种结构示意图。应理解,图1所示的每个音箱的结构可以相同,均可以参照图2的描述。参照图2,音箱20可以包括:按键21、指示灯22、麦克风23、扬声器24、蓝牙芯片25、无线保真(wireless fidelity,Wi-Fi)芯片26、处理器27,以及天线28。
其中,音箱20可以通过蓝牙芯片25和天线28与其他设备建立蓝牙信道,以实现蓝牙通信。音箱20可以通过Wi-Fi芯片26和天线28与其他设备建立Wi-Fi信道,以实现Wi-Fi通信。在一种实施例中,蓝牙芯片25和Wi-Fi芯片26可以共用天线28,或者蓝牙芯片25和Wi-Fi芯片26分别对应单独的天线28。应理解,图2中以蓝牙芯片25和Wi-Fi芯片26共用天线28为例进行说明。
处理器27,可以用于执行下述实施例中S301-S314,完成多音箱组网。
在一种实施例中,处理器27中可以包括:超声检测模块、用户交互模块、设备发现模块、组网管理 模块、认证鉴权模块,以及连接管理模块。其中,处理器27中的各模块的名称为示例说明,其中部分模块(或全部模块)可以集成为一体设置。
用户交互模块,用于管理按键21、指示灯22、麦克风23,以及扬声器24。示例性的,用户交互模块可以检测用户对按键21的操作,以及通过麦克风23采集声音。另,用户交互模块可以控制指示灯23闪烁、显示不同颜色等,用户交互模块还可以控制扬声器24播放音频。
设备发现模块,用于发现其他音箱,发现其他音箱是与其他音箱进行组网的基础。在一种实施例中,设备发现模块可以采用蓝牙广播或者Wi-Fi广播的方式,发现其他音箱,以与其他音箱进行组网。示例性的,设备发现模块可以发送Wi-Fi探测帧(Wi-Fi probe),以发现其他音箱。在一种实施例中,设备发现模块可以执行下述实施例中的S301-S308。
在一种实施例中,音箱20上还可以设置超宽带(ultra wide band,UWB)标签,设备发现模块可以采用UWB技术,发现其他音箱。
在一种实施例中,设备发现模块还可以采用WLAN感知概览(Wi-Fi aware)技术发现其他音箱,本申请实施例中对设备发现模块发现其他音箱采用的方法不做限制,下述实施例中以采用蓝牙广播的方式发现设备为例进行说明。
超声检测模块,用于发射超声波,以及检测其他音箱发射的超声波。
在一种实施例中,设备发现模块,还用于根据发射的超声波检测其他音箱是否与音箱处于同一房间(同室),进而与处于同一房间的音箱进行组网。
认证鉴权模块,用于对其他音箱进行认证、鉴权。在一种实施例中,认证鉴权模块,可以执行下述实施例中的S309-S310。
在一种实施例中,音箱发现其他音箱之后,可以通过通信网络进行互联,以实现无线信号的交互。该通信网络可以但不限于为:Wi-Fi热点网络、Wi-Fi点对点(peer-to-peer,P2P)网络、WISA网络等。Wi-Fi点对点连接还可以称为Wi-Fi直连(Wi-Fi direct)。
下述实施例以音箱之间通过Wi-Fi点对点的连接方式进行连接为例进行说明。在该种实施例中,连接管理模块,用于管理Wi-Fi P2P层,如包括群组拥有者(group owner,GO)的启动和停止等。连接管理模块,还用于建立用于认证鉴权模块进行认证鉴权的物理通道、后续业务通道建立以及业务连接的管理。在一种实施例中,连接管理模块可以执行下述实施例中的S311-S314。
组网管理模块,可以理解为中心管理模块,用于对超声检测模块、用户交互模块、设备发现模块、认证鉴权模块,以及连接管理模块进行管理。示例性的,音箱发现其他音箱后,组网管理模块可以调用超声检测模块完成同室检测,筛选出处于同一房间的音箱。当筛选出的音箱满足组网要求时,可以触发用户交互模块提醒用户,让用户确认主音箱。用户确认主音箱后,组网管理模块根据用户确认的主设备,调用认证鉴权模块完成音箱的认证和鉴权。在认证和鉴权通过后,组网管理模块调用连接管理模块,完成各音箱的无线网络连接,即完成音箱组网。
在一种实施例中,音箱20还可以包括显示屏。显示屏,用于显示音箱的人机交互界面,图2中未示出显示屏。
可以理解的是,图2所示的结构并不构成对音箱的具体限定。在本申请另一些实施例中,音箱可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件,或软件和硬件的组合实现。
应理解,本申请实施例提供的组网方法,不仅适用于多个音箱组网的场景中,还可以适用于其他设备进行组网的场景中。示例性的,本申请实施例提供的组网方法可以适用于家庭环境中智能家电的组网,还可以适用于工厂环境中工业无线终端的组网,本申请实施例对组网方法适用的场景不作限制。
下述实施例中以多个电子设备进行组网为例进行说明,该多个电子设备如可以包括:第一设备、第二设备,以及第三设备等,下述以第一设备、第二设备,以及第三设备的组网过程对本申请实施例提供的组网方法进行说明。
本申请实施例中的电子设备可以称为用户设备(user equipment,UE)、终端(terminal)等,例如,电子设备可以为手机、平板电脑(portable android device,PAD)、个人数字处理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备、车载设备或可穿戴设备,虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线 终端、智慧家庭(smart home)中的终端等,本申请实施例中对电子设备的形态不做具体限定。
下面结合具体的实施例对本申请实施例提供的组网方法进行说明。下面这几个实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图3为本申请实施例提供的组网方法的一种实施例的流程示意图。参照图3,本申请实施例提供的组网方法可以包括:
S301,第一设备发送第一蓝牙广播。
在多个设备进行组网时,用户可以开启每个设备,且打开每个设备的蓝牙功能,以及无线局域网(wireless local area network,WLAN)功能。每个设备均可以执行步骤S301-S305,这里以第一设备为例说明每个设备执行的步骤。
第一设备打开蓝牙功能后,可以进行蓝牙扫描(如蓝牙低功耗(bluetooth low energy,BLE)扫描),且监听来自其他设备的第一蓝牙广播。第一设备可以在询问扫描信道(inquiry scan channel)发送第一蓝牙广播。在一种实施例中,当第一设备发送Wi-Fi广播发现设备时,第一设备可以发送第一Wi-Fi广播。其中,第一广播包括:第一蓝牙广播或第一Wi-Fi广播,本申请实施例中以第一广播为第一蓝牙广播为例进行说明。
第一蓝牙广播用于发现第一设备周围的其他设备。示例性的,第一设备周围的其他设备在接收到该第一蓝牙广播时,可以响应该第一蓝牙广播。第一设备接收到其他设备的响应信号,可以确定第一设备的周围存在其他设备,即发现其他设备。
同理的,第一设备还可以在询问扫描信道监听来自其他设备的第一蓝牙广播,以响应于来自其他设备的第一蓝牙广播。
在一种实施例中,第一蓝牙广播中可以包括:第一设备的标识和第一设备的设备类型。第一设备的标识可以为第一设备的名称、型号等。如当第一设备为音箱时,第一设备的设备类型可以指示第一设备具体是那种类型的音箱,如低音炮音箱、左环绕音箱、左置音箱等。在一种实施例中,第一蓝牙广播可以为BLE广播、或传统蓝牙BR广播。
S302,第一设备发射超声波。
应理解,S302和S301可以同时执行,二者没有先后顺序的区分。
第一设备发射超声波的目的在于:筛选出与第一设备处于同室的设备。因为超声波在空气中传输时遇到障碍物会发生反射,因此超声波不能穿越墙体,与第一设备处于同室的设备可以接收到第一设备发射的超声波,但与第一设备未处于同室的设备不能接收到第一设备发射的超声波。
在一种实施例中,每个设备发射的超声波的频率可以不同,以便于接收到超声波的设备可以区分发射超声波的设备。示例性的,第一设备可以发射第一频率的超声波。
S303,第二设备向第一设备发送响应信号。
第二设备打开蓝牙功能后,可以进行蓝牙扫描,且监听来自其他设备的第一蓝牙广播。
在一种实施例中,第一蓝牙广播中还可以包括:第一设备发射的超声波的频率的标识,如该标识可以为第一频率。在该实施例中,若第二设备与第一设备处于同室,则第二设备可以接收到第一设备发射的超声波,且可以获取该超声波的频率。当第二设备监听到第一蓝牙广播,且接收到第一频率的超声波时,第二设备可以向第一设备发送响应信号。响应信号表征第二设备接收到来自第一设备的第一广播以及第一频率的超声波。该种实施例中,响应信号中可以包括:第二设备的标识和第二设备的设备类型。
其中,第二设备的标识可以为第二设备的名称、型号等。第二设备的设备类型如可以为:音箱、手机、手表等。示例性的,当第二设备的设备类型为音箱时,第二设备的设备类型还用于指示具体的音箱类别,如音箱的类型可以为左置音箱、右置音箱等。也就是说,当第二设备为其他类型的设备时,第二设备的设备类型也用于指示该设备的具体的类型。
在一种实施例中,第一蓝牙广播中可以不包括:第一设备发射的超声波的频率的标识,当第二设备监听到第一蓝牙广播,且接收到第一频率的超声波时,可以向第一设备发送响应信号,在该实施例中,响应信号中可以包括:第二设备的标识、第二设备的设备类型,以及用于指示第二设备接收到第一频率的超声波的标识。在一种实施例中,用于指示第二设备接收到第一频率的超声波的标识可以为:第一频率的标识,如第一频率。
在一种实施例中,第二设备在接收到第一蓝牙广播和第一频率的超声波时,可以分别向第一设备发送一个信号(例如,第一子信号和第二子信号),以表征第二设备分别接收到第一蓝牙广播、第一频率的超声波。其中,响应信号可以包括第一子信号和第二子信号。在该种实施例中,第一蓝牙广播中可以包括第一频率的标识,或者不包括第一频率的标识。
在该种实施例中,当第二设备监听到第一蓝牙广播时,可以向第一设备发送第一子信号,第一子信号表征第二设备接收到第一蓝牙广播。该第一子信号中包括:第二设备的标识和第二设备的设备类型。第一设备响应于接收到来自第二设备的第一子信号,可以发射第一频率的超声波。若第二设备接收到第一频率的超声波,则可以向第一设备发送第二子信号,第二子信号用于表征第二设备接收到第一频率的超声波。
其中,当第一蓝牙广播中包括第一频率的标识时,第二子信号中可以包括第二设备的标识和第二设备的设备类型。当第一蓝牙广播中未包括第一频率的标识时,第二子信号中可以包括:第二设备的标识、第二设备的设备类型,以及用于指示第二设备接收到第一频率的超声波的标识。
在一种实施例中,若第二设备未与第一设备处于同室,则第二设备不能接收到第一设备发射的第一频率的超声波。在该实施例中,响应信号中可以包括:第二设备的标识和第二设备的设备类型。
在一种实施例中,第一设备还可以采用其他测距方式,测量第二设备与第一设备的距离,第一设备可以根据第二设备与第一设备的距离,检测第一设备和第二设备是否处于同室。其中,当第二设备与第一设备的距离小于或等于预设距离时,第一设备可以确定第二设备与第一设备同室。当第二设备与第一设备的距离大于预设距离时,第一设备可以确定第二设备未与第一设备同室。其中,测距方式可以包括但不限于:红外测距、蓝牙测距等方式。
下述实施例中以第二设备与第一设备处于同室为例进行说明。
应理解,图3中也示出了第一设备和第三设备之间的交互流程,第一设备和第三设备之间的交互流程可以参照第一设备和第二设备之间的交互流程。图3中以第三设备与第一设备处于同室为例进行说明。
S304,第一设备根据来自各设备的响应信号,确定待组网的设备。
第一设备发送第一蓝牙广播后,第一设备周围的其他打开蓝牙功能的设备均可以响应该第一蓝牙广播,因此第一设备可以接收到来自多个设备的响应信号。示例性的,如该多个设备可以包括第二设备、第三设备,以及第四设备,下述以第四设备与第一设备未处于同室为例进行说明。
第一设备根据来自各设备的响应信号,确定待组网的设备。在一种实施例中,第一设备可以将发送了响应信号、且与第一设备处于同室的设备,作为待组网的设备。
在一种实施例中,因为“既接收到来自第一设备的第一广播信号,且接收到第一频率的超声波”的设备可以向第一设备发送响应信号,因此第一设备可以确定发送响应信号的设备与第一设备处于同室,因此可以将发送响应信号的设备,作为待组网的设备。
在一种实施例中,因为检测到第一频率的超声波的设备,可以在响应信号中携带用于指示第二设备接收到第一频率的超声波的标识,在该种实施例中,第一设备还可以根据接收到的响应信号,确定待组网的设备。
示例性的,第一设备可以接收到来自第二设备、第三设备,以及第四设备的响应信号,因此可以确定第二设备、第三设备,以及第四设备均可以监听到第一广播信号。另,第一设备还可以检测来自第二设备的响应信号、第三设备的响应信号,以及第四设备的响应信号中是否包括“用于指示检测到第一频率的超声波的标识”,判断第二设备、第三设备,以及第四设备是否与第一设备处于同室。
示例性的,来自第二设备的响应信号和来自第三设备的响应信号中均包括“第一频率”,但第四设备的响应信号中未包括“第一频率”,第一设备可以确定第二设备和第三设备与第一设备处于同室,第四设备未与第一设备处于同室。如此,第一设备可以将第一设备、第二设备,以及第三设备作为待组网的设备。
本申请实施例中,第一设备将发送了响应信号、且与第一设备处于同室的设备,作为待组网的设备,可以避免第一设备与其他家庭或其他环境中的设备进行无线连接,可以避免误连接,提高组网准确性。
下述以第一设备、第二设备,以及第三设备作为待组网的设备为例进行说明。
S305,第一设备、第二设备,以及第三设备协商,确定出候选主设备。
第一设备、第二设备,以及第三设备协商,确定候选主设备的目的在于:确定第一设备、第二设备, 以及第三设备的角色,便于第一设备、第二设备以及第三设备根据自己的角色进行无线连接。角色可以包括主设备和从设备。主设备包含于待组网设备中,待组网设备中除了主设备之外的设备可以称为从设备。主设备,用于与从设备建立通信信道,以支持业务数据传输。在一种实施例中,候选主设备可以为待组网的设备中处理能力强的设备。
第一设备确定待组网的设备后,可以根据第一设备、第二设备,以及第三设备的设备类型,确定第一候选主设备,第一候选主设备可以为至少一个。示例性的,以第一设备为左置音箱、第二设备为右置音箱,以及第三设备为低音炮音箱为例进行说明,因为左置音箱和右置音箱的处理能力强,第一设备可以将左置音箱(第一设备)和右置音箱(第二设备)确定为第一候选主设备。
在一种实施例中,在第一设备确定第一候选主设备后,可以向第二设备、第三设备同步第一候选主设备的标识,如第一候选主设备的标识包括:左置音箱的标识,以及右置音箱的标识。同理的,第一设备也可以接收到第二设备确定的第二候选主设备的标识,以及第三设备确定的第三候选主设备的标识。也就是说,第一设备可以接收到其他设备确定的候选主设备的标识。
第一设备可以根据第一候选主设备、第二候选主设备,以及第三候选主设备,确定出候选主设备。
示例性的,第一设备可以将第一候选主设备、第二候选主设备,以及第三候选主设备中均包括的设备作为候选主设备。或者,第一设备可以将第一候选主设备、第二候选主设备,以及第三候选主设备中,出现次数最多的前N个设备作为候选主设备。N为大于或等于1的整数。
示例性的,如第一设备、第二设备,以及第三设备还可以采用相同的确定规则,确定候选主设备,因此第一设备、第二设备,以及第三设备确定出的候选主设备可以相同,如第一候选主设备、第二候选主设备,以及第三候选主设备相同,第一设备可以将第一候选主设备作为候选主设备。
下面以候选主设备包括第一设备和第二设备为例进行说明。
S306,候选主设备输出提示信息,提示信息用于提示用户选择主设备。
在一种实施例中,候选主设备输出的提示信息可以称为第一提示信息。
S305中讲述了第一设备可以确定出候选主设备,同理的,第二设备,以及第三设备也可以确定出候选主设备,因为采用相同的确定规则,第一设备、第二设备以及第三设备确定出的候选主设备相同。因为每个设备均可以确定候选主设备,因此被确定为候选主设备的设备可以输出提示信息,以表征自己是候选主设备。
在一种实施例中,在第一设备、第二设备以及第三设备确定出的候选主设备后,还可以相互同步自己确定的候选主设备,在候选主设备一致时,候选主设备可以输出提示信息。
图3中以候选主设备包括第一设备和第二设备为例说明,如第一设备、第二设备均可以确定候选主设备为第一设备和第二设备,则第一设备和第二设备均可以输出提示信息。其中,提示信息用于提示用户选择主设备。
在一种实施例中,以第一设备为例,第一设备可以采用语音方式输出提示信息,如第一设备可以播放“按压音箱上的按键,确定组网的主设备”。或者,为了便于用户更清楚的看到哪些设备输出了提示信息,第一设备还可以控制第一设备上的指示灯闪烁或显示不同颜色,以便用户快速确定候选主设备,以在候选主设备中选择主设备。
在一种实施例中,第一设备包括显示屏时,第一设备还可以在显示屏上显示提示信息。本申请实施例对候选主设备输出提示信息的方式不做限制。
在一种实施例中,第一设备、第二设备,以及第三设备可以协商确定出主设备,无需用户确认。
S307,响应于用户确认主设备的操作,主设备发送第二蓝牙广播,第二蓝牙广播中包括GO名称和Wi-Fi P2P信道的标识。
在一种实施例中,第一设备也可以通过发送Wi-Fi广播的方式广播GO名称和Wi-Fi P2P,在该种实施例中,响应于用户确认主设备的操作,主设备可以发送第二Wi-Fi广播。其中,第二蓝牙广播、第二Wi-Fi广播可以称为第二广播,本申请实施例中以第二广播为第二蓝牙广播为例进行说明。
图3中以用户确认第一设备为主设备为例进行说明。示例性的,用户可以在第一设备上按压按键,确认第一设备为主设备。
第一设备响应于用户确认主设备的操作,如第一设备检测到用户按压第一设备上的按键的操作,第一设备可以发送第二蓝牙广播。第二蓝牙广播用于与从设备建立Wi-Fi P2P连接。在一种实施例中,第 二蓝牙广播中可以包括:GO名称,以及Wi-Fi P2P信道的标识。GO为主设备,即第一设备,GO名称可以称为第一设备的标识。
其中,GO名称可以为:服务集标识(service set identifier,SSID),或者主设备(第一设备)的媒体存取控制地址(media access control address,MAC)。待组网的设备中除了GO之外的第二设备、第三设备可以称为群组客户端(group client,GC)。Wi-Fi P2P信道的标识可以为:信道号,或信道所处的频段等。
S308,第二设备在Wi-Fi P2P信道与第一设备建立连接。
同理的,第三设备也可以在Wi-Fi P2P信道与第一设备建立连接。
其中,第二设备在询问扫描信道监听蓝牙广播,可以监听到第二蓝牙广播,进而可以得到GO名称和Wi-Fi P2P信道的标识。第二设备可以根据GO名称,在W-iFi P2P信道上与第一设备建立连接。
在一种实施例中,第二设备响应于监听到第二蓝牙广播,可以在Wi-Fi P2P信道中向第一设备反馈连接响应消息,表征第二设备在Wi-Fi P2P信道上与第一设备建立临时连接。应理解,Wi-Fi P2P信道可以简称为P2P信道。在一种实施例中,第二设备可以在Wi-Fi P2P信道上与第一设备建立连接的过程可以参照Wi-Fi P2P协议中的相关描述。
S309,第一设备对第二设备认证鉴权。
第一设备对第二设备认证鉴权时,可以并行对第三设备认证鉴权,进而提高认证鉴权的效率。
以第一设备对第二设备认证鉴权为例,第一设备认证第二设备可以理解为:第一设备确定第二设备是否为待组网设备中的设备,在确定第二设备为待组网设备中的设备时,认证通过,可以进行鉴权操作。
认证过程:在一种实施例中,第二设备响应于第二蓝牙广播,在Wi-Fi P2P信道中反馈连接响应消息时,该连接响应消息中可以包括:用于指示第二设备为待组网设备中的设备的标识。示例性的,该连接响应消息中可以包括第二设备的标识,或者其他用于指示第二设备包含于待组网设备的标识,如标志位的数值为1表征第二设备包含于待组网设备。第一设备可以根据该连接响应消息,确定第二设备是否包含于待组网设备。
鉴权过程:在一种实施例中,第一设备和第二设备中均存储有预设密钥,预设密钥如个人身份识别(personal identification number,PIN)码。第一设备对第二设备鉴权,可以理解为:第一设备确定第二设备中的预设PIN是否与第一设备中的预设PIN码相同。
示例性的,第二设备可以采用加密算法,向第一设备发送加密后的第二设备中的预设PIN码,在第一设备解密第二设备中的预设PIN码后,若确定第二设备中的预设PIN码与第一设备中的预设PIN码相同,则第二设备鉴权通过,若第二设备中的预设PIN码与第一设备中的预设PIN码不同,则第二设备鉴权不通过。
在一种实施例中,第一设备还可以采用简单密码指数密钥交换(simple password authenticated exponential key exchange,SPEKE)算法,确定第二设备中的预设PIN码是否与第一设备中的预设PIN码相同。
S310,在第二设备认证通过,以及鉴权通过时,第一设备和第二设备协商得到第一会话密钥。
会话密钥,用于加密以及解密两个设备之间传输的数据。应注意,第一设备和第二设备协商可以得到第一会话密钥,同理的,第一设备和第三设备协商可以得到第二会话密钥,第一会话密钥和第二会话密钥不同。这样,每个群组客户端GC和群组拥有者GO之间的会话密钥不同,可以提高数据安全性。
在一种实施例中,在第二设备认证通过,以及鉴权通过时,第一设备和第二设备可以采用SPEKE算法,协商得到第一会话密钥。其中,SPEKE算法包括两个阶段,密钥交换阶段和密钥认证阶段。在密钥交换阶段,第一设备和第二设备经协商得到会话密钥,在密钥认证阶段,第一设备和第二设备互相确认对方知道的会话密钥,在确认对方知道的会话密钥一致时,可以将该会话密钥作为第一会话密钥。
S311,第一设备采用第一会话密钥加密连接信息,得到第一连接信息。
连接信息可以包括:服务集标识(service set identifier,SSID)和密码。在一种实施例中,连接信息可以称为GO节点信息。
第一设备可以采用第一会话密钥加密连接信息,得到第一连接信息,以保证连接信息的安全。第一连接信息为加密后的连接信息。
本申请实施例中对加解密算法不做限制,加解密算法可以包括但不限于:哈希算法、信息摘要算法 (message-digest algorithm 5,MD5)。
S312,第一设备在Wi-Fi P2P信道上向第二设备发送第一连接信息。
S313,第二设备采用第一会话密钥,解密第一连接信息,得到连接信息。
第二设备解密第一连接信息,可以得SSID和密码。
S314,第二设备在Wi-Fi P2P信道上,采用SSID和密码,接入加密GO(第一设备)。
第二设备在Wi-Fi P2P信道上,采用SSID和密码,可以接入加密GO(第一设备),即第二设备与第一设备建立加密连接。这样第一设备和第二设备可以在未加密的信道上传输加密的数据,保证数据传输的安全性。
同理的,第一设备可以采用第二会话密钥加密连接信息,得到第二连接信息,以及在Wi-Fi P2P信道上向第三设备发送第二连接信息。第三设备采用第二会话密钥,解密第二连接信息,得到连接信息,如第三设备解密可以得到SSID和密码。第三设备可以在Wi-Fi P2P信道上,采用SSID和密码,接入加密GO(第一设备)。这样第一设备和第三设备可以在未加密的信道上传输加密的数据,可以保证数据传输的安全性。
其中,第二设备、第三设备分别与第一设备建立加密连接,即第一设备、第二设备以及第三设备完成组网。在第一设备、第二设备以及第三设备组网后,第一设备可以通过Wi-Fi P2P信道分别向第二设备、第三设备传输业务数据,保证业务的顺利执行。示例性的,在图1所示的音箱组网后,第一设备(如左置音箱)可以在Wi-Fi P2P信道上向其他音箱发送音频数据,多个音箱可以播放音频,使得用户可以听到具有立体声效果的音频。
图4为本申请实施例提供的音箱组网的一种示意图。参照图4中的a,用户打开音箱,以及打开音箱的蓝牙功能和WLAN功能后,每个音箱可以发送第一蓝牙广播和超声波。应注意,不同音箱发送的超声波的频率不同,图4中的a中未示出超声波的频率。各音箱执行S301-S305后,如确定出的候选主设备为左置音箱和右置音箱,则左置音箱和右置音箱的指示灯闪烁或显示不同颜色,且播放如“按压音箱上的按键,确定组网的主设备”的提示信息,如图4中的b所示。参照图4中的b,若用户按压左置音箱上的按键,则左置音箱可以确定自己是主设备,执行S307-S314,以与各音箱进行无线连接完成组网。
图5为本申请实施例提供的音箱组网的另一种示意图。参照图5,音箱组网的过程可以分为四个阶段,分别为:设备发现阶段、临时连接阶段、认证鉴权阶段,以及业务网络建立阶段。
设备发现阶段,音箱启动BLE扫描,可以发送BLE广播、发射超声波,以及启动超声检测。设备发现阶段可以确定待组网的音箱,以及确定主音箱。主音箱可以通过蓝牙信道公开GO名称和Wi-Fi P2P信道的标识。在一种实施例中,设备发现阶段可以包括S301-S307。
临时连接阶段,从音箱通过Wi-Fi P2P信道与主音箱建立连接,完成Wi-Fi P2P物理链路的建立,即建立Wi-Fi P2P信道。在一种实施例中,临时连接阶段可以包括S308。
认证鉴权阶段,主音箱可以并行对各从音箱进行认证鉴权,以及协商会话密钥。在一种实施例中,临时连接阶段可以包括S309-S310。
业务网络建立阶段,主音箱可以加密连接信息,在非加密的Wi-Fi P2P信道上,将加密后的连接信息传输给各从音箱,各音箱可以与主音箱建立加密连接,完成组网。在一种实施例中,业务网络建立阶段可以包括S311-S314。
图3-图5所示的组网流程为多个设备第一次组网时的流程。以音箱为例,应理解,在各音箱第一次组网后,在下一次各音箱上电时,各从音箱可以在Wi-Fi P2P信道上,采用SSID和密码,直接接入加密主音箱,完成组网。
本申请实施例中,多个设备在组网时,设备可以通过设备发现结合超声检测的方式,确定待组网的设备,待组网的设备可以确定候选主设备,且借助用户的参与确定主设备。在确定主设备之后,主设备可以与从设备之间建立临时连接,在主设备并行认证和鉴权各从设备后,可以协商会话密钥,进而在无线信道上传输加密的数据,使得从设备与主设备建立加密连接,以完成组网。多个设备的组网过程仅需用户确认主设备,操作简单、组网效率高,且各设备之间可以相互连接,无需依赖同一路由器,应用范围广。另外,任一个设备故障,可以及时更换,维护成本低。
在一种实施例中,任一个音箱故障后,用户可以购买同类型的音箱,触发新的音箱和已组网的音箱 重新,或者触发新的音箱加入已组网的音箱中。
其中,若主音箱(如左置音箱)故障,则用户可以购买新的左置音箱,用户可以将其他音箱恢复出厂设置,如用户将低音炮音箱、右置音箱、左环绕音箱和右环绕音箱恢复出厂设置。或者,用户可以在其他音箱上操作(如按键),以触发其他音箱重新进入组网状态。在其他音箱恢复出厂设置或重新进入组网状态后,其他音箱可以与新购买的左置音箱,按照图3中的流程,进行重新组网。
其中,若从音箱故障,以从音箱为低音炮音箱为例,用户可以购买新的低音炮音箱,且打开低音炮音箱的蓝牙功能和WLAN功能,这样低音炮音箱可以发送第一蓝牙广播和超声波。主音箱监听到来自低音炮音箱的第一蓝牙广播,可以输出第二提示信息,以提示用户是否将扫描到的低音炮音箱加入组网,即提示用户确认是否将低音炮音箱与主音箱连接。若主音箱检测到用户同意将低音炮音箱与主音箱连接的操作,可以执行S307-S314,以使新的低音炮音箱加入组网。在一种实施例中,可以将新的低音炮音箱称为第三设备,第三设备发射的超声波的频率为第三频率。
本申请实施例中,已组网的设备中任一设备故障,用户可以及时更换新的设备,且触发多设备重新组网,操作简便,不影响用户使用。
在一种实施例中,本申请实施例还提供一种电子设备,该电子设备可以为上述实施例中所述的第一设备、第二设备、第三设备。参照图6,该电子设备中可以包括:处理器601(例如CPU)、存储器602。存储器602可能包含高速随机存取存储器(random-access memory,RAM),也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器,存储器602中可以存储各种指令,以用于完成各种处理功能以及实现本申请的方法步骤。
可选的,本申请涉及的电子设备还可以包括:电源603、通信总线604以及通信端口605。上述通信端口605用于实现电子设备与其他外设之间进行连接通信。在本申请实施例中,存储器602用于存储计算机可执行程序代码,程序代码包括指令;当处理器601执行指令时,指令使电子设备的处理器601执行上述方法实施例中的动作,其实现原理和技术效果类似,在此不再赘述。
需要说明的是,上述实施例中所述的模块或部件可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器如控制器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过 程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。

Claims (15)

  1. 一种组网方法,其特征在于,应用于第一设备,包括:
    发送第一广播,以及发射第一频率的超声波;
    接收来自第二设备的响应信号,所述响应信号表征所述第二设备接收到所述第一广播和所述超声波;
    与所述第二设备协商,当确定所述第一设备为主设备时,发送第二广播,所述第二广播中包括:所述第一设备的标识,以及Wi-Fi直连信道的标识;
    与所述第二设备建立连接后,与所述第二设备协商得到第一会话密钥;
    向所述第二设备发送所述第一会话密钥加密的连接信息,所述连接信息包括:服务集标识SSID和密码。
  2. 根据权利要求1所述的方法,其特征在于,所述发送第二广播之前,还包括:
    与所述第二设备协商,确定候选主设备;
    当所述第一设备包含于所述候选主设备中时,输出第一提示信息,所述第一提示信息用于指示用户在所述候选主设备中确定主设备;
    响应于所述用户确定所述第一设备为主设备的操作,确定所述第一设备为主设备。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一广播包括:用于指示所述第一频率的标识;或者,
    所述响应信号包括:用于指示所述第一频率的标识。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一广播和所述第二广播均为蓝牙广播。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述响应信号包括:第一子信号和第二子信号,所述接收来自第二设备的响应信号,包括:
    接收来自所述第二设备的所述第一子信号,所述第一子信号表征所述第二设备接收到所述第一广播;
    接收来自所述第二设备的所述第二子信号,所述第二子信号表征所述第二设备接收到所述超声波。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述与所述第二设备协商得到第一会话密钥之前,还包括:
    对所述第二设备进行认证、鉴权,所述认证用于确定所述第二设备是否为响应于所述第一广播和所述超声波的设备,所述鉴权用于确定所述第二设备中的预设个人身份识别PIN码和所述第一设备中的预设PIN码是否相同;
    所述与所述第二设备协商得到第一会话密钥,包括:
    当所述第二设备为响应于所述第一广播和所述超声波的设备,以及所述第二设备中的预设PIN码和所述第一设备中的预设PIN码相同时,与所述第二设备协商得到所述第一会话密钥。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    若接收到来自第三设备的第一广播和第三频率的超声波,则输出第二提示信息,所述第二提示信息用于指示用户确认是否将所述第三设备与所述第一设备连接;
    响应于所述用户确定将所述第三设备与所述第一设备连接的操作,发送所述第二广播;
    与所述第三设备建立连接后,与所述第三设备协商得到第二会话密钥;
    向所述第三设备发送所述第二会话密钥加密的所述连接信息。
  8. 一种组网方法,其特征在于,应用于第二设备,包括:
    接收来自第一设备的第一广播和第一频率的超声波;
    向所述第一设备发送响应信号;
    与所述第一设备协商,当确定所述第一设备为主设备时,接收来自所述第一设备的第二广播,所述第二广播中包括:所述第一设备的标识,以及Wi-Fi直连信道的标识;
    根据所述第一设备的标识以及所述Wi-Fi直连信道的标识,在所述Wi-Fi直连信道上与所述第一设备建立连接;
    与所述第一设备协商得到第一会话密钥;
    接收来自所述第一设备的加密后的连接信息,所述连接信息包括:服务集标识SSID和密码;
    采用所述第一会话密钥解密加密后的连接信息,得到所述连接信息;
    根据所述连接信息,与所述第一设备建立加密连接。
  9. 根据权利要求8所述的方法,其特征在于,所述第一广播包括:用于指示所述第一频率的标识;或者,
    所述响应信号包括:用于指示所述第一频率的标识。
  10. 根据权利要求8或9所述的方法,其特征在于,所述第一广播和所述第二广播均为蓝牙广播。
  11. 根据权利要求8-10中任一项所述的方法,其特征在于,所述响应信号包括:第一子信号和第二子信号,所述向所述第一设备发送响应信号,包括:
    响应于接收到所述第一广播,向所述第一设备发送所述第一子信号;
    响应于接收到所述第一频率的超声波,向所述第一设备发送所述第二子信号。
  12. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    发送第一广播,以及发射第二频率的超声波,所述第一频率与所述第二频率不同。
  13. 一种电子设备,其特征在于,包括:处理器和存储器;
    所述存储器存储计算机指令;
    所述处理器执行所述存储器存储的计算机指令,使得所述处理器执行如权利要求1-12中任一项所述的方法。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序或指令,当所述计算机程序或指令被运行时,实现如权利要求1-12中任一项所述的方法。
  15. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,通信装置的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得通信装置实施如权利要求1-7任意一项所述的方法或者如权利要求8-12任意一项所述的方法。
PCT/CN2023/106088 2022-07-14 2023-07-06 组网方法和电子设备 WO2024012343A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210826205.XA CN117440349A (zh) 2022-07-14 2022-07-14 组网方法和电子设备
CN202210826205.X 2022-07-14

Publications (1)

Publication Number Publication Date
WO2024012343A1 true WO2024012343A1 (zh) 2024-01-18

Family

ID=89535541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/106088 WO2024012343A1 (zh) 2022-07-14 2023-07-06 组网方法和电子设备

Country Status (2)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190053302A1 (en) * 2017-08-08 2019-02-14 Samsung Electronics Co., Ltd. Electronic device and method for forming wi-fi direct group thereof
CN111800768A (zh) * 2020-06-17 2020-10-20 上海传英信息技术有限公司 连接的方法、设备及计算机可读存储介质
CN112039604A (zh) * 2020-09-07 2020-12-04 北京小米移动软件有限公司 一种基于智能家居场景的设备快速联网技术
CN114157659A (zh) * 2022-02-10 2022-03-08 荣耀终端有限公司 一种文件分享方法及终端设备
CN114390491A (zh) * 2020-10-20 2022-04-22 华为技术有限公司 一种组网方法、装置和系统
CN114679708A (zh) * 2020-12-25 2022-06-28 华为技术有限公司 通信方法、系统及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190053302A1 (en) * 2017-08-08 2019-02-14 Samsung Electronics Co., Ltd. Electronic device and method for forming wi-fi direct group thereof
CN111800768A (zh) * 2020-06-17 2020-10-20 上海传英信息技术有限公司 连接的方法、设备及计算机可读存储介质
CN112039604A (zh) * 2020-09-07 2020-12-04 北京小米移动软件有限公司 一种基于智能家居场景的设备快速联网技术
CN114390491A (zh) * 2020-10-20 2022-04-22 华为技术有限公司 一种组网方法、装置和系统
CN114679708A (zh) * 2020-12-25 2022-06-28 华为技术有限公司 通信方法、系统及电子设备
CN114157659A (zh) * 2022-02-10 2022-03-08 荣耀终端有限公司 一种文件分享方法及终端设备

Also Published As

Publication number Publication date
CN117440349A (zh) 2024-01-23

Similar Documents

Publication Publication Date Title
US7983615B2 (en) Configuring and connecting to a media wireless network
EP3893109B1 (en) Method and device for connecting bluetooth devices
US10560974B2 (en) Method and apparatus for connecting device by using Bluetooth technology
US10798548B2 (en) Method for controlling device by using Bluetooth technology, and apparatus
CN108323246B (zh) 组网方法、芯片及无线网络系统
US9191988B2 (en) Smart pairing using bluetooth technology
US20130166759A1 (en) Apparatus, systems, and methods of ip address discovery for tunneled direct link setup
WO2022143071A1 (zh) 连接建立方法及电子设备
JP2019506049A (ja) 複数のセキュリティレベルを備える無線通信システム
US9510130B2 (en) Provisioning of multiple wireless devices by an access point
WO2016080798A1 (ko) 블루투스 통신을 지원하는 무선 통신 시스템에서 디바이스들 간 페어링을 수행하기 위한 방법 및 이를 위한 장치
JP2016533078A (ja) オーディオポートを用いた遠隔システム構成
JP2017538362A (ja) モバイルデバイスIRブラスタを使用してWi−Fi Direct接続を自動化および支援するための方法およびシステム
WO2024083235A1 (zh) 基于Wi-Fi感知的配网方法、嵌入式芯片系统及介质
WO2016029772A1 (zh) 一种通信方法及设备
JP2006050372A (ja) 無線lan接続システム、無線lan接続方法およびアクセスポイント
WO2024012343A1 (zh) 组网方法和电子设备
WO2018205328A1 (zh) 一种设备接入无线网络的系统及方法
WO2023071993A1 (zh) 蓝牙配对方法、设备、系统和存储介质
WO2022198391A1 (zh) 一种通信方法、通信装置及终端
JP2015176536A (ja) 通信装置、通信方法、通信プログラムおよび記憶媒体
WO2023246056A1 (zh) 设备连接方法及装置、存储介质、芯片
KR20220105401A (ko) 데이터 패스를 셋업하는 전자 장치 및 그 동작 방법
WO2024016885A1 (zh) 蓝牙连接方法、装置、电子设备及计算机可读存储介质
WO2023051272A1 (zh) 一种设备组网及声道配置方法和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23838835

Country of ref document: EP

Kind code of ref document: A1