WO2022143071A1 - 连接建立方法及电子设备 - Google Patents

连接建立方法及电子设备 Download PDF

Info

Publication number
WO2022143071A1
WO2022143071A1 PCT/CN2021/136692 CN2021136692W WO2022143071A1 WO 2022143071 A1 WO2022143071 A1 WO 2022143071A1 CN 2021136692 W CN2021136692 W CN 2021136692W WO 2022143071 A1 WO2022143071 A1 WO 2022143071A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
radio frequency
parameter
request
parameter negotiation
Prior art date
Application number
PCT/CN2021/136692
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 华为技术有限公司
Priority to EP21913812.0A priority Critical patent/EP4271006A4/en
Publication of WO2022143071A1 publication Critical patent/WO2022143071A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • H04L63/205Network architectures or network communication protocols for network security for managing network security; network security policies in general involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • 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
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/18Network architectures or network communication protocols for network security using different networks or channels, e.g. using out of band channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W92/00Interfaces specially adapted for wireless communication networks
    • H04W92/16Interfaces between hierarchically similar devices
    • H04W92/18Interfaces between hierarchically similar devices between terminal devices

Definitions

  • the present application relates to the technical field of embodiments and terminals, and in particular, to a connection establishment method and an electronic device.
  • the mobile phone uses the wireless screen projection technology to send the display content to the large-screen device for display to improve the display effect.
  • audio and video files can be shared between a mobile phone and a laptop computer through a near field communication (NFC) function.
  • NFC near field communication
  • Wi-Fi wireless fidelity
  • connection establishment method and electronic device provided by the embodiments of the present application can directly utilize the Wi-Fi network to realize chain establishment between electronic devices, improve chain establishment performance, and enhance user experience.
  • an embodiment of the present application provides a method for establishing a connection, which is applied to a first electronic device.
  • the method may include: acquiring a Wi-Fi Wi-Fi of the second electronic device in a near field communication NFC tag of the second electronic device The media access control MAC address of the interface. Using the MAC address of the Wi-Fi interface, query whether the second electronic device has the Wi-Fi parameter negotiation capability. If the second electronic device has the Wi-Fi parameter negotiation capability, perform Wi-Fi parameter negotiation with the second electronic device to obtain the target radio frequency parameter. A Wi-Fi direct connection channel is established with the second electronic device using the target radio frequency parameters.
  • the Wi-Fi parameter negotiation capability includes, for example, a Wi-Fi hotspot parameter negotiation capability.
  • the electronic device has the Wi-Fi hotspot parameter negotiation capability, and is capable of wireless screen projection and/or cross-device file sharing.
  • the target radio frequency parameter is used to establish a Wi-Fi direct connection channel.
  • the Wi-Fi direct connection channel includes, for example, a Wi-Fi point-to-point connection channel or a Wi-Fi layer-2 network connection channel.
  • the NFC tag contains NFC parameter information, and by extending the NFC tag, the MAC address of the Wi-Fi interface is directly indicated in the NFC parameter information.
  • the first electronic device can directly obtain the MAC address of the Wi-Fi interface of the second electronic device from the NFC tag of the second electronic device.
  • the first electronic device uses the MAC address of the Wi-Fi interface to perform Wi-Fi parameter negotiation with the second electronic device, establishes a Wi-Fi direct connection channel, and performs data transmission.
  • it is not necessary to perform a Bluetooth connection first, and then establish a Wi-Fi direct connection channel based on the Bluetooth connection. Avoid the problem of large chain establishment delay caused by the poor performance and stability of the Bluetooth connection, and improve the interactive performance.
  • the method before acquiring the media access control MAC address of the Wi-Fi interface of the second electronic device in the near field communication NFC tag of the second electronic device, the method further includes: sending to the AP device A registration request, where the registration request is used to request to register second capability information of the first electronic device, where the second capability information includes the Wi-Fi parameter negotiation capability.
  • the first electronic device and the second electronic device access the Wi-Fi network provided by the same wireless access point AP device, and use the MAC address of the Wi-Fi interface to query the second electronic device Whether it has the Wi-Fi parameter negotiation capability, including: receiving the device list information sent by the AP device, where the device list information includes the capability information of the electronic device accessing the AP device. In the device list information, query the first capability information of the second electronic device corresponding to the MAC address of the Wi-Fi interface, and determine whether the first capability information includes the Wi-Fi parameter negotiation capability.
  • the first electronic device and the second electronic device access the Wi-Fi network provided by the same wireless access point AP device, and use the MAC address of the Wi-Fi interface to query the second electronic device Whether it has the Wi-Fi parameter negotiation capability, including: sending a capability query request to the AP device, where the capability query request carries the MAC address of the Wi-Fi interface, and the capability query request is used to request to query whether the second electronic device has Wi-Fi parameter negotiation ability.
  • a capability query response sent by the AP device is received, where the capability query response is used to indicate whether the second electronic device has the Wi-Fi parameter negotiation capability.
  • the first electronic device and the second electronic device access the network provided by the AP device, they will register the capabilities they support with the AP device.
  • the AP device broadcasts the device information registered by the connected electronic device during the registration process, and synchronizes it to each electronic device connected in the local area network.
  • the first electronic device can save the device list information accessing the AP device, and based on the device list information, it can discover the neighboring devices in the local area network. Therefore, after receiving the MAC address of the Wi-Fi interface, the first electronic device can discover the second electronic device that supports the Wi-Fi parameter negotiation capability among the neighboring devices.
  • the first electronic device can send a query request to the AP device, the AP device performs the query, and receives the query sent by the AP device.
  • the capability information of the second electronic device is further obtained.
  • the first electronic device determines whether the second electronic device has the Wi-Fi parameter negotiation capability through the above method, so as to determine whether the second electronic device supports wireless screen projection and/or cross-device file sharing. After it is determined that the second electronic device supports the Wi-Fi parameter negotiation capability, the Wi-Fi parameter negotiation is requested to establish a Wi-Fi communication channel.
  • the second electronic device has the Wi-Fi parameter negotiation capability, perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters; including: sending the Wi-Fi parameters to the AP device
  • the negotiation request, the Wi-Fi parameter negotiation request carries the identifier of the second electronic device and the first radio frequency parameter; the first radio frequency parameter includes the idle radio frequency frequency band in the radio frequency frequency band supported by the first electronic device, and the channel supported by the first electronic device idle channel.
  • the Wi-Fi parameter negotiation response carries target radio frequency parameters, and the target radio frequency parameters include the target radio frequency frequency band selected by the second electronic device from the idle radio frequency frequency bands and The target channel selected from the idle channels.
  • the first electronic device determines to establish a connection with the second electronic device, it needs to negotiate Wi-Fi channel connection parameters to establish a Wi-Fi direct channel, and the first electronic device needs to connect the radio frequency supported and available to itself.
  • the parameters are sent to the second electronic device.
  • the AP device is set up with Layer 2 isolation, which does not allow direct communication between the first electronic device and the second electronic device. Instead, the AP device monitors the signals between the first electronic device and the second electronic device. Forwarding is performed, so as to realize the authorization and traffic audit of the electronic devices accessing the AP device network.
  • the first electronic device sends the available radio frequency parameters to the AP device, and the AP device forwards the received radio frequency parameters to the corresponding target device (that is, the second electronic device based on the target device identifier carried in the Wi-Fi parameter negotiation request).
  • the AP device forwards the received radio frequency parameters to the corresponding target device (that is, the second electronic device based on the target device identifier carried in the Wi-Fi parameter negotiation request).
  • the second electronic device after receiving the first radio frequency parameters sent by the first electronic device, selects the optimal radio frequency frequency band and channel as the target according to the first radio frequency parameters and the radio frequency parameters supported by itself and currently available RF parameters. For example, the second electronic device selects the radio frequency frequency band and channel with the best expected signal quality from the available radio frequency frequency bands and channels supported by both itself and the first electronic device. For another example, the second electronic device selects the radio frequency frequency band and channel with the smallest delay among the available radio frequency frequency bands and channels supported by both itself and the first electronic device.
  • the second electronic device has the Wi-Fi parameter negotiation capability, perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters; including: sending Wi-Fi parameters to the second electronic device In the Fi parameter negotiation request, the Wi-Fi parameter negotiation request carries the first radio frequency parameter; the first radio frequency parameter includes an idle radio frequency band in the radio frequency band supported by the first electronic device, and an idle channel in the channel supported by the first electronic device.
  • the AP device is not provided with Layer 2 isolation in the local area network, and the first electronic device and the second electronic device can communicate directly. Then, during the Wi-Fi parameter negotiation process between the first electronic device and the second electronic device, it is not necessary to use the AP device to forward the radio frequency parameters for negotiation.
  • using the target radio frequency parameters to establish a Wi-Fi direct connection channel with the second electronic device includes: sending a connection establishment request on the target radio frequency frequency band and the target channel, where the connection establishment request is used to request communication with the second electronic device.
  • the electronic device establishes a Wi-Fi Direct channel.
  • the connection establishment response sent by the second electronic device is received, and the establishment of the Wi-Fi direct connection channel is completed.
  • the second electronic device after determining the target radio frequency parameters, creates a hotspot, uses itself as a soft access point (soft AP) device, and configures radio frequency parameters of the radio frequency interface, so that the first electronic device can access the radio frequency interface subsequently.
  • RF interface to transmit data.
  • the second electronic device as a soft AP device, sends a beacon frame according to a preset period based on the target radio frequency parameter.
  • the first electronic device determines that the Wi-Fi parameter negotiation is successful. According to the radio frequency band and channel specified in the target radio frequency parameter determined through negotiation, a probe request (probe request) management frame is sent based on the 802.11 protocol to search for a beacon frame sent by the second electronic device. After the second electronic device is searched, the authentication and association process is automatically triggered, a Wi-Fi direct connection channel is created with the second electronic device, and then data transmission is started.
  • a probe request (probe request) management frame is sent based on the 802.11 protocol to search for a beacon frame sent by the second electronic device. After the second electronic device is searched, the authentication and association process is automatically triggered, a Wi-Fi direct connection channel is created with the second electronic device, and then data transmission is started.
  • an embodiment of the present application provides a connection establishment method, which is applied to a first electronic device.
  • the method may include: in response to a first operation, sending a device query request to a wireless access point AP device, where the device query request is used for Request to query devices with Wi-Fi parameter negotiation capability.
  • a device query response sent by the AP device is received, where the device query response carries the MAC address of the Wi-Fi interface of the second electronic device, and the second electronic device has Wi-Fi parameter negotiation capability.
  • the MAC address of the Wi-Fi interface perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters.
  • a Wi-Fi direct connection channel is established with the second electronic device using the target radio frequency parameters.
  • the method before sending a device query request to the wireless access point AP device in response to the first operation, the method further includes: sending a registration request to the AP device, where the registration request is used to request to register the first electronic device
  • the second capability information includes the Wi-Fi parameter negotiation capability.
  • the first electronic device and the second electronic device are connected to the Wi-Fi network provided by the same AP device. After accessing the AP, it directly registers the capabilities and interface information it supports with the AP. Such as Bluetooth interface information, Wi-Fi interface information, etc. Further, subsequently, the first electronic device can directly query the AP device for the device with the Wi-Fi parameter negotiation capability and the MAC address of the Wi-Fi interface of the device.
  • the first electronic device can also obtain the MAC address of the Wi-Fi interface of the second electronic device, and directly establish a Wi-Fi direct connection channel with the second electronic device based on the MAC address of the Wi-Fi interface. , improve the performance and stability of the chain building, and improve the user experience.
  • the Fi parameter negotiation request carries the identifier of the second electronic device and the first radio frequency parameter; the first radio frequency parameter includes an idle radio frequency band in the radio frequency band supported by the first electronic device and an idle channel in the channels supported by the first electronic device.
  • the receiving AP device forwards the Wi-Fi parameter negotiation response sent by the second electronic device, the Wi-Fi parameter negotiation response carries the target radio frequency parameter, and the target radio frequency parameter includes the target radio frequency frequency band selected by the second electronic device from the idle radio frequency frequency band and the Selected target channel among idle channels.
  • using the MAC address of the Wi-Fi interface to perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters including: sending a Wi-Fi parameter negotiation request to the second electronic device, The Wi-Fi parameter negotiation request carries the first radio frequency parameter; the first radio frequency parameter includes an idle radio frequency frequency band in the radio frequency frequency band supported by the first electronic device, and an idle channel in the channel supported by the first electronic device.
  • using the target radio frequency parameters to establish a Wi-Fi direct connection channel with the second electronic device includes: sending a connection establishment request on the target radio frequency frequency band and the target channel, where the connection establishment request is used to request communication with the second electronic device.
  • the electronic device establishes a Wi-Fi Direct channel.
  • the connection establishment response sent by the second electronic device is received, and the establishment of the Wi-Fi direct connection channel is completed.
  • connection establishment method of the second aspect reference may be made to the technical effect of the connection establishment method of the first aspect, which will not be repeated here.
  • an embodiment of the present application provides an electronic device, including: a processor and a memory; the memory is coupled to the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions, when the processor reads from the memory
  • the computer instructions cause the electronic device to perform the following operation: acquire the media access control MAC address of the Wi-Fi interface of the second electronic device in the near field communication NFC tag of the second electronic device.
  • Using the MAC address of the Wi-Fi interface query whether the second electronic device has the Wi-Fi parameter negotiation capability. If the second electronic device has the Wi-Fi parameter negotiation capability, perform Wi-Fi parameter negotiation with the second electronic device to obtain the target radio frequency parameter.
  • a Wi-Fi direct connection channel is established with the second electronic device using the target radio frequency parameters.
  • the first electronic device and the second electronic device access the Wi-Fi network provided by the same wireless access point AP device, and use the MAC address of the Wi-Fi interface to query the second electronic device Whether it has the Wi-Fi parameter negotiation capability, including: receiving the device list information sent by the AP device, where the device list information includes the capability information of the electronic device accessing the AP device. In the device list information, query the first capability information of the second electronic device corresponding to the MAC address of the Wi-Fi interface, and determine whether the first capability information includes the Wi-Fi parameter negotiation capability.
  • the first electronic device and the second electronic device access the Wi-Fi network provided by the same wireless access point AP device, and use the MAC address of the Wi-Fi interface to query the second electronic device Whether it has the Wi-Fi parameter negotiation capability, including: sending a capability query request to the AP device, where the capability query request carries the MAC address of the Wi-Fi interface, and the capability query request is used to request to query whether the second electronic device has Wi-Fi parameter negotiation ability.
  • a capability query response sent by the AP device is received, where the capability query response is used to indicate whether the second electronic device has the Wi-Fi parameter negotiation capability.
  • the electronic device when the processor reads the computer instructions from the memory, the electronic device also causes the electronic device to perform the following operations: send a registration request to the AP device, where the registration request is used to request to register the second electronic device of the first electronic device.
  • Capability information the second capability information includes the Wi-Fi parameter negotiation capability.
  • the second electronic device has the Wi-Fi parameter negotiation capability, perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters; including: sending the Wi-Fi parameters to the AP device
  • the negotiation request, the Wi-Fi parameter negotiation request carries the identifier of the second electronic device and the first radio frequency parameter; the first radio frequency parameter includes the idle radio frequency frequency band in the radio frequency frequency band supported by the first electronic device, and the channel supported by the first electronic device idle channel.
  • the Wi-Fi parameter negotiation response carries target radio frequency parameters, and the target radio frequency parameters include the target radio frequency frequency band selected by the second electronic device from the idle radio frequency frequency bands and The target channel selected from the idle channels.
  • the second electronic device has the Wi-Fi parameter negotiation capability, perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters; including: sending Wi-Fi parameters to the second electronic device In the Fi parameter negotiation request, the Wi-Fi parameter negotiation request carries the first radio frequency parameter; the first radio frequency parameter includes an idle radio frequency band in the radio frequency band supported by the first electronic device, and an idle channel in the channel supported by the first electronic device.
  • using the target radio frequency parameters to establish a Wi-Fi direct connection channel with the second electronic device includes: sending a connection establishment request on the target radio frequency frequency band and the target channel, where the connection establishment request is used to request communication with the second electronic device.
  • the electronic device establishes a Wi-Fi Direct channel.
  • the connection establishment response sent by the second electronic device is received, and the establishment of the Wi-Fi direct connection channel is completed.
  • embodiments of the present application provide an electronic device, including: a processor and a memory; the memory is coupled to the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions, when the processor reads from the memory
  • the computer instructions cause the electronic device to perform the following operation: in response to the first operation, send a device query request to the wireless access point AP device, where the device query request is used to request to query a device with Wi-Fi parameter negotiation capability.
  • Receive a device query response sent by the AP device where the device query response carries the MAC address of the Wi-Fi interface of the second electronic device, and the second electronic device has Wi-Fi parameter negotiation capability.
  • the MAC address of the Wi-Fi interface perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters.
  • a Wi-Fi direct connection channel is established with the second electronic device using the target radio frequency parameters.
  • the electronic device when the processor reads the computer instructions from the memory, the electronic device also causes the electronic device to perform the following operations: send a registration request to the AP device, where the registration request is used to request to register the second electronic device of the first electronic device.
  • Capability information the second capability information includes the Wi-Fi parameter negotiation capability.
  • the Fi parameter negotiation request carries the identifier of the second electronic device and the first radio frequency parameter; the first radio frequency parameter includes an idle radio frequency band in the radio frequency band supported by the first electronic device and an idle channel in the channels supported by the first electronic device.
  • the receiving AP device forwards the Wi-Fi parameter negotiation response sent by the second electronic device, the Wi-Fi parameter negotiation response carries the target radio frequency parameter, and the target radio frequency parameter includes the target radio frequency frequency band selected by the second electronic device from the idle radio frequency frequency band and the Selected target channel among idle channels.
  • using the MAC address of the Wi-Fi interface to perform Wi-Fi parameter negotiation with the second electronic device to obtain target radio frequency parameters including: sending a Wi-Fi parameter negotiation request to the second electronic device, The Wi-Fi parameter negotiation request carries the first radio frequency parameter; the first radio frequency parameter includes an idle radio frequency frequency band in the radio frequency frequency band supported by the first electronic device, and an idle channel in the channel supported by the first electronic device.
  • using the target radio frequency parameters to establish a Wi-Fi direct connection channel with the second electronic device includes: sending a connection establishment request on the target radio frequency frequency band and the target channel, where the connection establishment request is used to request communication with the second electronic device.
  • the electronic device establishes a Wi-Fi Direct channel.
  • the connection establishment response sent by the second electronic device is received, and the establishment of the Wi-Fi direct connection channel is completed.
  • an embodiment of the present application provides an electronic device, the electronic device has the function of implementing the connection establishment method described in the first aspect and any one of the possible implementation manners; or, the electronic device has the function of implementing The functions of the connection establishment method described in the above second aspect and any of the possible implementation manners.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the embodiments of the present application provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to perform the above-mentioned first aspect and any one of the possible implementations.
  • the connection establishment method described in any one of the above, or the electronic device is caused to execute the connection establishment method described in any one of the above-mentioned second aspect and any one of the possible implementation manners.
  • an embodiment of the present application provides a computer program product, which, when the computer program product is run on an electronic device, causes the electronic device to perform any one of the above-mentioned first aspect and any of the possible implementation manners.
  • the connection establishment method, or the electronic device is caused to execute the connection establishment method described in any one of the second aspect and any of the possible implementation manners.
  • an embodiment of the present application provides a circuit system, where the circuit system includes a processing circuit, and the processing circuit is configured to execute the connection establishment method described in the first aspect and any one of the possible implementations; or, is configured to perform the connection establishment method as described in the above second aspect and any one of the possible implementations.
  • an embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, the at least one interface circuit is configured to perform a transceiving function, and send instructions to the at least one
  • at least one processor executes the connection establishment method described in the first aspect and any one of the possible implementations; or, at least one processor executes the second aspect and any one of the possible implementations.
  • the connection establishment method described in the implementation manner is configured to perform a transceiving function, and send instructions to the at least one.
  • FIG. 1 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart 1 of a data transmission method provided by an embodiment of the present application.
  • FIG. 4 is a second schematic flowchart of a data transmission method provided by an embodiment of the present application.
  • FIG. 5 is a third schematic flowchart of a data transmission method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a handshake interaction flow of a Hilink session provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart 1 of a connection establishment method provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a message format provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram 1 of an interface provided by an embodiment of the present application.
  • FIG. 10 is a second schematic flowchart of a connection establishment method provided by an embodiment of the present application.
  • FIG. 11 is a third schematic flowchart of a connection establishment method provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram 2 of an interface provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a connection establishment apparatus provided by an embodiment of the present application.
  • connection establishment method and electronic device provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
  • Huawei Hilink is an open ecosystem of intelligent hardware. Electronic devices can be added to the Huawei Hilink ecosystem through hardware access or cloud access to realize the interconnection of electronic devices.
  • the Hilink ecosystem can also be described as an intelligent network, and the intelligent network includes a wireless access point (AP) device for providing a wireless network, and at least one electronic device for accessing the AP device.
  • the AP device is, for example, router.
  • Electronic devices can also be described as connected devices. Electronic devices can access AP devices based on Hilink ecological related protocols.
  • Hilink-related protocols include, for example, a constrained application protocol (constrained application protocol, CoAP), a universal plug and play (universal plug and play, UPnP) protocol, and the like.
  • Hilink ecological related protocols can be used for intelligent discovery and network configuration process.
  • the Hilink router can broadcast the functions supported by the connected electronic devices based on the Hilink ecological-related protocol, so that other electronic devices can discover the electronic devices with the required functions. If the electronic device 1 needs to perform wireless screen projection, a broadcast signal is received, and it is found that the electronic device 2 supports the wireless screen projection function. Further, it is possible to request to establish a connection with the electronic device 2 to realize wireless screen projection.
  • Hilink routers can also configure the network of connected electronic devices, and routers that support network configuration can be used as intelligent gateway devices in the Zhilian network.
  • connection establishment method uses Hilink ecology as an example to describe the connection establishment method provided by the embodiment of the present application, and the connection establishment method can also be applied to other ecological environments that support intelligent connection, such as Huawei Ecological Chain.
  • NFC near field communication
  • the NFC function is based on short-range wireless communication technology, which enables point-to-point communication between electronic devices. For example, linking two NFC-enabled devices enables peer-to-peer data transfer. Further, the NFC function can also assist electronic devices to quickly establish a Bluetooth (bluetooth, BT) connection, exchange business cards, and data communication.
  • Bluetooth blue, BT
  • the electronic device with the NFC function can also store part of its own information in the NFC module, and realize the interaction of the information of the NFC module through the "touch" function. For example, by pre-installing the merchant information in the NFC module, the electronic device can achieve fast payment when it is close to the NFC sensing area. For another example, two electronic devices acquire the NFC tag in the NFC module of the other party by touching each other. For example, parameter information such as a preset Bluetooth socket (socket) address is included in the NFC tag, and then the electronic device can realize the establishment of Bluetooth communication based on the Bluetooth socket address.
  • a preset Bluetooth socket (socket) address is included in the NFC tag, and then the electronic device can realize the establishment of Bluetooth communication based on the Bluetooth socket address.
  • Wi-Fi peer-to-peer Peer to Peer, P2P
  • Wi-Fi P2P was proposed by the Wi-Fi Alliance to define how two Wi-Fi electronic devices connect and communicate without routing.
  • electronic devices that support Wi-Fi P2P form a peer-to-peer work group (P2P group), including a peer-to-peer work group owner (P2P group owner) and a peer-to-peer client (P2P client).
  • P2P group owner a peer-to-peer work group owner
  • P2P client peer-to-peer client
  • the electronic device as the P2P group owner needs to have the function of traditional routing, such as being able to control the communication of other electronic devices (P2P clients) in the Wi-Fi P2P working group as a soft AP (soft AP) device.
  • the electronic device as the P2P work group client (group client, GC) needs to be connected to the electronic device as the P2P group owner to form a work group that can communicate.
  • the process of the P2P electronic device discovering and constructing a working group includes a scan phase and a find phase. Specifically, in the scanning phase, the electronic device sends a probe request frame. After that, the electronic device enters the search phase. In the seek phase, the electronic device switches between the search state (search state) of sending probe request frames and the listen state (listen state) of listening for probe request frames and sending probe response frames until it scans a nearby P2P equipment, to build a P2P working group. In the process of building a P2P working group, it also includes negotiating and determining the electronic device as the P2P group owner, and the process of exchanging security configuration information between electronic devices.
  • FIG. 1 is a schematic diagram of a communication system to which a connection establishment method provided by an embodiment of the present application is applied.
  • the communication system includes a first electronic device 100 , a second electronic device 200 and a wireless access point (access point, AP) device 300 .
  • the first electronic device 100 and the second electronic device 200 are connected to the wireless network provided by the AP device 300 .
  • the first electronic device 100 may be, for example, a personal computer (personal computer, PC), a mobile phone (mobile phone), a tablet computer (Pad), a notebook computer, a desktop computer, a notebook computer, a virtual reality (VR) Terminal equipment, augmented reality (AR) terminal equipment, wireless terminal in industrial control, wireless terminal in self driving, wireless terminal in remote medical (remote medical), smart grid Wireless terminals in smart grid, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, wearable devices, in-vehicle devices and other terminals equipment.
  • the specific form of the first electronic device 100 is not particularly limited in this embodiment of the present application.
  • the second electronic device 200 may be, for example, a PC, a mobile phone, a tablet computer, a notebook computer, a desktop computer, a notebook computer, a VR terminal device, an AR terminal device, a wireless terminal in industrial control, and a wireless terminal in unmanned driving.
  • wireless terminals in telemedicine wireless terminals in smart grids, wireless terminals in transportation security, wireless terminals in smart cities, wireless terminals in smart homes, wearable devices, vehicle-mounted devices and other terminal equipment.
  • the specific form of the second electronic device 200 is not particularly limited in this embodiment of the present application.
  • wireless communication technology can be used between the first electronic device 100 and the second electronic device 200 to implement wireless screen projection and file sharing.
  • the first electronic device 100 is the source device, and the second electronic device 200 is the target device.
  • the first electronic device 100 uses the second electronic device 200 to perform wireless screen projection.
  • the first electronic device 100 sends files of various types and/or formats to the second electronic device 200 for sharing, for example, the first electronic device 100 sends a video file to the second electronic device 200 for sharing.
  • the AP device 300 may be, for example, a wireless router for providing a Wi-Fi network.
  • the first electronic device 100 and the second electronic device 200 are connected to the Wi-Fi network provided by the AP device 300, and the AP device 300 can forward the signals sent by the first electronic device 100 and the second electronic device 200.
  • the AP device 300 is, for example, a Hilink router, and the first electronic device 100 and the second electronic device 200 are connected devices connected to the Hilink router.
  • the embodiment of the present application takes the Hilink ecological related protocol supporting intelligent discovery and network configuration as an example to describe the connection establishment method. It can be understood that, the connection establishment method provided by the embodiment of the present application may also be applicable to other standard protocols or proprietary protocols that support intelligent discovery and network configuration.
  • the first electronic device 100 and the second electronic device 200 in this embodiment of the present application may be implemented by different devices.
  • the first electronic device 100 and the second electronic device in the embodiment of the present application may be implemented by the electronic device in FIG. 2 .
  • FIG. 2 shows a schematic structural diagram of an electronic device.
  • the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, key 190, motor 191, indicator 192, camera 193, display screen 194, and user identification module (subscriber identification module, SIM) card interface 195 Wait.
  • SIM subscriber identification module
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device.
  • the electronic device may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the structure of the second device 200 may not include the mobile communication module 150 , the motor 191 , the SIM card interface 195 and the like.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device.
  • the electronic device may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the electronic device can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the electronic device.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the electronic device implements peer-to-peer data transfer via NFC. For example, if the electronic device 1 has the NFC function enabled, and is close to the NFC sensing area of the electronic device 2 , the file can be quickly shared to the electronic device 2 .
  • the wireless communication module 160 can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite systems
  • frequency modulation frequency modulation
  • FM near field communication technology
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through
  • the antenna 1 of the electronic device is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device realizes the display function through the GPU, the display screen 194, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the wireless communication module 160 can be used to connect with other large-screen electronic devices, and based on the wireless screen projection technology, the display content can be sent to the large-screen electronic device for display.
  • the electronic device can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 . Wherein, the audio module may include a speaker, a receiver, a microphone and an earphone interface. In some embodiments, the electronic device may implement audio functions through the audio module 170, speakers, receivers, microphones, headphone jacks, and application processors. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
  • a pressure sensor may be provided on the display screen 194 . When a touch operation acts on the display screen 194, the electronic device can calculate the touched position according to the detection signal of the pressure sensor.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device may receive key input and generate key signal input related to user settings and function control of the electronic device.
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the electronic device interacts with the network through the SIM card to realize functions such as call and data communication.
  • the following will take the first electronic device 100 as a mobile phone with the structure shown in FIG. 2 , the second electronic device 200 as a PC with the structure shown in FIG. 2 , and the AP device 300 as a router providing a Wi-Fi network as an example.
  • the connection establishment method provided by the application embodiment will be described.
  • wireless communication technology can be used to realize data transmission between the mobile phone and the PC, for example, data transmission in scenarios such as wireless screen projection, audio file sharing, and video file sharing.
  • mobile phone and PC through Miracast, digital living network alliance (DLNA), (Wireless communication technology developed by Apple) and other standard protocols or private protocols, realize the transmission and display of multimedia (such as audio, video, pictures, etc.) content on different multimedia terminals through wireless local area network connection.
  • DLNA digital living network alliance
  • Apple Wireless communication technology developed by Apple
  • the current method for wireless data transmission between a mobile phone and a PC includes S301-S304.
  • the mobile phone discovers the PC.
  • mobile phones and PCs generally support one or more functions among the NFC touch discovery function, the Bluetooth proximity discovery function, and the proximity discovery function based on the 802.11 protocol.
  • the mobile phone and the PC enable the wireless local area network (WLAN) function and the Bluetooth function
  • the PC enables an application for computer management, such as a computer housekeeper.
  • the mobile phone touches the NFC sensing area on the PC the mobile phone and the PC discover the peer device, and through the following steps S302-S304, a Wi-Fi connection is established between the mobile phone and the PC.
  • WLAN wireless local area network
  • the mobile phone and the PC discover each other's peer devices, and the mobile phone pops up to prompt the user whether to establish a connection with the PC and/or the PC pops up to prompt the user whether to establish a connection with the mobile phone.
  • the mobile phone After detecting that the user clicks the confirmation operation, through the following steps S302 to S304, a Wi-Fi connection is established between the mobile phone and the PC.
  • the mobile phone and the PC establish a Bluetooth connection.
  • a Bluetooth connection needs to be established first, and then a Wi-Fi connection can be established based on the Bluetooth connection channel subsequently.
  • step S302 may be specifically implemented as steps S3021 to S3023.
  • the mobile phone and the PC can obtain the media access control (media access control, MAC) address of the Bluetooth module in the NFC tag of the other party after touching, so as to determine the Bluetooth communication required for establishing the Bluetooth socket The connected peer device. After that, create a Bluetooth socket connection, and trigger the Bluetooth module of the mobile phone and the Bluetooth module of the PC to establish a Bluetooth communication connection.
  • media access control media access control
  • MAC media access control
  • the PC performs Bluetooth authentication processing on the mobile phone.
  • the mobile phone and the PC after the mobile phone and the PC establish a socket connection, they cannot directly perform data interaction, and need to perform pairing and authentication procedures, such as pairing permission and key configuration, so that the other party acts as a trusted device. After that, data can be transferred to each other.
  • the key configuration is an optional step, and if password verification is not required, key configuration is not necessary.
  • the mobile phone and the PC negotiate Wi-Fi communication parameters based on the Bluetooth connection channel.
  • a Bluetooth connection session channel for Layer 2 network communication can be provided for use by Wi-Fi for socket connection.
  • step S303 may be specifically implemented as steps S3031 to S3033.
  • Wi-Fi socket connection is established between S3031, mobile phone and PC.
  • the mobile phone and the PC after the mobile phone and the PC establish a Bluetooth connection, they can negotiate or obtain the Wi-Fi hotspot parameter information of the opposite end and then perform a Wi-Fi socket connection.
  • the PC performs Wi-Fi authentication processing on the mobile phone.
  • an authentication process also needs to be performed, and the peer device is set as a trusted device to confirm the security of the current Wi-Fi socket session.
  • the parameter negotiation of the Wi-Fi P2P group is started. Specifically, the mobile phone sends the information on the list of radio frequency bands and channels currently available and supported by the mobile phone to the PC. The PC selects the appropriate radio frequency band and channel, creates a P2P soft AP, and sets its role as group owner.
  • a Wi-Fi connection is established between the mobile phone and the PC, and data transmission is performed.
  • the mobile phone and the PC after the mobile phone and the PC form a Wi-Fi P2P working group, they can perform data interaction based on the Wi-Fi service channel. For example, it handles business data flow and control information flow in the process of wireless screen projection or audio and video file sharing.
  • a Bluetooth connection needs to be established between the mobile phone and the PC, and then a Wi-Fi P2P working group can be established by exchanging Wi-Fi parameters based on the Bluetooth connection.
  • the link establishment delay is large, and the user waits for a long time, which affects the user experience.
  • an embodiment of the present application provides a connection establishment method. After the mobile phone and the PC are connected to the Wi-Fi network provided by the same AP device, the Wi-Fi parameters can be exchanged directly based on the Wi-Fi network to create a Wi-Fi P2P Working group to realize data exchange. Thereby, the problem of large delay caused by the Bluetooth connection is avoided.
  • connection establishment method provided by the embodiment of the present application by taking a wireless screen projection scenario as an example.
  • the mobile phone and PC are connected to the router, the router is used as a Hilink gateway (gateway), and the mobile phone and PC are used as a Hilink device (device).
  • the router is used as a Hilink gateway (gateway)
  • the mobile phone and PC are used as a Hilink device (device).
  • Hilink pairing is performed automatically after the mobile phone and the PC are connected to the Wi-Fi network provided by the Hilink router.
  • Hilink routers can obtain device information of mobile phones and PCs through Hilink-related protocols.
  • Hilink-related protocols include, for example, a constrained application protocol (constrained application protocol, CoAP), a universal plug and play (universal plug and play, UPnP) protocol, and the like.
  • the device information includes, for example, a media access control address (MAC) address, a device name, a device type, an identifier of a device manufacturer, a service capability set, and the like.
  • the service capability set includes, for example, support for network configuration synchronization, Wi-Fi hotspot parameter negotiation, and the like.
  • the ability of Wi-Fi hotspot parameter negotiation indicates the ability of the device to support WLAN channels, the Wi-Fi radio frequency parameters such as the radio frequency band and channel list supported by the Wi-Fi P2P group client (GC), and the service set identifier (SSID) ) parameter synchronization and negotiation capabilities. It should be noted that the Wi-Fi hotspot parameter negotiation capability can be used to support services such as wireless screen projection and file sharing, for example.
  • FIG. 6 a schematic diagram of the handshake interaction flow for the device to access the Hilink gateway and establish a Hilink session with the Hilink gateway.
  • the device is a mobile phone or a PC, and the following steps take the interaction process between the mobile phone and the router as an example for description.
  • the device searches for a gateway service.
  • the access gateway is an intelligent gateway, such as Hilink gateway, as an example for description.
  • the gateway sends a search response to the device.
  • the router After receiving the message for searching for the gateway device, the router sends a response message to the mobile phone, notifying that the mobile phone itself is the gateway device.
  • the device sends a session application request to the gateway.
  • the mobile phone After receiving the response message sent by the router, the mobile phone confirms that the router is a Hilink gateway device and provides a Wi-Fi network, and then sends a session application request to the router to exchange device information to access the Wi-Fi network.
  • the gateway sends a session request response to the device.
  • the router After receiving the session application request packet, the router sends a session application response packet to the mobile phone to establish a session channel.
  • the device calculates the encryption key.
  • the gateway calculates the encryption key.
  • the mobile phone and the router need to calculate encryption keys respectively.
  • enc_key PBKDF2(PSK, sn1
  • sn is used to represent the serial number (SN) of the product, and the SN code is the unique identification code corresponding to the device.
  • the device sends a registration request to the gateway.
  • the mobile phone sends a registration request to the gateway device for registering device information. Then the router calls the corresponding device according to the device information.
  • the existing Hilik interface for registering device information. For example, extending the Wi-Fi P2P parameter negotiation interface.
  • the "st" field is used to indicate filtering conditions, such as the set of service capabilities supported by itself.
  • the "WifiCfg” field is used to indicate that the device is capable of Wi-Fi hotspot parameter negotiation, that is, the mobile phone supports Wi-Fi parameter synchronization and negotiation. Then, the subsequent router can assist the mobile phone and the PC to synchronize and negotiate Wi-Fi parameters based on the mobile phone's ability to negotiate Wi-Fi hotspot parameters, thereby realizing wireless screen projection.
  • the gateway sends a registration response to the device.
  • the router After receiving the registration request message, the router sends a registration response message to the mobile phone to complete the registration of the device information of the mobile phone.
  • the device sends a heartbeat packet to the gateway.
  • the mobile phone and the router are connected based on the socket. If the socket connection is disconnected, the data transmission between the mobile phone and the router will fail. Therefore, the router needs to confirm that the socket connection is not disconnected. Based on this, the mobile phone regularly sends heartbeat packets to the router to notify the router that the mobile phone is currently online to ensure the validity of the connection between the mobile phone and the router.
  • a heartbeat packet is shown as follows.
  • the gateway sends a heartbeat packet receiving response to the device.
  • the router determines that the mobile phone is online, sends a heartbeat packet to receive a response, and notifies the mobile phone that the router is currently online.
  • a heartbeat packet reception response message is shown as follows.
  • the mobile phone and the PC use the method shown in Figure 6 to access the Wi-Fi network provided by the same router.
  • a Wi-Fi P2P working group can be established for data transmission.
  • FIG. 7 is a schematic flowchart of a connection establishment method provided by an embodiment of the present application.
  • the source device for screen projection is a mobile phone
  • the target device for screen projection is a PC
  • the mobile phone uses the PC to display video images.
  • the method includes S701-S707.
  • the mobile phone obtains the NFC parameter information of the PC, including the MAC address of the Wi-Fi interface.
  • the PC includes a radio frequency identification (radio frequency identification, RFID) module
  • the mobile phone turns on the NFC function, and is close to the NFC sensing area of the PC, and can read the NFC parameter information of the PC, such as the parameter information in the NFC tag, to obtain The MAC address of the PC Wi-Fi interface.
  • the MAC address of the Wi-Fi interface in the NFC parameter information may be preconfigured in the NFC tag of the PC.
  • the PC is powered on and starts an application to activate the Wi-Fi interface, write the MAC address of the Wi-Fi interface into the NFC tag.
  • the data in the NFC tag is stored in the form of an NFC data exchange format (NFC data exchange format, NDEF) message (message).
  • NFC data exchange format NFC data exchange format
  • NDEF NFC data exchange format
  • each message can be composed of multiple records (Records) (which can also be described as multiple sub-packets).
  • Records records
  • FIG. 8 a message format is exemplarily given.
  • the NDEF message includes header sub-packet, NDEF Record 0 sub-packet and NDEF Record 1 sub-packet.
  • the NDEF Record 0 subpackage is used to save the uniform resource locator (URL).
  • the URL can open the website of the application currently using the NFC function, and then obtain the introduction of the application. For example, suppose that the mobile phone is to transmit data by touching the PC NFC sensing area, and the mobile phone does not support the "one-touch transfer" function. This URL points to the website that introduces the one-touch transfer function. When the mobile phone touches the NFC sensing area of the PC, the mobile phone displays the corresponding website through this URL, so that the user can view the relevant introduction.
  • the NDEF Record 1 subpacket includes a bit flag (bit flag) field, a type length (type length) field, a payload length (payload length) field, an ID length (ID length) field, and a payload type (payload length) field. type) field, payload ID (payload ID) field, and payload data (payload data) field.
  • the payload data field includes a version number subfield, a Bluetooth interface MAC address subfield, a Wi-Fi interface MAC address subfield, a random number subfield, a model subfield, and a submodel subfield.
  • the Bluetooth interface MAC address subfield occupies 6 bytes and is used to indicate the MAC address of the Bluetooth interface of the PC.
  • the mobile phone can establish a Bluetooth connection with the PC based on the MAC address.
  • the Wi-Fi interface MAC address subfield occupies 6 bytes and is used to indicate the MAC address of the PC's Wi-Fi interface.
  • the phone can establish a Wi-Fi connection with the PC based on this MAC address.
  • the MAC address of the Wi-Fi interface is directly indicated in the NFC parameter information, so that the mobile phone and the PC can establish a Wi-Fi connection without establishing a Bluetooth connection, but can directly establish a Wi-Fi connection based on the Wi-Fi
  • the MAC address of the Fi interface establishes a Wi-Fi connection.
  • the random number subfield occupies 32 bytes, and its value is the hash value obtained after hash operation based on the product serial number (SN) of the PC.
  • the SN number is the PC identification code, which is the unique machine code of the PC.
  • the mobile phone determines that the device corresponding to the MAC address of the Wi-Fi interface is a neighboring device that supports the Wi-Fi parameter negotiation capability.
  • the router broadcasts the device information registered by the access device during the registration process based on the local security policy, and synchronizes it to each device connected in the local area network. Furthermore, after the mobile phone monitors the broadcast, it can save the device list information connected to the router, and based on the device list information, it is possible to discover neighboring devices in the local area network. Therefore, after receiving the MAC address of the Wi-Fi interface, it is possible to discover the PC that supports the Wi-Fi parameter negotiation capability in the neighboring device.
  • the Wi-Fi parameter negotiation capability includes, for example, the Wi-Fi hotspot parameter negotiation capability.
  • the mobile phone after obtaining the MAC address of the PC Wi-Fi interface, the mobile phone needs to determine whether the PC is a device that supports the Wi-Fi hotspot parameter negotiation capability.
  • the PC device with the Wi-Fi hotspot parameter negotiation capability can communicate with the mobile phone. Wirelessly mirror and/or share files across devices to and from your PC.
  • the mobile phone can use the locally cached device list information to query whether the device corresponding to the MAC address of the Wi-Fi interface supports the Wi-Fi hotspot parameter negotiation capability. If the device corresponding to the MAC address of the Wi-Fi interface is not queried in the local device list, a query request can be sent to the router, the router will query, and the query result sent by the router can be received.
  • the mobile phone may send a query request message to the router, which is used to query the router for a specified device identifier, a specified MAC address, or a device list with a specified capability.
  • the "st" field is used to indicate the filtering criteria
  • the "WifiCfg” field is used to indicate the query for a device with Wi-Fi hotspot parameter negotiation capability.
  • the device supports wireless screen projection and/or cross-device file sharing, it needs to support the Wi-Fi hotspot parameter negotiation capability. Therefore, by using this packet, the device that supports the screen projection capability can be queried.
  • the router after receiving the query request message, the router will send a query response message to the mobile phone, and the query response message carries the query result.
  • a query response message is shown below.
  • the "sn" field is used to indicate the SN number of the device with the Wi-Fi hotspot parameter negotiation capability. For example, 00E0FC018008.
  • the mobile phone can determine the corresponding device according to the SN number.
  • the SN number field can also be filled with a MAC address, and the MAC address can also be used to indicate a unique corresponding device.
  • the mobile phone may also acquire the MAC address of the Bluetooth interface included in the NFC parameter information of the PC. Then, in step S702, if the process of the mobile phone itself and the router inquiring the neighboring devices that support the Wi-Fi hotspot parameter negotiation capability fails, that is, the corresponding PC cannot be inquired, the mobile phone uses the MAC address of the Bluetooth interface to establish with the PC. Bluetooth connection, and then establish a Wi-Fi P2P working group. Wherein, for establishing a Wi-Fi P2P working group based on a Bluetooth connection, reference may be made to the methods shown in Figs.
  • the mobile phone displays a confirmation interface, detects the confirmation operation, and confirms that the connection with the PC is established.
  • the mobile phone finds a PC capable of screen projection through the above step S702, the user needs to confirm whether the PC is the target screen projection device. If yes, execute the following screen projection parameter negotiation process. If not, the above steps S701 and S702 need to be repeated again to search for the PC again, or give up the screen projection operation.
  • the mobile phone displays a notification bar 91 for prompting the user that a screen-casting connection is currently being established, and the user confirms whether to allow screen-casting on the PC.
  • XXX in "PC (XXX)" represents the content corresponding to the prompting method.
  • the mobile phone sends a parameter negotiation request to the router, where the parameter negotiation request carries the PC identifier and the first radio frequency parameter.
  • the first radio frequency parameter includes a radio frequency band supported by the mobile phone and a currently applicable radio frequency band and channel in the channel.
  • the PC identifier includes, for example, the MAC address of the PC, or a predefined PC identifier, etc.
  • the router determines the target PC to send the parameter negotiation request according to the PC identifier, and the subsequent mobile phone uses the target PC to perform wireless screen projection.
  • the mobile phone is used as the screen projection source device
  • the PC is used as the screen projection target device.
  • the target device identifier and/or the source device identifier are carried in the parameter negotiation request to identify the peer device.
  • the mobile phone determines to establish a connection with the PC, it needs to negotiate Wi-Fi P2P connection parameters to establish a Wi-Fi P2P working group, and the mobile phone needs to send the radio frequency parameters supported and available to the PC.
  • the router is set up with two-layer isolation, which does not allow direct communication between the mobile phone and the PC. Instead, the router forwards the signals between the mobile phone and the PC, thereby realizing the authority of the devices accessing the router network. and traffic audits. Therefore, the mobile phone sends the radio frequency parameters supported and available to the router, and the router forwards the received radio frequency parameters to the corresponding target PC based on the target PC identifier carried in the parameter negotiation request. Further, the target PC selects and determines the radio frequency parameters to be applied based on the radio frequency parameters.
  • the request message is as follows:
  • the "METHOD" field is used to indicate the method for transmitting parameters of the interface, for example, two methods including GET and POST are included.
  • the GET method transmits parameters through a uniform resource locator (URL).
  • the POST method places parameters in the message body for transmission.
  • the GET method and the POST method may perform transmission control protocol (transmission control protocol, TCP) packet transmission based on a hypertext transfer protocol (hypertext transfer protocol, HTTP).
  • TCP transmission control protocol
  • HTTP hypertext transfer protocol
  • the "PATH" field is used to indicate the request path of the interface.
  • the "BODY" field is optional and used to indicate the body of the request.
  • the BODY field is in JSON message format, and the encoding method is UTF-8.
  • the BODY field contains subfields of information such as the available radio frequency band in the own Wi-Fi module and the list of available channels in the corresponding frequency band, and/or the source device identifier and the target device identifier.
  • the device identifier is, for example, the device SN.
  • the "HTTP/1.1" field is related to the specific bearer protocol. For example, this field is included in the message when the transmission is performed based on the HTTP protocol, and this field is not included in the message when the transmission is performed based on the CoAP protocol.
  • Example 1 The request message is transmitted based on the HTTP protocol or the HTTPS protocol.
  • Example 2 Based on CoAP transmission of request messages, and using transport layer security (TLS) or datagram transport layer security (DTLS) to negotiate a shared key to ensure transmission confidentiality and data integrity.
  • TLS transport layer security
  • DTLS datagram transport layer security
  • TLS secure sockets layer
  • SSL secure sockets layer
  • the router forwards the parameter negotiation request to the target PC according to the PC identifier.
  • the router after receiving the parameter negotiation request, forwards the negotiation request to the target PC corresponding to the PC ID based on the PC ID.
  • the PC selects the target radio frequency parameter from the first radio frequency parameter, and creates a hotspot.
  • the PC after receiving the first radio frequency parameter sent by the mobile phone, the PC selects the optimal radio frequency frequency band and channel as the target radio frequency parameter according to the first radio frequency parameter and the radio frequency parameter supported by itself and currently available. For example, the PC selects the RF frequency band and channel with the best expected signal quality from the available RF frequency bands and channels supported by both itself and the mobile phone. For another example, the PC selects the radio frequency frequency band and channel with the smallest delay among the available radio frequency frequency bands and channels supported by both itself and the mobile phone.
  • the PC after determining the target radio frequency parameters, the PC creates a hotspot, uses itself as a soft AP (soft AP) device, and configures the radio frequency parameters of the Wi-Fi P2P working group of the radio frequency interface, so that subsequent mobile phones can access
  • the radio frequency interface transmits screen projection data.
  • the PC as a soft AP device, sends a beacon frame according to a preset period based on the target radio frequency parameters, so that the mobile phone can discover the soft AP device.
  • the PC may also be configured with an SSID of the hotspot, and subsequent mobile phones use the SSID to access the PC hotspot.
  • the PC can be individually configured to generate the SSID of the hotspot, and send the SSID to the mobile phone. Or, preconfigure the SSID of the hotspot, configure the SSID in the PC and the mobile phone, and directly obtain the preset SSID for configuration when the PC needs to configure the SSID of the hotspot. Then, the PC does not need to send the SSID to the mobile phone, and the mobile phone can determine the SSID of the corresponding hotspot according to the preconfigured SSID.
  • the PC sends a parameter negotiation response to the router, where the parameter negotiation response carries the target radio frequency parameter.
  • the PC after determining the target radio frequency parameters, the PC sends the target radio frequency parameters to the router along the path of receiving the parameter negotiation request, and the router forwards the parameters to the mobile phone, so that the PC and the mobile phone can establish a Wi-Fi P2P working group.
  • the parameter negotiation response may also carry the SSID and power value of the hotspot.
  • a parameter negotiation response message is shown as follows.
  • the "200 OK" field is used to indicate that the corresponding request has been successfully processed on the server. That is, the target radio frequency parameter selection has been performed.
  • the "BODY” field is used to carry the payload of the message, such as target radio parameters. BODY fields are in JSON message format and encoded in UTF-8.
  • the BODY field contains the frequency band and the corresponding channel information selected by the PC to create the hotspot, and/or the SSID, and/or the source device identifier and the target device identifier.
  • the device identifier is, for example, the device SN.
  • the router forwards the parameter negotiation response to the mobile phone.
  • the router after receiving the parameter negotiation response, forwards the parameter negotiation response to the corresponding mobile phone that sends the parameter negotiation request.
  • the parameter negotiation request may also carry the mobile phone identifier.
  • the parameter negotiation response sent by the PC carries the mobile phone identification, so after receiving the parameter negotiation response, the router can send the parameter negotiation response to the target mobile phone according to the mobile phone identification.
  • the mobile phone adds a new protocol interface for transmitting Wi-Fi negotiation parameters based on the Hilink ecological related protocol.
  • the mobile phone uses the Hilink session channel established with the router by the method shown in FIG. 6 to transmit the first radio frequency parameter, and receives the target radio frequency parameter determined by the PC, so as to realize the radio frequency parameter between the mobile phone and the PC. negotiate.
  • the embodiment of the present application can perform the parameter negotiation process based on the application layer protocol (ie, the Hilink ecological related protocol), and is not necessarily limited to the Bluetooth connection.
  • the mobile phone and the PC create a Wi-Fi P2P socket connection, and start to transmit data.
  • the mobile phone determines that the parameter negotiation is successful.
  • a probe request management frame is sent based on the 802.11 protocol, which is used to search for the beacon frame sent by the PC.
  • the authentication and association process is automatically triggered, a Wi-Fi P2P socket connection is created with the PC, and the transmission of screencast data is started.
  • the transmitted screen projection data includes, for example, video image information, keyboard and mouse information, and the like.
  • the router does not set up Layer 2 isolation in the local area network, and the mobile phone and the PC can communicate directly. Then, in the process of parameter negotiation between the mobile phone and the PC, it is not necessary to use the router to forward the parameters for negotiation.
  • the parameter negotiation process includes S704c-S706c.
  • the mobile phone sends a parameter negotiation request to the PC, where the parameter negotiation request carries the first radio frequency parameter.
  • the cell phone and the PC support a specific representational state transfer (REST) interface based on which the cell phone and PC can communicate directly.
  • the mobile phone receives the device list information broadcasted by the router, and obtains the IP address of the PC from the device list information.
  • the mobile phone searches an address resolution protocol (ARP) table according to the MAC address obtained in the above step S701, and determines the IP address of the PC according to the correspondence between the MAC address and the IP address in the ARP table. After that, the mobile phone uses the IP address to send a parameter negotiation request to the PC.
  • ARP address resolution protocol
  • REST is used to indicate the data interaction rules between the client and the server during the data transmission process.
  • the PC acts as the server of the REST interface
  • the mobile phone acts as the client of the REST interface.
  • the parameter negotiation request message is based on the UPnP protocol or CoAP, and is transmitted in the manner of HTTP(s)GET or HTTP(s)POST.
  • HTTP(s)GET or HTTP(s)POST the format of the parameter negotiation request message.
  • the PC selects the target radio frequency parameter from the first radio frequency parameter, and creates a hotspot.
  • the PC sends a parameter negotiation response to the mobile phone, and the parameter negotiation response carries the target radio frequency parameter.
  • the PC after receiving the parameter negotiation request directly sent by the mobile phone, the PC correspondingly directly replies with a parameter negotiation response.
  • step S705-step S706c for the remaining contents of step S705-step S706c, reference may be made to the relevant contents in step S705-step S706b shown in FIG. 7 above, which will not be repeated here.
  • the mobile phone can directly obtain the MAC address of its Wi-Fi interface in the NFC module of the PC, and use the MAC address of the Wi-Fi interface to establish a Wi-Fi connection with the PC.
  • Fi P2P working group for data transfer.
  • the mobile phone can also discover the PC without touching it through NFC, then the mobile phone can directly receive the PC selected by the user, determine the MAC address of the corresponding Wi-Fi interface, and establish a Wi-Fi P2P working group.
  • FIG. 11 shows yet another connection establishment method provided by this embodiment of the present application. As shown in FIG. 11, the method includes S1101-S1108.
  • the PC connects to the router and registers with the router.
  • the mobile phone is connected to the router and registered with the router.
  • the mobile phone and the PC are connected to the Wi-Fi network provided by the same router.
  • search for Hilink gateway to register based on Hilink ecological related protocols.
  • the router is a Hilink gateway, after the mobile phone and PC are connected to the router, they directly register their supported capabilities and interface information with the router.
  • steps S1101 to S1102 reference may be made to the relevant contents in the foregoing steps S601 to S610, which will not be repeated here.
  • the mobile phone displays the screen-casting interface, detects the user's operation of searching for the screen-casting device, and searches for the screen-casting device.
  • the mobile phone sends a screen projection device query request to the router.
  • the router sends the screen-casting device query result to the mobile phone.
  • the mobile phone displays a screen-casting device selection interface, detects an operation of the user selecting a screen-casting device, and determines that the screen-casting device is a PC.
  • the mobile phone in steps S1103 to S1106, after detecting the user's screencasting operation, the mobile phone starts to search for neighboring devices that can be used for screencasting. For example, send a query request to the router. After the router receives the query request, based on the registration information of the device connected to the router, it queries the device that supports the Wi-Fi hotspot parameter negotiation capability, and sends the query result to the mobile phone.
  • the query result includes the MAC address of the Wi-Fi interface of the device. After the mobile phone receives the query result, the user confirms whether to use the queried device for screencasting.
  • the mobile phone monitors the neighbor device information that the router changes and synchronizes, and obtains the device list information. Then, according to the device list information, the mobile phone directly queries the screen projection device that supports the Wi-Fi hotspot parameter negotiation capability and the MAC address of the corresponding Wi-Fi interface.
  • the mobile phone detects that the user clicks on the control 121 and determines that the user needs to project the currently displayed video screen.
  • the mobile phone displays an interface 1202 as shown in (b) in FIG. 12 , starts to search for screencasting devices that can be used for screencasting, and displays prompt content 122 for prompting the user that the mobile phone is currently searching for a device.
  • the mobile phone displays an interface 1203 as shown in (c) of FIG. 12 , which is used to receive the operation of the user selecting the screen-casting device.
  • the mobile phone detects the operation of the user clicking on the device name 123 on the interface 1203, and determines that the screen-casting device is a PC.
  • the mobile phone and the PC create a Wi-Fi P2P socket connection, and start to transmit data.
  • step S1107 and step S1108 for the content of step S1107 and step S1108, reference may be made to the content of step S704a-step S707 shown in FIG. 7, or the related content of step S704c-step S707 shown in FIG. 10, which will not be repeated here.
  • the mobile phone can also obtain the MAC address of the Wi-Fi interface of the PC, and directly establish a Wi-Fi P2P working group with the PC based on the MAC address of the Wi-Fi interface, which improves the performance and stability of the chain construction. Improve user experience.
  • the above-mentioned first electronic device, the second electronic device and the AP device include corresponding hardware structures and/or software modules for executing each function.
  • the embodiments of the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Experts may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present application.
  • the electronic device may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 13 is a schematic structural diagram of a connection establishment apparatus provided by an embodiment of the present application.
  • the connection establishment apparatus 1300 includes: a transceiver module 1301 and a processing module 1302 .
  • connection establishment apparatus 1300 may be used to implement the functions of the first electronic device involved in the above method embodiments.
  • the connection establishing apparatus 1300 may be the first electronic device itself, or may be a functional unit or chip in the first electronic device, or a device matched with the first electronic device.
  • the transceiver module 1301 is configured to support the connection establishment apparatus 1300 to perform one or more steps in step S701, step S704a, step S706b, and step S707 shown in FIG. 7 in the embodiment of the present application; and/or, the transceiver module 1301 is further configured to support the connection establishment apparatus 1300 to perform steps S704c and S706c shown in FIG. 10 in the embodiment of the present application; and/or, the transceiver module 1301 is further configured to support the connection establishment apparatus 1300 to perform the steps shown in FIG. 11 in the embodiment of the present application.
  • Step S1102, Step S1104, Step S1105, Step S1107 and Step S1108; and/or, the transceiver module 1301 is further configured to support the connection establishment apparatus 1300 to perform other sending and receiving steps performed by the first electronic device in the embodiment of the present application.
  • the processing module 1302 is configured to support the connection establishment apparatus 1300 to perform one or more steps in step S702 and step S703 shown in FIG. 7 or FIG. 10 in the embodiment of the present application; and/or, the processing module 1302 further uses The support connection establishment apparatus 1300 performs steps S1103 and S1106 shown in FIG. 11 in this embodiment of the present application; and/or, the processing module 1302 is further configured to support the connection establishment apparatus 1300 to perform other processing performed by the first electronic device in the embodiment of the present application step.
  • connection establishment apparatus 1300 may be used to implement the functions of the second electronic device involved in the above method embodiments.
  • the connection establishment apparatus 1300 may be the second electronic device itself, or may be a functional unit or chip in the second electronic device, or a device matched with the second electronic device.
  • the transceiver module 1301 is configured to support the connection establishment apparatus 1300 to perform one or more steps in step S701, step S704b, step S706a and step S707 shown in FIG. 7 in the embodiment of the present application; and/or, the transceiver module 1301 is further configured to support the connection establishment apparatus 1300 to perform steps S704c and S706c shown in FIG. 10 in the embodiment of the present application; and/or, the transceiver module 1301 is further configured to support the connection establishment apparatus 1300 to perform the steps shown in FIG. 11 in the embodiment of the present application. Step S1101, Step S1107 and Step S1108; and/or, the transceiver module 1301 is further configured to support the connection establishment apparatus 1300 to perform other sending and receiving steps performed by the second electronic device in the embodiment of the present application.
  • the processing module 1302 is configured to support the connection establishment apparatus 1300 to perform step S705 shown in FIG. 7 in this embodiment of the present application; and/or, the processing module 1302 is further configured to support the connection establishment apparatus 1300 to perform step S705 in the embodiment of the present application. 2. Other processing steps performed by the electronic device.
  • the processing module 1302 may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • a processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • connection establishment apparatus 1300 shown in FIG. 13 may further include a storage module (not shown in FIG. 13 ), and the storage module stores programs or instructions.
  • the connection establishment apparatus 1300 shown in FIG. 13 can execute the connection establishment method provided by the embodiment of the present application.
  • the transceiver module may include a receiving module and a sending module.
  • the receiving module is used to receive signals sent by other devices.
  • the sending module is used to send signals to other devices.
  • the specific implementation manner of the transceiver module is not specifically limited in this embodiment of the present application.
  • connection establishment apparatus 1300 shown in FIG. 13 The operations and/or functions of each unit in the connection establishment apparatus 1300 shown in FIG. 13 are respectively in order to implement the corresponding flow of the connection establishment method provided by the above method side embodiment, and are not repeated here for brevity.
  • connection establishment apparatus 1300 shown in FIG. 13 For the technical effect of the connection establishment apparatus 1300 shown in FIG. 13 , reference may be made to the technical effect of the connection establishment method provided by the above method side embodiment, which will not be repeated here.
  • An embodiment of the present application further provides a chip system, including: a processor, where the processor is coupled with a memory, the memory is used to store a program or an instruction, and when the program or instruction is executed by the processor, the The chip system implements the method in any of the foregoing method embodiments.
  • the number of processors in the chip system may be one or more.
  • the processor can be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in memory.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this embodiment of the present application.
  • the memory may be a non-transitory processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip, or may be provided on different chips.
  • the arrangement of the memory and the processor is not particularly limited.
  • the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller).
  • controller unit, MCU it can also be a programmable logic device (PLD) or other integrated chips.
  • each step in the above method embodiments may be implemented by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the method steps disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • Embodiments of the present application also provide a storage medium for storing instructions used by the above-mentioned communication apparatus.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on the server, the server executes the above-mentioned relevant method steps to realize the connection in the above-mentioned embodiment. build method.
  • Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to implement the connection establishment method in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, the apparatus may specifically be a component or a module, and the apparatus may include one or more processors and a memory connected to each other; wherein, the memory is used to store a computer program, one or more A computer program includes instructions.
  • the instruction When the instruction is executed by one or more processors, it causes the apparatus to execute the connection establishment method in the above method embodiments.
  • the devices, computer-readable storage media, computer program products or chips provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided methods. The beneficial effects in the corresponding method will not be repeated here.
  • the steps of the methods or algorithms described in conjunction with the disclosure of the present application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions.
  • Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read only memory (erasable programmable ROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium well known in the art.
  • An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and storage medium may reside in an application specific integrated circuit (ASIC).
  • ASIC application specific integrated circuit
  • the disclosed method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of modules or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供连接建立方法及电子设备;涉及终端技术领域,能够直接利用Wi-Fi网络实现在电子设备间建链,提高建链性能,提升用户使用体验。该方法包括:第一电子设备获得第二电子设备的近场通信NFC标签中预置的无线保真Wi-Fi接口的媒体访问控制MAC地址,通过MAC地址与第二电子设备协商射频参数,利用确定的目标射频参数实现与第二电子设备建立Wi-Fi直连通道。

Description

连接建立方法及电子设备
本申请要求于2020年12月31日提交国家知识产权局、申请号为202011620420.1、发明名称为“连接建立方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉实施例及终端技术领域,尤其涉及一种连接建立方法及电子设备。
背景技术
随着电子设备的发展,电子设备之间的协同能力和交互能力也随之提升。比如,手机通过无线投屏技术,将显示内容发送至大屏设备进行显示,提高显示效果。又比如,手机和笔记本电脑之间能够通过近场通信(near field communication,NFC)功能进行音视频文件的分享。
但是,上述无线投屏技术和文件分享功能实现的过程中,需要先建立蓝牙连接,再基于蓝牙连接建立两个电子设备之间的无线保真(wireless fidelity,Wi-Fi)直连,以进行数据交互。由于蓝牙连接性能及稳定性差的问题,会导致电子设备间建链时延较大,影响用户使用体验。
发明内容
本申请实施例提供的连接建立方法及电子设备,能够直接利用Wi-Fi网络实现在电子设备间建链,提高建链性能,提升用户使用体验。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种连接建立方法,应用于第一电子设备,该方法可以包括:获取第二电子设备的近场通信NFC标签中的第二电子设备无线保真Wi-Fi接口的媒体访问控制MAC地址。利用Wi-Fi接口的MAC地址,查询第二电子设备是否具有Wi-Fi参数协商能力。若第二电子设备具有Wi-Fi参数协商能力,则与第二电子设备进行Wi-Fi参数协商,获得目标射频参数。利用目标射频参数与第二电子设备建立Wi-Fi直连通道。
在一些实施例中,Wi-Fi参数协商能力例如包括Wi-Fi热点参数协商能力。电子设备具有Wi-Fi热点参数协商能力,能够进行无线投屏和/或跨设备文件分享。
在一些实施例中,第一电子设备和第二电子设备完成Wi-Fi参数协商后,利用目标射频参数建立Wi-Fi直连通道。其中,Wi-Fi直连通道例如包括Wi-Fi点对点连接通道或Wi-Fi二层网络连接通道。
在一些实施例中,NFC标签中包含NFC参数信息,通过扩展NFC标签,在NFC参数信息中直接指示Wi-Fi接口的MAC地址。
如此,基于NFC功能,第一电子设备能够直接在第二电子设备的NFC标签中获取第二电子设备Wi-Fi接口的MAC地址。第一电子设备利用该Wi-Fi接口的MAC地址与第二电子设备进行Wi-Fi参数协商,建立Wi-Fi直连通道,进行数据传输。相对于现有技术中的连接方法,不必先进行蓝牙连接,再基于蓝牙连接建立Wi-Fi直连通道。 避免出现由于蓝牙连接的性能及稳定性差造成的建链时延较大的问题,提高交互性能。
在一种可能的实现方式中,在获取第二电子设备的近场通信NFC标签中的第二电子设备无线保真Wi-Fi接口的媒体访问控制MAC地址之前,方法还包括:向AP设备发送注册请求,注册请求用于请求注册第一电子设备的第二能力信息,第二能力信息包含Wi-Fi参数协商能力。
在一种可能的实现方式中,第一电子设备和第二电子设备接入同一个无线访问接入点AP设备提供的Wi-Fi网络,利用Wi-Fi接口的MAC地址,查询第二电子设备是否具有Wi-Fi参数协商能力,包括:接收AP设备发送的设备列表信息,设备列表信息中包含接入AP设备的电子设备的能力信息。在设备列表信息中,查询Wi-Fi接口的MAC地址对应的第二电子设备的第一能力信息,确定第一能力信息中是否包含Wi-Fi参数协商能力。
在一种可能的实现方式中,第一电子设备和第二电子设备接入同一个无线访问接入点AP设备提供的Wi-Fi网络,利用Wi-Fi接口的MAC地址,查询第二电子设备是否具有Wi-Fi参数协商能力,包括:向AP设备发送能力查询请求,能力查询请求中携带Wi-Fi接口的MAC地址,能力查询请求用于请求查询第二电子设备是否具有Wi-Fi参数协商能力。接收AP设备发送的能力查询响应,能力查询响应用于指示第二电子设备是否具有Wi-Fi参数协商能力。
也就是说,第一电子设备和第二电子设备在接入AP设备提供的网络后,会向AP设备注册自身支持的能力。AP设备基于本地安全策略,将接入的电子设备在注册过程中注册的设备信息进行广播,同步给局域网内连接的各个电子设备。进而第一电子设备监听广播后,可以保存接入该AP设备的设备列表信息,基于该设备列表信息能够发现局域网内的邻设备。从而第一电子设备在接收到Wi-Fi接口的MAC地址后,能够发现邻设备中支持Wi-Fi参数协商能力的第二电子设备。或者,若第一电子设备在本地设备列表中未查询到该Wi-Fi接口的MAC地址对应的电子设备,则可以向AP设备发送查询请求,由AP设备进行查询,并接收AP设备发送的查询结果,进而获得第二电子设备的能力信息。
如此,第一电子设备通过上述方法,确定第二电子设备是否具备Wi-Fi参数协商能力,以确定第二电子设备是否支持进行无线投屏和/或跨设备文件分享。在确定第二电子设备支持Wi-Fi参数协商能力后,才请求进行Wi-Fi参数协商,建立Wi-Fi通信通道。
在一种可能的实现方式中,若第二电子设备具有Wi-Fi参数协商能力,则与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向AP设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第二电子设备的标识以及第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收AP设备转发的第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一些实施例中,第一电子设备确定与第二电子设备建立连接,则需要协商 Wi-Fi通道连接参数,以建立Wi-Fi直连通道,第一电子设备需要将自身支持且可用的射频参数发送至第二电子设备。但是,为了保证网络安全,AP设备设置了二层隔离,不允许第一电子设备与第二电子设备之间直接通信,而是由AP设备对第一电子设备与第二电子设备之间的信号进行转发,从而实现对接入AP设备网络的电子设备的权限和流量审计。因此,第一电子设备将自身可用的射频参数发送至AP设备,由AP设备基于Wi-Fi参数协商请求中携带的目标设备标识,将接收到的射频参数转发至相应的目标设备(即第二电子设备)。
在一些实施例中,第二电子设备在接收到第一电子设备发送的第一射频参数后,根据第一射频参数以及自身支持且当前可用的射频参数,选择最佳射频频段和信道,作为目标射频参数。比如,第二电子设备在自身和第一电子设备均支持且可用的射频频段和信道中选择预期信号质量最好的射频频段和信道。又比如,第二电子设备在自身和第一电子设备均支持且可用的射频频段和信道中选择时延最小的射频频段和信道。
在一种可能的实现方式中,若第二电子设备具有Wi-Fi参数协商能力,则与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向第二电子设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一些实施中,AP设备在局域网内未设置二层隔离,第一电子设备与第二电子设备之间能够直接进行通信。那么,在第一电子设备与第二电子设备进行Wi-Fi参数协商的过程中,则不需要利用AP设备转发用于协商的射频参数。
在一种可能的实现方式中,利用目标射频参数与第二电子设备建立Wi-Fi直连通道,包括:在目标射频频段和目标信道上发送连接建立请求,连接建立请求用于请求与第二电子设备建立Wi-Fi直连通道。接收第二电子设备发送的连接建立响应,完成Wi-Fi直连通道的建立。
在一些实施例中,第二电子设备在确定目标射频参数后,创建热点,将自身作为软接入点(soft AP)设备,配置射频接口的射频参数,以便后续第一电子设备能够接入该射频接口,传输数据。进一步的,第二电子设备作为soft AP设备基于目标射频参数,按照预设周期发送信标(beacon)帧。
相应的,第一电子设备接收到Wi-Fi参数协商响应后,确定Wi-Fi参数协商成功。按照协商确定的目标射频参数中指定的射频频段和信道,基于802.11协议发送探测请求(probe request)管理帧,用于搜索第二电子设备发送的beacon帧。在搜索到第二电子设备后,自动触发认证和关联流程,与第二电子设备创建Wi-Fi直连通道,进而开始进行数据的传输。
第二方面,本申请实施例提供一种连接建立方法,应用于第一电子设备,该方法可以包括:响应于第一操作,向无线接入点AP设备发送设备查询请求,设备查询请求用于请求查询具有Wi-Fi参数协商能力的设备。接收AP设备发送的设备 查询响应,设备查询响应携带第二电子设备无线保真Wi-Fi接口的MAC地址,第二电子设备具有Wi-Fi参数协商能力。利用Wi-Fi接口的MAC地址,与第二电子设备进行Wi-Fi参数协商,获得目标射频参数。利用目标射频参数与第二电子设备建立Wi-Fi直连通道。
在一种可能的实现方式中,在响应于第一操作,向无线接入点AP设备发送设备查询请求之前,方法还包括:向AP设备发送注册请求,注册请求用于请求注册第一电子设备的第二能力信息,第二能力信息包含Wi-Fi参数协商能力。
在一些实施中,第一电子设备和第二电子设备接入同一个AP设备提供的Wi-Fi网络中。在接入AP设备后,直接向AP设备注册自身支持的能力,及接口信息。如蓝牙接口信息,Wi-Fi接口信息等。进而后续,第一电子设备能够直接向AP设备查询具有Wi-Fi参数协商能力的设备以及该设备的Wi-Fi接口的MAC地址。
由此,不利用NFC参数信息,第一电子设备也可以获得第二电子设备的Wi-Fi接口的MAC地址,与第二电子设备基于Wi-Fi接口的MAC地址直接建立Wi-Fi直连通道,提高建链性能及稳定性,提升用户使用体验。
在一种可能的实现方式中,利用Wi-Fi接口的MAC地址,与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向AP设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第二电子设备的标识以及第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收AP设备转发第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一种可能的实现方式中,利用Wi-Fi接口的MAC地址,与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向第二电子设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一种可能的实现方式中,利用目标射频参数与第二电子设备建立Wi-Fi直连通道,包括:在目标射频频段和目标信道上发送连接建立请求,连接建立请求用于请求与第二电子设备建立Wi-Fi直连通道。接收第二电子设备发送的连接建立响应,完成Wi-Fi直连通道的建立。
此外,第二方面的连接建立方法的技术效果可以参考第一方面的连接建立方法的技术效果,此处不再赘述。
第三方面,本申请实施例提供一种电子设备,包括:处理器和存储器;存储器与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得电子设备执行如下操作:获取第二电子设备的近场通信NFC标签中的第二电子设备无线保真Wi-Fi接口的媒体访问控制MAC地址。利用Wi-Fi接口的MAC地址,查询第二电子设备是否具有Wi-Fi 参数协商能力。若第二电子设备具有Wi-Fi参数协商能力,则与第二电子设备进行Wi-Fi参数协商,获得目标射频参数。利用目标射频参数与第二电子设备建立Wi-Fi直连通道。
在一种可能的实现方式中,第一电子设备和第二电子设备接入同一个无线访问接入点AP设备提供的Wi-Fi网络,利用Wi-Fi接口的MAC地址,查询第二电子设备是否具有Wi-Fi参数协商能力,包括:接收AP设备发送的设备列表信息,设备列表信息中包含接入AP设备的电子设备的能力信息。在设备列表信息中,查询Wi-Fi接口的MAC地址对应的第二电子设备的第一能力信息,确定第一能力信息中是否包含Wi-Fi参数协商能力。
在一种可能的实现方式中,第一电子设备和第二电子设备接入同一个无线访问接入点AP设备提供的Wi-Fi网络,利用Wi-Fi接口的MAC地址,查询第二电子设备是否具有Wi-Fi参数协商能力,包括:向AP设备发送能力查询请求,能力查询请求中携带Wi-Fi接口的MAC地址,能力查询请求用于请求查询第二电子设备是否具有Wi-Fi参数协商能力。接收AP设备发送的能力查询响应,能力查询响应用于指示第二电子设备是否具有Wi-Fi参数协商能力。
在一种可能的实现方式中,当处理器从存储器中读取所述计算机指令,还使得电子设备执行如下操作:向AP设备发送注册请求,注册请求用于请求注册第一电子设备的第二能力信息,第二能力信息包含Wi-Fi参数协商能力。
在一种可能的实现方式中,若第二电子设备具有Wi-Fi参数协商能力,则与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向AP设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第二电子设备的标识以及第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收AP设备转发的第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一种可能的实现方式中,若第二电子设备具有Wi-Fi参数协商能力,则与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向第二电子设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一种可能的实现方式中,利用目标射频参数与第二电子设备建立Wi-Fi直连通道,包括:在目标射频频段和目标信道上发送连接建立请求,连接建立请求用于请求与第二电子设备建立Wi-Fi直连通道。接收第二电子设备发送的连接建立响应,完成Wi-Fi直连通道的建立。
此外,第三方面的电子设备的技术效果可以参考第一方面的连接建立方法的技术效果,此处不再赘述。
第四方面,本申请实施例提供一种电子设备,包括:处理器和存储器;存储器与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得电子设备执行如下操作:响应于第一操作,向无线接入点AP设备发送设备查询请求,设备查询请求用于请求查询具有Wi-Fi参数协商能力的设备。接收AP设备发送的设备查询响应,设备查询响应携带第二电子设备无线保真Wi-Fi接口的MAC地址,第二电子设备具有Wi-Fi参数协商能力。利用Wi-Fi接口的MAC地址,与第二电子设备进行Wi-Fi参数协商,获得目标射频参数。利用目标射频参数与第二电子设备建立Wi-Fi直连通道。
在一种可能的实现方式中,当处理器从存储器中读取所述计算机指令,还使得电子设备执行如下操作:向AP设备发送注册请求,注册请求用于请求注册第一电子设备的第二能力信息,第二能力信息包含Wi-Fi参数协商能力。
在一种可能的实现方式中,利用Wi-Fi接口的MAC地址,与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向AP设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第二电子设备的标识以及第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收AP设备转发第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一种可能的实现方式中,利用Wi-Fi接口的MAC地址,与第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:向第二电子设备发送Wi-Fi参数协商请求,Wi-Fi参数协商请求中携带第一射频参数;第一射频参数包括第一电子设备支持的射频频段中空闲的射频频段,以及第一电子设备支持的信道中空闲的信道。接收第二电子设备发送的Wi-Fi参数协商响应,Wi-Fi参数协商响应中携带目标射频参数,目标射频参数包括第二电子设备从空闲的射频频段中选择的目标射频频段以及从空闲的信道中选择的目标信道。
在一种可能的实现方式中,利用目标射频参数与第二电子设备建立Wi-Fi直连通道,包括:在目标射频频段和目标信道上发送连接建立请求,连接建立请求用于请求与第二电子设备建立Wi-Fi直连通道。接收第二电子设备发送的连接建立响应,完成Wi-Fi直连通道的建立。
此外,第四方面的电子设备的技术效果可以参考第二方面的连接建立方法的技术效果,此处不再赘述。
第五方面,本申请实施例提供一种电子设备,该电子设备具有实现如上述第一方面及其中任一种可能的实现方式中所述的连接建立方法的功能;或者,该电子设备具有实现如上述第二方面及其中任一种可能的实现方式中所述的连接建立方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第六方面,本申请实施例提供一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如上述第一方面及其中任一种可能的实现方式中任一项所述的连接建立方法,或者,使得电子设备执行如 上述第二方面及其中任一种可能的实现方式中任一项所述的连接建立方法。
第七方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如上述第一方面及其中任一种可能的实现方式中任一项所述的连接建立方法,或者,使得电子设备执行如上述第二方面及其中任一种可能的实现方式中任一项所述的连接建立方法。
第八方面,本申请实施例提供一种电路系统,电路系统包括处理电路,处理电路被配置为执行如上述第一方面及其中任一种可能的实现方式中所述的连接建立方法;或者,被配置为执行如上述第二方面及其中任一种可能的实现方式中所述的连接建立方法。
第九方面,本申请实施例提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行如上述第一方面及其中任一种可能的实现方式中所述的连接建立方法;或者,至少一个处理器执行如上述第二方面及其中任一种可能的实现方式中所述的连接建立方法。
附图说明
图1为本申请实施例提供的通信系统的示意图;
图2为本申请实施例提供的电子设备的结构示意图;
图3为本申请实施例提供的数据传输方法流程示意图一;
图4为本申请实施例提供的数据传输方法流程示意图二;
图5为本申请实施例提供的数据传输方法流程示意图三;
图6为本申请实施例提供的Hilink会话的握手交互流程示意图;
图7为本申请实施例提供的连接建立方法流程示意图一;
图8为本申请实施例提供的报文格式示意图;
图9为本申请实施例提供的界面示意图一;
图10为本申请实施例提供的连接建立方法流程示意图二;
图11为本申请实施例提供的连接建立方法流程示意图三;
图12为本申请实施例提供的界面示意图二;
图13为本申请实施例提供的连接建立装置的结构示意图。
具体实施方式
下面结合附图对本申请实施例提供的连接建立方法及电子设备进行详细地描述。
本申请实施例的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括其他没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。 确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
首先,为了便于理解,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。
(1)Huawei Hilink
Huawei Hilink为一种智能硬件开放生态,电子设备能够通过硬件接入或云接入等方式加入到Huawei Hilink生态中,实现电子设备互联互通。
在一些实施例中,Hilink生态也可以描述为智联网络,智联网络包括一个用于提供无线网络的无线访问接入点(access point,AP)设备,以及至少一个接入AP设备的电子设备。其中,AP设备例如为
Figure PCTCN2021136692-appb-000001
路由器。电子设备也可以描述为智联设备。电子设备能够基于Hilink生态相关协议接入AP设备。其中,Hilink相关的协议例如包括受限制的应用协议(constrained application protocol,CoAP),通用即插即用(universal plug and play,UPnP)协议等。
进一步的,Hilink生态相关协议能够用于智能发现与网络配置过程。例如,Hlink网络中,Hilink路由器能够基于Hilink生态相关协议广播接入的电子设备支持的功能,从而使得其他电子设备能够发现所需功能的电子设备。如电子设备1需要进行无线投屏,则接收广播信号,发现电子设备2支持无线投屏功能。进而可以请求与电子设备2建立连接,实现无线投屏。此外,Hilink路由器还能够对接入的电子设备的网络进行配置,支持网络配置的路由器可以作为智联网络中的智能网关设备。
需要说明的是,本申请实施例以Hilink生态为例对本申请实施例提供的连接建立方法进行说明,该连接建立方法还可以应用于其他支持智能连接的生态环境中,如小米生态链等。
(2)近场通信(near field communication,NFC)功能
NFC功能基于近距离无线通信技术,能够实现电子设备间的点对点式通信。例如,将两个具备NFC功能的设备链接,实现点对点数据传输。进一步的,NFC功能还可以协助电子设备之间实现快速建立蓝牙(bluetooth,BT)连接、交换名片和数据通信等。
在一些实施例中,具有NFC功能的电子设备还可以将自身的部分信息存储于NFC模块中,通过“碰一碰”功能,实现NFC模块信息的交互。比如,将商户信息预置于NFC模块中,电子设备靠近NFC感应区域即可实现快速支付。又比如,两个电子设备通过碰一碰,获取对方NFC模块中的NFC标签。如在NFC标签中包含预置的蓝牙套接字(socket)地址等参数信息,进而电子设备能够基于蓝牙socket地址实现建立蓝牙通信。
(3)Wi-Fi点对点(Peer to Peer,P2P)
Wi-Fi P2P由Wi-Fi联盟提出,定义两个Wi-Fi电子设备如何在没有路由的情 形下连接并通信。具体的,支持Wi-Fi P2P的电子设备组成点对点工作组(P2P group),包括点对点工作组所有者(P2P group owner)以及点对点客户端(P2P client)。其中,作为P2P group owner的电子设备需要具备传统路由的功能,如能够作为软AP(soft AP)设备控制Wi-Fi P2P工作组中的其他电子设备(P2P client)的通信等。作为P2P工作组客户端(group client,GC)的电子设备需要连接至作为P2P group owner的电子设备,进而形成一个能够通信的工作组。
示例性的,P2P电子设备发现并构建工作组的过程包括扫描阶段(scan phase)和寻找阶段(find phase)。具体的,在扫描阶段,电子设备发送探测请求(probe request)帧。之后,该电子设备进入寻找阶段。在寻找阶段,电子设备在发送探测请求帧的寻找状态(search state),以及监听探测请求帧并发送探测响应(probe response)帧的监听状态(listen state)之间切换,直至扫描到附近的P2P设备,构建P2P工作组。在构建P2P工作组的过程中,还包括协商确定作为P2P group owner的电子设备,以及电子设备间交换安全配置信息的过程。
图1为本申请实施例提供的一种连接建立方法应用的通信系统的示意图。如图1所示,该通信系统包括第一电子设备100,第二电子设备200以及无线访问接入点(access point,AP)设备300。其中,第一电子设备100和第二电子设备200接入AP设备300提供的无线网络中。
可选的,第一电子设备100例如可以是个人计算机(personal computer,PC)、手机(mobile phone)、平板电脑(Pad)、笔记本电脑、台式电脑、笔记本电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、可穿戴设备、车载设备等终端设备。本申请实施例对第一电子设备100的具体形态不作特殊限制。
可选的,第二电子设备200例如可以是PC、手机、平板电脑、笔记本电脑、台式电脑、笔记本电脑、VR终端设备、AR终端设备、工业控制中的无线终端、无人驾驶中的无线终端、远程医疗中的无线终端、智能电网中的无线终端、运输安全中的无线终端、智慧城市中的无线终端、智慧家庭中的无线终端、可穿戴设备、车载设备等终端设备。本申请实施例对第二电子设备200的具体形态不作特殊限制。
在一些实施例中,第一电子设备100和第二电子设备200之间能够利用无线通信技术,实现无线投屏以及文件分享。其中,假设第一电子设备100为源设备,第二电子设备200为目标设备。第一电子设备100利用第二电子设备200进行无线投屏。或者,第一电子设备100向第二电子设备200发送多种类型和/或格式的文件进行分享,如第一电子设备100向第二电子设备200发送视频文件进行分享。
可选的,AP设备300例如可以是无线路由器,用于提供Wi-Fi网络。第一电子设备100和第二电子设备200接入AP设备300提供的Wi-Fi网络中,AP设备 300能够实现转发第一电子设备100和第二电子设备200发送的信号。在一些实施例中,AP设备300例如为Hilink路由器,第一电子设备100和第二电子设备200为接入Hilink路由器的智联设备。其中,本申请实施例以支持智能发现和网络配置的Hilink生态相关协议为例,对连接建立方法进行说明。可以理解的是,本申请实施例提供的连接建立方法也可以适用于其他支持智能发现和网络配置的标准协议或私有协议。
可选的,本申请实施例中的第一电子设备100和第二电子设备200可以通过不同的设备实现。例如,本申请实施例中的第一电子设备100和第二电子设备可通过图2中的电子设备来实现。
图2示出了电子设备的结构示意图。该电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。例如,若该电子设备为第二电子设备200,第二电子设备200为PC,则第二设备200的结构中可以不包括移动通信模块150,马达191,SIM卡接口195等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry  processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
在一些实施例中,电子设备通过NFC实现点对点数据传输。如电子设备1开启NFC功能,靠近电子设备2的NFC感应区域,能够将文件快速分享至电子设备2。
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备 通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。
在一些实施例中,电子设备显示屏较小,则可以利用无线通信模块160与其他大屏电子设备相连,基于无线投屏技术,将显示内容发送至大屏电子设备进行显示。
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展 电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。其中,音频模块可以包括扬声器,受话器,麦克风和耳机接口。在一些实施例中,电子设备可以通过音频模块170,扬声器,受话器,麦克风,耳机接口,以及应用处理器等实现音频功能。例如音乐播放,录音等。
传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。在一些实施例中,压力传感器可以设置于显示屏194。当有触摸操作作用于显示屏194,电子设备可以根据压力传感器的检测信号计算触摸的位置。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。
以下将以第一电子设备100为具有图2所示结构的手机,以第二电子设备200为具有图2所示结构的PC,以AP设备300为提供Wi-Fi网络的路由器为例,对本申请实施例提供的连接建立方法进行阐述。
在一些实施例中,手机和PC之间能够利用无线通信技术实现数据传输,例如 应用于无线投屏场景,音频文件分享场景,视频文件分享场景等场景中的数据传输。比如,手机和PC通过Miracast,数字生活网络联盟(digital living network alliance,DLNA),
Figure PCTCN2021136692-appb-000002
(苹果公司制定的无线通讯技术)等标准协议或者私有协议,实现通过无线局域网络连接,在不同的多媒体终端上,进行多媒体(如音频、视频、图片等)内容的传输、展示等操作。
示例性的,如图3所示,目前手机和PC之间进行无线数据传输的方法包括S301-S304。
S301、手机发现PC。
示例性的,手机和PC一般支持NFC碰一碰发现功能,蓝牙靠近发现功能,基于802.11协议的靠近发现功能中的一种或多种功能。比如,手机和PC打开无线局域网(wireless local area network,WLAN)功能和蓝牙功能,且PC开启用于进行电脑管理的应用程序,如电脑管家。手机接触到PC上的NFC感应区域后,手机和PC互相发现对端设备,通过下述步骤S302-步骤S304,手机和PC之间建立Wi-Fi连接。或者,手机接触到PC上的NFC感应区域后,手机和PC互相发现对端设备,手机弹窗提示用户是否与PC建立连接和/或PC弹窗提示用户是否与手机建立连接。检测到用户点击确认的操作后,通过下述步骤S302-步骤S304,手机和PC之间建立Wi-Fi连接。
S302、手机和PC建立蓝牙连接。
具体的,手机和PC在建立Wi-Fi连接的过程中,首先需要建立蓝牙连接,进而后续能够基于蓝牙连接通道建立Wi-Fi连接。
示例性的,如图4所示,步骤S302具体可以实现为步骤S3021-步骤S3023。
S3021、PC与手机之间建立蓝牙socket连接。
在一些实施例中,上述步骤S301中,手机和PC在碰一碰后能够获取对方NFC标签中蓝牙模块的媒体访问控制(media access control,MAC)地址,从而确定建立蓝牙socket所需要的蓝牙通信连接的对端设备。之后,创建蓝牙socket连接,触发手机蓝牙模块和PC蓝牙模块建立蓝牙通信连接。其中,在建立蓝牙通信连接的过程中,基于逻辑链路控制与适配协议(Logical Link Control and Adaptation Protocol,L2CAP),RFCOMM协议等协议交互配置信息,实现建立协议通信链路。
S3022、PC与手机进行蓝牙配对。
S3023、PC对手机进行蓝牙鉴权处理。
在一些实施例中,手机和PC在创建socket连接后,还并不能直接进行数据交互,需要执行配对和鉴权流程,如进行配对允许,密钥配置,使得对方作为可信设备。之后,才能够互相传输数据。其中,密钥配置为可选步骤,若不需要进行密码校验,则不必进行密钥配置。
S303、手机和PC基于蓝牙连接通道,协商Wi-Fi通信参数。
示例性的,手机和PC通过步骤S302协商建立蓝牙连接后,能够提供二层网络通讯的蓝牙连接会话通道,供Wi-Fi进行socket连接使用。
如图5所示,步骤S303具体可以实现为步骤S3031-步骤S3033。
S3031、手机和PC间建立Wi-Fi socket连接。
在一些实施例中,手机和PC建立蓝牙连接后,能够协商或获取对端的Wi-Fi的热点参数信息进而进行Wi-Fi的socket连接。
S3032、PC对手机进行Wi-Fi鉴权处理。
在一些实施例中,手机和PC建立Wi-Fi的socket连接后,同样需要执行鉴权流程,将对端设备设置为可信设备,确认当前Wi-Fi socket会话安全。
S3033、手机和PC进行Wi-Fi参数协商。
在一些实施例中,手机和PC基于蓝牙会话建立安全的socket会话后,开始进行Wi-Fi P2P group的参数协商。具体的,手机将自身支持且当前可用的射频频段和信道列表信息发送至PC。PC选择其中合适的射频频段和信道,创建P2P soft AP,并将自身的角色设置为group owner。
S304、手机和PC间建立Wi-Fi连接,进行数据传输。
在一些实施例中,手机和PC组成Wi-Fi P2P工作组后,能够基于Wi-Fi业务通道,进行数据交互。例如,处理无线投屏或者音视频文件分享过程中的业务数据流以及控制信息流。
可以看出,目前手机和PC之间首先需要建立蓝牙连接,之后才能够基于蓝牙连接,通过交互Wi-Fi参数建立Wi-Fi P2P工作组。但是,由于蓝牙建链配对性能和稳定性较差,传输的数据带宽有限,导致建链时延较大,用户等待时间较长,影响用户使用体验。
基于此,本申请实施例提供一种连接建立方法,在手机和PC接入同一个AP设备提供的Wi-Fi网络后,能够直接基于Wi-Fi网络交换Wi-Fi参数,创建Wi-Fi P2P工作组,实现数据交互。从而避免蓝牙连接造成的时延较大的问题。
以下以无线投屏场景为例对本申请实施例提供的连接建立方法进行介绍。其中,手机和PC接入路由器,路由器作为Hilink网关(gateway),手机和PC作为Hilink设备(device)。
在一些实施例中,手机和PC接入Hilink路由器提供的Wi-Fi网络后,自动进行Hilink配对。Hilink路由器能够通过Hilink相关的协议获得手机和PC的设备信息。其中,Hilink相关的协议例如包括受限制的应用协议(constrained application protocol,CoAP),通用即插即用(universal plug and play,UPnP)协议等。设备信息例如包括媒体存取控制(media access control address,MAC)位址,设备名称,设备类型,设备生产厂商标识,服务能力集等。服务能力集例如包括支持网络配置同步,Wi-Fi热点参数协商等。其中,Wi-Fi热点参数协商的能力表示设备支持WLAN信道的能力,Wi-Fi P2P group client(GC)支持的射频频段和信道列表等Wi-Fi射频参数和服务集标识(service set identifier,SSID)参数的同步和协商能力。需要说明的是,Wi-Fi热点参数协商的能力例如可以用于支持无线投屏、文件分享等业务。
示例性的,如图6所示,为device接入Hilink gateway,与Hilink gateway建立Hilink会话的握手交互流程示意图。其中,device为手机或PC,以下步骤中以手机与路由器的交互流程为例进行说明。
S601、设备搜索网关服务。
具体的,手机上电后,即手机开机待接入无线网络时,进行网络搜索,搜索可接入的网关设备。其中,以接入网关为智能网关,如Hilink gateway为例进行说明。
示例性的,手机广播报文“GET/.well-known/core?st=home Center”。其中,“st”字段用于指示过滤筛选条件,例如,“st=home Center”字段即用于表示搜索智能网关设备。
S602、网关向设备发送搜索响应。
具体的,路由器在接收到搜索网关设备的报文后,向手机发送响应报文,通知手机自身为网关设备。
示例性的,如下示出一种响应报文示例。
Figure PCTCN2021136692-appb-000003
S603、设备向网关发送会话申请请求。
具体的,手机在接收到路由器发送的响应报文后,确认路由器为Hilink网关设备,提供Wi-Fi网络,则向路由器发送会话申请请求,用于交互设备信息,以接入Wi-Fi网络。
示例性的,如下示出一种会话申请请求报文示例。
Figure PCTCN2021136692-appb-000004
Figure PCTCN2021136692-appb-000005
S604、网关向设备发送会话申请响应。
具体的,路由器在接收到会话申请请求报文后,向手机发送会话申请响应报文,以建立会话通道。
示例性的,如下示出一种会话申请响应报文示例。
Figure PCTCN2021136692-appb-000006
S605、设备计算加密密钥。
S606、网关计算加密密钥。
具体的,在步骤S605和步骤S606中,为了保证会话安全,手机和路由器需要分别计算加密密钥。例如,采用预共享密钥(pre-shared key,PSK)模式计算加密密钥,如enc_key=PBKDF2(PSK,sn1|sn2)。其中,sn用于表示产品序列号(serial number,SN),SN码为设备对应的唯一识别码。
S607、设备向网关发送注册请求。
具体的,手机向网关设备发送注册请求,用于注册设备信息。进而路由器根据设备信息,调用相应的设备。可选的,扩展现有Hilik接口,用于注册设备信息。例如,扩展Wi-Fi P2P参数协商接口。
示例性的,如下示出一种注册请求报文示例。
Figure PCTCN2021136692-appb-000007
Figure PCTCN2021136692-appb-000008
上述注册请求报文中,“st”字段用于指示过滤筛选条件,如自身支持的服务能力集。“WifiCfg”字段用于指示该设备具备Wi-Fi热点参数协商的能力,即手机支持Wi-Fi参数同步和协商。那么,后续路由器能够基于手机的具备Wi-Fi热点参数协商的能力,协助手机与PC进行Wi-Fi参数的同步和协商,进而实现无线投屏。
S608、网关向设备发送注册响应。
具体的,路由器在接收到注册请求报文后,向手机发送注册响应报文,以完成手机设备信息的注册。
示例性的,如下示出一种注册响应报文示例。
Figure PCTCN2021136692-appb-000009
S609、设备向网关发送心跳包。
具体的,手机和路由器基于socket连接,若socket连接断开,则手机路由器之间的数据传输将失败。因此,路由器需要确认socket连接未断开。基于此,手机定时向路由器发送心跳包,通知路由器当前手机在线,以确保手机和路由器之间连接的有效性。
示例性的,如下示出一种心跳包报文示例。
POST/.sys/heartbeat?devSn=***
S610、网关向设备发送心跳包接收响应。
具体的,路由器在接收到心跳包后,确定手机在线,发送心跳包接收响应,通知手机当前路由器在线。
示例性的,如下示出一种心跳包接收响应报文示例。
Figure PCTCN2021136692-appb-000010
在一些场景中,手机和PC利用图6所示的方法接入同一个路由器提供的Wi-Fi网络,与路由器建立Hilink会话通道后,可以建立Wi-Fi P2P工作组,进行数据传输。
示例性的,图7为本申请实施例提供的连接建立方法流程示意图。其中,投屏源设备为手机,投屏目标设备为PC,手机利用PC显示视频画面。参见图7,该方法包括S701-S707。
S701、手机获取PC的NFC参数信息,包含Wi-Fi接口的MAC地址。
在一些实施例中,PC中包括射频识别(radio frequency identification,RFID)模块,手机开启NFC功能,靠近PC的NFC感应区域,可读取PC的NFC参数信息,如NFC标签中的参数信息,获得PC Wi-Fi接口的MAC地址。其中,NFC参数信息中的Wi-Fi接口的MAC地址可以预配置于PC的NFC标签中。或者,在PC开机启动某应用程序激活Wi-Fi接口时,再将Wi-Fi接口的MAC地址写入NFC标签。
示例性的,NFC标签中的数据以NFC数据交换格式(NFC data exchange format,NDEF)报文(message)形式保存。其中,每条报文可由多条记录(Record)(也可以描述为多个子包)构成。例如,如图8所示,示例性的给出一种报文格式。其中,NDEF报文包括包头子包,NDEF Record 0子包以及NDEF Record 1子包。
其中,NDEF Record 0子包,用于保存统一资源定位系统(uniform resource locator,URL)。该URL可以打开当前使用NFC功能的应用的网站,进而获得该应用的介绍。例如,假设手机通过碰触PC NFC感应区域待传输数据,且手机不支持“一碰传”功能。该URL指向介绍一碰传功能的网站,手机在触碰PC NFC感应区域时,手机通过该URL显示对应网站,以便用户查看相关介绍。
NDEF Record 1子包,用于保存NFC参数信息。如图8所示,NDEF Record 1子包包括位标记(bit flag)字段、类型长度(type length)字段、净荷长度(payload length)字段、ID长度(ID length)字段、净荷类型(payload type)字段、净荷ID(payload ID)字段、以及净荷数据(payload data)字段。
其中,净荷数据字段,占用的字节数量为变量,可以根据子字段数据长度变化。净荷数据字段包括版本号子字段、蓝牙接口MAC地址子字段、Wi-Fi接口MAC地址子字段、随机数子字段、型号子字段、以及子型号子字段。
蓝牙接口MAC地址子字段,占用6个字节(byte),用于指示PC的蓝牙接口的MAC地址。手机可以基于该MAC地址与PC建立蓝牙连接。
Wi-Fi接口MAC地址子字段,占用6个字节,用于指示PC的Wi-Fi接口的MAC地址。手机可以基于该MAC地址与PC建立Wi-Fi连接。如此,通过扩展NFC标签,在NFC参数信息中直接指示Wi-Fi接口的MAC地址,从而使得手机和PC不必再建立蓝牙连接的基础上才能够建立Wi-Fi连接,而是能够直接基于Wi-Fi接口的MAC地址建立Wi-Fi连接。
随机数子字段,占用32个字节,其取值为根据PC的产品序列号(serial number,SN)进行哈希(hash)运算后获得的hash值。其中,SN号为PC身份识别码,为PC的唯一机器编码。
S702、手机确定该Wi-Fi接口的MAC地址对应的设备是支持Wi-Fi参数协商能力的邻设备。
在一些实施例中,路由器基于本地安全策略,将接入设备在注册过程中注册 的设备信息进行广播,同步给局域网内连接的各个设备。进而手机监听广播后,可以保存接入该路由器的设备列表信息,基于该设备列表信息能够发现局域网内的邻设备。从而接收到Wi-Fi接口的MAC地址后,能够发现邻设备中支持Wi-Fi参数协商能力的PC。可选的,Wi-Fi参数协商能力例如包括Wi-Fi热点参数协商能力。
在一些实施例中,手机在获得PC Wi-Fi接口的MAC地址后,需要确定PC是否为支持Wi-Fi热点参数协商能力的设备,具备Wi-Fi热点参数协商能力的PC设备,能够与手机与PC之间进行无线投屏和/或跨设备文件分享。其中,手机可以利用本地缓存的设备列表信息,查询该Wi-Fi接口的MAC地址对应的设备是否支持Wi-Fi热点参数协商能力。若在本地设备列表中未查询到该Wi-Fi接口的MAC地址对应的设备,则可以向路由器发送查询请求,由路由器进行查询,并接收路由器发送的查询结果。
示例性的,手机可以向路由器发送查询请求报文,用于向路由器查询指定设备标识,指定MAC地址,或指定能力的设备列表。
比如,该查询请求报文例如为“GET/cord?st=WifiCfg”。其中,“st”字段用于指示过滤筛选条件,“WifiCfg”字段用于指示查询具有Wi-Fi热点参数协商能力的设备。具体的,若设备支持无线投屏和/或跨设备文件分享,则需要支持Wi-Fi热点参数协商能力,因此,利用该报文,可以查询支持投屏能力的设备。
相应的,路由器在接收到查询请求报文后,会向手机发送查询响应报文,该查询响应报文中携带查询结果。如下示出一种查询响应报文示例。
Figure PCTCN2021136692-appb-000011
Figure PCTCN2021136692-appb-000012
上述查询响应报文中,“sn”字段用于指示具有Wi-Fi热点参数协商能力的设备的SN号。例如为00E0FC018008。手机根据SN号可以确定对应的设备。进一步的,该SN号字段还可以利用MAC地址进行填充,MAC地址也可以用于指示唯一对应的设备。
需要说明的是,在上述步骤S701中,手机还可以获取PC的NFC参数信息中包含的蓝牙接口的MAC地址。那么,在步骤S702中,若手机自身以及路由器查询支持Wi-Fi热点参数协商能力的邻设备的过程均失败,即未能查询到相应的PC,则手机利用蓝牙接口的MAC地址,与PC建立蓝牙连接,再建立Wi-Fi P2P工作组。其中,基于蓝牙连接建立Wi-Fi P2P工作组可以参照图3-图5所示的方法,在此不再赘述。
S703、手机显示确认界面,检测确认操作,确认与PC建立连接。
在一些实施例中,手机在通过上述步骤S702查询到可投屏的PC后,需要再由用户确认该PC是否为目标投屏设备。若是,则执行下述投屏参数协商过程。若不是,则需要再次重复上述步骤S701和步骤S702,重新查找PC,或放弃投屏操作。
示例性的,如图9所示界面901,手机显示通知栏91,用于提示用户当前正在建立投屏连接,由用户确认是否允许在该PC上进行投屏。其中,当前可能存在多个PC,则可以利用PC的SN码,或者利用用户自定义的PC名称等方式提示用户当前待连接的目标PC为多个PC中的哪一个PC,便于用户区分,如界面901中提示用户“PC(XXX)”中XXX即表示提示方式对应的内容。检测到用户点击控件92的操作,确认用户允许利用目标PC进行投屏,则需要与目标PC间建立投屏连接,用于传输投屏数据。
S704a、手机向路由器发送参数协商请求,参数协商请求中携带PC标识以及第一射频参数。
其中,第一射频参数包括手机支持的射频频段和信道中当前能够应用的射频频段和信道。PC标识例如包括PC的MAC地址,或预定义的PC标识等,路由器根据PC标识确定发送参数协商请求的目标PC,后续手机利用目标PC进行无线投屏。可选的,手机作为投屏源设备,PC作为投屏目标设备。在参数协商请求中携带目标设备标识和/或源设备标识,用于识别对端设备。
在一些实施例中,手机确定与PC建立连接,则需要协商Wi-Fi P2P连接参数,以建立Wi-Fi P2P工作组,手机需要将自身支持且可用的射频参数发送至PC。但是,为了保证网络安全,路由器设置了二层隔离,不允许手机和PC之间直接通信,而是由路由器对手机和PC之间的信号进行转发,从而实现对接入路由器网络的设备的权限和流量进行审计。因此,手机将自身支持且可用的射频参数发送至路由器,由路由器基于参数协商请求中携带的目标PC标识,将接收到的射频参数转发至相应的目标PC。进而目标PC基于该射频参数选择确定需要应用的射频参数。
示例性的,请求报文如下所示:
METHOD PATH HTTP/1.1
[BODY]
其中,上述请求报文中,“METHOD”字段,用于表示接口传输参数的方法,例如包括GET和POST两种方法。其中,GET的方法将参数通过统一资源定位系统(uniform resource locator,URL)进行传输。POST的方法将参数置于报文报体(body)中进行传输。可选的,GET的方法和POST的方法可基于超文本传输协议(hypertext transfer protocol,HTTP)进行传输控制协议(transmission control protocol,TCP)数据包传输。
“PATH”字段,用于表示接口的请求路径。
“BODY”字段为可选字段,用于表示请求的报体。BODY字段采用JSON报文格式,编码方式为UTF-8方式。BODY字段中包含自身Wi-Fi模块中可用的射频频段以及对应频段下的可用信道列表等信息的子字段,和/或源设备标识和目标设备标识。其中,设备标识例如为设备SN。
“HTTP/1.1”字段与具体的承载协议相关。例如,基于HTTP协议进行传输时报文中包含该字段,基于CoAP时进行传输时报文中不包含该字段。
如下示出几种请求报文示例。
示例一、基于HTTP协议或HTTPS协议传输请求报文。
利用GET的方法传输报文:
GET/{cloud_prefix}/{devId}/PATH HTTP/1.1
Authorization:Bearer 7dc923e1-027d-476e-ad16-380d2166c7b7
Content-Type:application/json
利用POST的方法传输报文:
POST/{cloud_prefix}/{devId}/PATH HTTP/1.1
Authorization:Bearer 7dc923e1-027d-476e-ad16-380d2166c7b7
Content-Type:application/json
[BODY]
示例二、基于CoAP传输请求报文,并采用安全传输层协议(transport layer security,TLS)或数据包传输层安全性协议(datagram transport layer security,DTLS)协商共享密钥,保证传输的保密性和数据完整性。
利用GET的方法传输报文:
GET/{dev_specific_prefix}/PATH
Option:session_id
2.05 content
aes_encrypted([BODY])
利用POST的方法传输报文:
POST/{dev_specific_prefix}/PATH
Option:session_id
aes_encrypted([BODY])
2.05 content
aes_encrypted([BODY])
需要说明的是,基于HTTP协议或HTTPS协议传输报文时,同样能够采用TLS或安全套接字协议(secure sockets layer,SSL)协商共享密钥。其中,协商共享密钥的流程可以参考现有技术,对此本申请实施例不作具体阐述。
S704b、路由器根据PC标识,向目标PC转发参数协商请求。
在一些实施例中,路由器接收到参数协商请求后,基于PC标识,将该协商请求转发至PC标识对应的目标PC。
S705、PC从第一射频参数中选择目标射频参数,并创建热点。
在一些实施例中,PC在接收到手机发送的第一射频参数后,根据第一射频参数以及自身支持且当前可用的射频参数,选择最佳射频频段和信道,作为目标射频参数。比如,PC在自身和手机均支持且可用的射频频段和信道中选择预期信号质量最好的射频频段和信道。又比如,PC在自身和手机均支持且可用的射频频段和信道中选择时延最小的射频频段和信道。
在一些实施例中,PC在确定目标射频参数后,创建热点,将自身作为软接入点(soft AP)设备,配置射频接口的Wi-Fi P2P工作组的射频参数,以便后续手机能够接入该射频接口,传输投屏数据。进一步的,PC作为soft AP设备基于目标射频参数,按照预设周期发送信标(beacon)帧,使得手机可以发现该soft AP设备。
在一些实施例中,PC还可以配置热点的SSID,后续手机利用该SSID接入PC热点。可选的,PC可以单独配置生成热点的SSID,并将该SSID发送至手机。或者,预配置热点的SSID,将该SSID配置于PC和手机中,在PC需要配置热点的SSID时,直接获取预置的SSID进行配置。那么,PC则不必向手机发送SSID,手机根据预配置的SSID即可确定对应热点的SSID。
S706a、PC向路由器发送参数协商响应,参数协商响应中携带目标射频参数。
在一些实施例中,PC在确定目标射频参数后,沿接收参数协商请求的路径,将目标射频参数发送至路由器,由路由器转发至手机,实现PC与手机建立Wi-Fi P2P工作组。可选的,参数协商响应中还可以携带热点的SSID,功率值。
示例性的,如下示出一种参数协商响应报文。
HTTP/1.1 200 OK
[BODY]
其中,“200 OK”字段,用于表示对应请求已经被成功地处理在服务器上。即已经进行目标射频参数选择。“BODY”字段,用于承载报文的有效载荷,如目标射频参数。BODY字段都采用JSON报文格式,编码为UTF-8方式。BODY字段中包含PC选择创建热点的频段和对应信道信息,和/或SSID,和/或源设备标识和目标设备标识。其中,设备标识例如为设备SN。
S706b、路由器向手机转发参数协商响应。
在一些实施例中,路由器在接收到参数协商响应后,将参数协商响应转发至相应的发送参数协商请求的手机。可选的,在上述步骤S704a中,参数协商请求中还可以携带手机标识。相应的,PC发送的参数协商响应中携带该手机标识,那 么路由器在接收到参数协商响应后,能够根据手机标识,将该参数协商响应发送至目标手机。
由此,手机基于Hilink生态相关协议,新增用于传输Wi-Fi协商参数的协议接口。如在本申请实施例中,手机利用与路由器之间通过如图6所示方法建立的Hilink会话通道,传输第一射频参数,并接收PC确定的目标射频参数,实现与PC之间的射频参数协商。相对于图5所示的PC与手机基于链路层协议进行Wi-Fi参数协商,本申请实施例能够基于应用层协议(即Hilink生态相关协议)执行参数协商过程,不必受限于蓝牙连接。
S707、手机与PC创建Wi-Fi P2P socket连接,并开始传输数据。
在一些实施例中,手机接收到参数协商响应后,确定参数协商成功。按照协商确定的目标射频参数中指定的射频频段和信道,基于802.11协议发送探测请求(probe request)管理帧,用于搜索PC发送的beacon帧。在搜索到PC后,自动触发认证和关联流程,与PC创建Wi-Fi P2P socket连接,进而开始进行投屏数据的传输。其中,传输的投屏数据例如包括视频图像信息,键鼠信息等。手机与PC的Wi-Fi认证和关联流程可以参考现有技术,在此不再赘述。
在一些场景中,路由器在局域网内未设置二层隔离,手机和PC之间能够直接进行通信。那么,在手机和PC进行参数协商的过程中,则不需要利用路由器转发用于协商的参数。
示例性的,在手机和PC直接进行参数协商场景中,如图10所示,参数协商过程包括S704c-S706c。
S704c、手机向PC发送参数协商请求,参数协商请求中携带第一射频参数。
在一些实施例中,手机和PC支持特定的表述性状态传递(representational state transfer,REST)接口,手机和PC能够基于该REST接口直接进行通信。可选的,手机接收路由器广播的设备列表信息,在设备列表信息中获取PC的IP地址。或者,手机根据在上述步骤S701中获取的MAC地址查找地址解析协议(address resolution protocol,ARP)表,根据ARP表中MAC地址与IP地址的对应关系,确定PC的IP地址。之后,手机利用该IP地址,向PC发送参数协商请求。
其中,REST用于指示数据传输过程中客户端和服务端的数据交互规则。PC作为REST接口的服务端,手机作为REST接口的客户端。
可选的,参数协商请求报文基于UPnP协议或CoAP,以HTTP(s)GET或HTTP(s)POST的方式进行传输。其中,参数协商请求报文的格式可以参考上述步骤S704a所述的请求报文的格式,在此不再赘述。
S705、PC从第一射频参数中选择目标射频参数,并创建热点。
S706c、PC向手机发送参数协商响应,参数协商响应中携带目标射频参数。
在一些实施例中,PC接收到手机直接发送的参数协商请求后,相应的,直接回复参数协商响应。
可选的,步骤S705-步骤S706c的其余内容,可以参考上述图7所示的步骤S705-步骤S706b中的相关内容,在此不再赘述。
由此,本申请实施例提供的连接建立方法,基于NFC功能,手机能够直接在PC的NFC模块中获取其Wi-Fi接口的MAC地址,利用该Wi-Fi接口的MAC地址与PC建立Wi-Fi P2P工作组,进行数据传输。相对于现有技术中的连接方法,不必先进行蓝牙连接,再基于蓝牙连接建立Wi-Fi P2P工作组。避免出现由于蓝牙连接的性能及稳定性差造成的建链时延较大的问题,提高交互性能。
在一些场景中,手机也可以不通过NFC碰一碰发现PC,那么手机可以直接接收用户选择的PC,确定对应的Wi-Fi接口的MAC地址,建立Wi-Fi P2P工作组。
示例性的,图11为本申请实施例提供的又一种连接建立方法。如图11所示,该方法包括S1101-S1108。
S1101、PC接入路由器,并向路由器注册。
S1102、手机接入路由器,并向路由器注册。
在一些实施例中,上述步骤S1101和步骤S1102中,手机和PC接入同一个路由器提供的Wi-Fi网络中。在接入路由器后,基于Hilink生态相关协议,搜索Hilink gateway进行注册。假设路由器为Hilink gateway,则手机和PC在接入路由器后,直接向路由器注册自身支持的能力,及接口信息。如蓝牙接口信息,Wi-Fi接口信息等。
可选的,步骤S1101-步骤S1102的其余内容,可以参考上述步骤S601-步骤S610中的相关内容,在此不再赘述。
S1103、手机显示待投屏界面,检测到用户搜索投屏设备的操作,搜索投屏设备。
S1104、手机向路由器发送投屏设备查询请求。
S1105、路由器向手机发送投屏设备查询结果。
S1106、手机显示投屏设备选择界面,检测到用户选择投屏设备的操作,确定投屏设备为PC。
在一些实施例中,在步骤S1103-步骤S1106中,手机在检测到用户的投屏操作后,开始查找能够用于投屏的邻设备。比如,向路由器发送查询请求。路由器接收到查询请求后,基于接入路由器的设备的注册信息,查询支持Wi-Fi热点参数协商能力设备,并将查询结果发送至手机。可选的,该查询结果中包含设备的Wi-Fi接口的MAC地址。手机接收到查询结果后,由用户确认是否利用查询到的设备进行投屏。若是,则基于用户选中的投屏设备的Wi-Fi接口的MAC地址,与该投屏设备进行Wi-Fi热点参数协商,进而建立Wi-Fi P2P工作组,开始进行投屏。又比如,手机监听路由器变更同步的邻居设备信息,获取设备列表信息。进而手机根据设备列表信息,直接查询支持Wi-Fi热点参数协商能力的投屏设备,以及对应的Wi-Fi接口的MAC地址。
示例性的,如图12中(a)所示界面1201,手机检测到用户点击控件121的操作,确定用户需要将当前显示的视频画面进行投屏。手机显示如图12中(b)所示界面1202,开始搜索可用于投屏的投屏设备,并显示提示内容122,用于提示用户当前手机正在搜索设备。之后,手机显示如图12中(c)所示界面1203,用于接收用户选中投屏设备的操作。例如,手机在界面1203上检测到用户点击设 备名称123的操作,确定投屏设备为PC。
S1107、手机与PC进行射频参数协商。
S1108、手机与PC创建Wi-Fi P2P socket连接,并开始传输数据。
可选的,步骤S1107和步骤S1108的内容,可以参考图7所示步骤S704a-步骤S707中的内容,或者参考图10所示步骤S704c-步骤S707中的相关内容,在此不再赘述。
由此,不利用NFC参数信息,手机也可以获得PC的Wi-Fi接口的MAC地址,与PC基于Wi-Fi接口的MAC地址直接建立Wi-Fi P2P工作组,提高建链性能及稳定性,提升用户使用体验。
可以理解的是,上述第一电子设备,第二电子设备和AP设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
示例性的图13为本申请实施例提供的连接建立装置的结构示意图。如图13所示,连接建立装置1300包括:收发模块1301以及处理模块1302。
在一种可能的设计中,连接建立装置1300可用于实现上述方法实施例中涉及的第一电子设备的功能。其中,连接建立装置1300可以为第一电子设备本身,也可以为第一电子设备中的功能单元或者芯片,或者与第一电子设备匹配使用的装置。
可选的,收发模块1301,用于支持连接建立装置1300执行本申请实施例中图7所示步骤S701,步骤S704a,步骤S706b和步骤S707中的一个或者多个步骤;和/或,收发模块1301还用于支持连接建立装置1300执行本申请实施例中图10所示步骤S704c和步骤S706c;和/或,收发模块1301还用于支持连接建立装置1300执行本申请实施例中图11所示步骤S1102,步骤S1104,步骤S1105,步骤S1107和步骤S1108;和/或,收发模块1301还用于支持连接建立装置1300执行本申请实施例中第一电子设备执行的其他发送和接收步骤。
可选的,处理模块1302,用于支持连接建立装置1300执行本申请实施例中图7或图10所示步骤S702和步骤S703中的一个或者多个步骤;和/或,处理模块1302还用于支持连接建立装置1300执行本申请实施例图11所示步骤S1103和步骤S1106;和/或,处理模块1302还用于支持连接建立装置1300执行本申请实施例中第一电子设备执行的其他处理步骤。
在另一种可能的设计中,连接建立装置1300可用于实现上述方法实施例中涉及的第二电子设备的功能。其中,连接建立装置1300可以为第二电子设备本身,也可以为第二电子设备中的功能单元或者芯片,或者与第二电子设备匹配使用的装置。
可选的,收发模块1301,用于支持连接建立装置1300执行本申请实施例中图7所示步骤S701,步骤S704b,步骤S706a和步骤S707中的一个或者多个步骤;和/或,收发模块1301还用于支持连接建立装置1300执行本申请实施例中图10所示步骤S704c和步骤S706c;和/或,收发模块1301还用于支持连接建立装置1300执行本申请实施例中图11所示步骤S1101,步骤S1107和步骤S1108;和/或,收发模块1301还用于支持连接建立装置1300执行本申请实施例中第二电子设备执行的其他发送和接收步骤。
可选的,处理模块1302,用于支持连接建立装置1300执行本申请实施例中图7所示步骤S705;和/或,处理模块1302还用于支持连接建立装置1300执行本申请实施例中第二电子设备执行的其他处理步骤。
其中,处理模块1302可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
可选的,图13所示的连接建立装置1300还可以包括存储模块(图13中未示出),该存储模块存储有程序或指令。当收发模块1301以及处理模块1302执行该程序或指令时,使得图13所示的连接建立装置1300可以执行本申请实施例提供的连接建立方法。
可选的,收发模块可以包括接收模块和发送模块。其中,接收模块,用于接收其他设备发送的信号。发送模块,用于向其他设备发送信号。本申请实施例对收发模块的具体实现方式,不做具体限定。
图13所示的连接建立装置1300中的各个单元的操作和/或功能分别为了实现上述方法侧实施例提供连接建立方法的相应流程,为了简洁,在此不再赘述。图13所示的连接建立装置1300的技术效果可以参考上述方法侧实施例提供连接建立方法的技术效果,此处不再赘述。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以 及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请的实施例还提供了一种存储介质,用于存储为上述通信装置所用的指令。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在服务器上运行时,使得服务器执行上述相关方法步骤实现上述实施例中的连接建立方法。
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的连接建立方法。
另外,本申请的实施例还提供一种装置,该装置具体可以是组件或模块,该装置可包括相连的一个或多个处理器和存储器;其中,存储器用于存储计算机程序,一个或多个计算机程序包括指令。当该指令被一个或多个处理器执行时,以使装置执行上述各方法实施例中的连接建立方法。
其中,本申请实施例提供的装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
结合本申请公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read only memory,ROM)、可擦除可编程只读存储器(erasable programmable ROM,EPROM)、电可擦可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(application specific integrated circuit,ASIC)中。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置 和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (15)

  1. 一种连接建立方法,其特征在于,应用于第一电子设备,所述方法包括:
    获取第二电子设备的近场通信NFC标签中的所述第二电子设备无线保真Wi-Fi接口的媒体访问控制MAC地址;
    利用所述Wi-Fi接口的MAC地址,查询所述第二电子设备是否具有Wi-Fi参数协商能力;
    若所述第二电子设备具有所述Wi-Fi参数协商能力,则与所述第二电子设备进行Wi-Fi参数协商,获得目标射频参数;
    利用所述目标射频参数与所述第二电子设备建立Wi-Fi直连通道。
  2. 根据权利要求1所述的方法,其特征在于,所述第一电子设备和所述第二电子设备接入同一个无线访问接入点AP设备提供的Wi-Fi网络,所述利用所述Wi-Fi接口的MAC地址,查询所述第二电子设备是否具有Wi-Fi参数协商能力,包括:
    接收所述AP设备发送的设备列表信息,所述设备列表信息中包含接入所述AP设备的电子设备的能力信息;
    在所述设备列表信息中,查询所述Wi-Fi接口的MAC地址对应的所述第二电子设备的第一能力信息,确定所述第一能力信息中是否包含所述Wi-Fi参数协商能力。
  3. 根据权利要求1所述的方法,其特征在于,所述第一电子设备和所述第二电子设备接入同一个无线访问接入点AP设备提供的Wi-Fi网络,所述利用所述Wi-Fi接口的MAC地址,查询所述第二电子设备是否具有Wi-Fi参数协商能力,包括:
    向所述AP设备发送能力查询请求,所述能力查询请求中携带所述Wi-Fi接口的MAC地址,所述能力查询请求用于请求查询所述第二电子设备是否具有所述Wi-Fi参数协商能力;
    接收所述AP设备发送的能力查询响应,所述能力查询响应用于指示所述第二电子设备是否具有所述Wi-Fi参数协商能力。
  4. 根据权利要求2或3所述的方法,其特征在于,在所述获取第二电子设备的近场通信NFC标签中的所述第二电子设备无线保真Wi-Fi接口的媒体访问控制MAC地址之前,所述方法还包括:
    向所述AP设备发送注册请求,所述注册请求用于请求注册所述第一电子设备的第二能力信息,所述第二能力信息包含所述Wi-Fi参数协商能力。
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述若所述第二电子设备具有所述Wi-Fi参数协商能力,则与所述第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:
    向所述AP设备发送Wi-Fi参数协商请求,所述Wi-Fi参数协商请求中携带所述第二电子设备的标识以及第一射频参数;所述第一射频参数包括所述第一电子设备支持的射频频段中空闲的射频频段,以及所述第一电子设备支持的信道中空闲的信道;
    接收所述AP设备转发的所述第二电子设备发送的Wi-Fi参数协商响应,所述Wi-Fi参数协商响应中携带所述目标射频参数,所述目标射频参数包括所述第二电子设备从所述空闲的射频频段中选择的目标射频频段以及从所述空闲的信道中选择的目标信道。
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述若所述第二电子设备具有所述Wi-Fi参数协商能力,则与所述第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:
    向所述第二电子设备发送Wi-Fi参数协商请求,所述Wi-Fi参数协商请求中携带第一射频参数;所述第一射频参数包括所述第一电子设备支持的射频频段中空闲的射频频段,以及所述第一电子设备支持的信道中空闲的信道;
    接收所述第二电子设备发送的Wi-Fi参数协商响应,所述Wi-Fi参数协商响应中携带所述目标射频参数,所述目标射频参数包括所述第二电子设备从所述空闲的射频频段中选择的目标射频频段以及从所述空闲的信道中选择的目标信道。
  7. 根据权利要求5或6所述的方法,其特征在于,所述利用所述目标射频参数与所述第二电子设备建立Wi-Fi直连通道,包括:
    在所述目标射频频段和所述目标信道上发送连接建立请求,所述连接建立请求用于请求与所述第二电子设备建立所述Wi-Fi直连通道;
    接收所述第二电子设备发送的连接建立响应,完成所述Wi-Fi直连通道的建立。
  8. 一种连接建立方法,其特征在于,应用于第一电子设备,所述方法包括:
    响应于第一操作,向无线接入点AP设备发送设备查询请求,所述设备查询请求用于请求查询具有Wi-Fi参数协商能力的设备;
    接收所述AP设备发送的设备查询响应,所述设备查询响应携带第二电子设备无线保真Wi-Fi接口的MAC地址,所述第二电子设备具有所述Wi-Fi参数协商能力;
    利用所述Wi-Fi接口的MAC地址,与所述第二电子设备进行Wi-Fi参数协商,获得目标射频参数;
    利用所述目标射频参数与所述第二电子设备建立Wi-Fi直连通道。
  9. 根据权利要求8所述的方法,其特征在于,在响应于第一操作,向无线接入点AP设备发送设备查询请求之前,所述方法还包括:
    向所述AP设备发送注册请求,所述注册请求用于请求注册所述第一电子设备的第二能力信息,所述第二能力信息包含所述Wi-Fi参数协商能力。
  10. 根据权利要求8或9所述的方法,其特征在于,所述利用所述Wi-Fi接口的MAC地址,与所述第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:
    向所述AP设备发送Wi-Fi参数协商请求,所述Wi-Fi参数协商请求中携带所述第二电子设备的标识以及第一射频参数;所述第一射频参数包括所述第一电子设备支持的射频频段中空闲的射频频段,以及所述第一电子设备支持的信道中空闲的信道;
    接收所述AP设备转发所述第二电子设备发送的Wi-Fi参数协商响应,所述Wi-Fi参数协商响应中携带所述目标射频参数,所述目标射频参数包括所述第二电子设备从所述空闲的射频频段中选择的目标射频频段以及从所述空闲的信道中选择的目标信道。
  11. 根据权利要求8或9所述的方法,其特征在于,所述利用所述Wi-Fi接口的MAC地址,与所述第二电子设备进行Wi-Fi参数协商,获得目标射频参数;包括:
    向所述第二电子设备发送Wi-Fi参数协商请求,所述Wi-Fi参数协商请求中携带第一射频参数;所述第一射频参数包括所述第一电子设备支持的射频频段中空闲的射频频段,以及所述第一电子设备支持的信道中空闲的信道;
    接收所述第二电子设备发送的Wi-Fi参数协商响应,所述Wi-Fi参数协商响应中携带所述目标射频参数,所述目标射频参数包括所述第二电子设备从所述空闲的射频频段中选择的目标射频频段以及从所述空闲的信道中选择的目标信道。
  12. 根据权利要求10或11所述的方法,其特征在于,所述利用所述目标射频参数与所述第二电子设备建立Wi-Fi直连通道,包括:
    在所述目标射频频段和所述目标信道上发送连接建立请求,所述连接建立请求用于请求与所述第二电子设备建立所述Wi-Fi直连通道;
    接收所述第二电子设备发送的连接建立响应,完成所述Wi-Fi直连通道的建立。
  13. 一种电子设备,其特征在于,包括:处理器和存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求1-7中任一项所述的连接建立方法,或者,使得所述电子设备执行如权利要求8-12中任一项所述的连接建立方法。
  14. 一种计算机可读存储介质,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1-7中任一项所述的方法被实现,或者,如权利要求8-12中任一项所述的方法被实现。
  15. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-7中任一项所述的连接建立方法,或者,使得所述电子设备执行如权利要求8-12中任一项所述的连接建立方法。
PCT/CN2021/136692 2020-12-31 2021-12-09 连接建立方法及电子设备 WO2022143071A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21913812.0A EP4271006A4 (en) 2020-12-31 2021-12-09 CONNECTION ESTABLISHMENT METHOD AND ELECTRONIC DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011620420.1A CN114697929A (zh) 2020-12-31 2020-12-31 连接建立方法及电子设备
CN202011620420.1 2020-12-31

Publications (1)

Publication Number Publication Date
WO2022143071A1 true WO2022143071A1 (zh) 2022-07-07

Family

ID=82134576

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136692 WO2022143071A1 (zh) 2020-12-31 2021-12-09 连接建立方法及电子设备

Country Status (3)

Country Link
EP (1) EP4271006A4 (zh)
CN (1) CN114697929A (zh)
WO (1) WO2022143071A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116056053A (zh) * 2022-08-19 2023-05-02 荣耀终端有限公司 投屏方法、电子设备、系统及计算机可读存储介质
WO2024022156A1 (zh) * 2022-07-29 2024-02-01 华为技术有限公司 建立感知网络的方法及相关装置
WO2024046347A1 (zh) * 2022-09-01 2024-03-07 华为技术有限公司 一种数据分享方法、系统及相关装置
CN117858156A (zh) * 2024-03-08 2024-04-09 国网山东省电力公司枣庄供电公司 一种无人化自动领料信息的处理装置与方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440452A (zh) * 2022-07-14 2024-01-23 华为技术有限公司 切换方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594578A (zh) * 2008-05-30 2009-12-02 深圳华为通信技术有限公司 直连链路的建立方法、站设备及通信系统
CN108541384A (zh) * 2015-05-15 2018-09-14 高通股份有限公司 用于设备到设备通信的链路选择
CN110178389A (zh) * 2019-04-09 2019-08-27 北京小米移动软件有限公司 直连通信的参数确定方法、装置、终端及可读存储介质
CN110870353A (zh) * 2018-06-07 2020-03-06 华为技术有限公司 一种WiFi连接的方法及终端
WO2020076110A1 (en) * 2018-10-12 2020-04-16 Samsung Electronics Co., Ltd. Electronic device for determining p2p operating channel and method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818276B2 (en) * 2012-05-16 2014-08-26 Nokia Corporation Method, apparatus, and computer program product for controlling network access to guest apparatus based on presence of hosting apparatus
CN107529124A (zh) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 一种无线直连建立方法、装置和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594578A (zh) * 2008-05-30 2009-12-02 深圳华为通信技术有限公司 直连链路的建立方法、站设备及通信系统
CN108541384A (zh) * 2015-05-15 2018-09-14 高通股份有限公司 用于设备到设备通信的链路选择
CN110870353A (zh) * 2018-06-07 2020-03-06 华为技术有限公司 一种WiFi连接的方法及终端
WO2020076110A1 (en) * 2018-10-12 2020-04-16 Samsung Electronics Co., Ltd. Electronic device for determining p2p operating channel and method thereof
CN110178389A (zh) * 2019-04-09 2019-08-27 北京小米移动软件有限公司 直连通信的参数确定方法、装置、终端及可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4271006A4

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024022156A1 (zh) * 2022-07-29 2024-02-01 华为技术有限公司 建立感知网络的方法及相关装置
CN116056053A (zh) * 2022-08-19 2023-05-02 荣耀终端有限公司 投屏方法、电子设备、系统及计算机可读存储介质
CN116056053B (zh) * 2022-08-19 2023-10-27 荣耀终端有限公司 投屏方法、电子设备、系统及计算机可读存储介质
WO2024046347A1 (zh) * 2022-09-01 2024-03-07 华为技术有限公司 一种数据分享方法、系统及相关装置
CN117858156A (zh) * 2024-03-08 2024-04-09 国网山东省电力公司枣庄供电公司 一种无人化自动领料信息的处理装置与方法
CN117858156B (zh) * 2024-03-08 2024-05-10 国网山东省电力公司枣庄供电公司 一种无人化自动领料信息的处理装置与方法

Also Published As

Publication number Publication date
EP4271006A1 (en) 2023-11-01
CN114697929A (zh) 2022-07-01
EP4271006A4 (en) 2024-05-15

Similar Documents

Publication Publication Date Title
WO2022143071A1 (zh) 连接建立方法及电子设备
US11395213B2 (en) Systems and methods for implementing multiple band service discovery
EP3979571A1 (en) Method for controlling device and terminal
US10849171B2 (en) Device and method for maintaining a security level
US9479224B2 (en) Apparatus and method for connecting to device in wireless terminal
WO2014183404A1 (zh) 数据传输方法、装置及系统、终端
WO2014071564A1 (en) Proxy connection method and apparatus
WO2022068513A1 (zh) 无线通信方法和终端设备
WO2021104448A1 (zh) 一种密钥信息的同步方法、系统及设备
WO2021147660A1 (zh) 一种数据传输方法及设备
US20240049056A1 (en) Terminal device, multi-link communication method, and chip
CN114679708A (zh) 通信方法、系统及电子设备
CN115278611A (zh) 一种多设备建立连接的方法及设备
CN113038627B (zh) 一种文件分享方法、移动设备、计算机存储介质
WO2022228051A1 (zh) 一种设备组网方法、电子设备及存储介质
JP5843634B2 (ja) 通信装置、および、その制御方法、プログラム
WO2023071993A1 (zh) 蓝牙配对方法、设备、系统和存储介质
WO2022160967A1 (zh) 通信方法、移动设备、电子设备和计算机可读存储介质
WO2022194105A1 (zh) 一种设备连接方法、终端设备和分布式系统
WO2023051204A1 (zh) 跨设备连接方法、电子设备及存储介质
WO2023185593A1 (zh) 设备登录方法、电子设备及系统
US20230337147A1 (en) Device Configuration Method and Device
CN112615891B (zh) 配对方法及设备
JP2018007059A (ja) 通信装置、通信制御方法及びプログラム

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021913812

Country of ref document: EP

Effective date: 20230728