Device connection methods, systems, electronic devices and storage media

By reorganizing and detecting the SoftAP information of electronic devices to establish P2P GC direct connection, the problem of load imbalance during electronic device interconnection is solved, improving user experience and connection flexibility.

CN115835416BActive Publication Date: 2026-11-17BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211474959.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2026-11-17
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

In existing technologies, the interconnection methods between electronic devices lead to unbalanced loads and poor user experience, especially when using the SoftAP-WLAN STA connection solution, which requires switching networks and is not flexible enough, thus affecting the user experience.

Method used

By acquiring the necessary SoftAP information from the second electronic device, reassembling it into configuration information conforming to the P2P specification, and detecting whether it has agreed-upon information, a direct connection between the SoftAP and the P2P GC is established, avoiding switching WLAN network connections.

Benefits of technology

It enables direct connection between electronic devices without affecting the WLAN network connection with the AP, improves user experience, and allows devices to connect to different APs, avoiding traffic contention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115835416B_ABST
    Figure CN115835416B_ABST
Patent Text Reader

Abstract

This disclosure relates to a device connection method, system, electronic device, and storage medium. The method is applied to a first electronic device and includes: obtaining necessary information of a second electronic device's SoftAP, including an SSID conforming to P2P specifications; reconstructing the necessary information to obtain configuration information; initiating a connection to the second electronic device based on the configuration information, and detecting whether the second electronic device has agreed-upon information, including an agreed-upon OUI; in response to detecting that the second electronic device has agreed-upon information, establishing a direct connection between the SoftAP and the P2P GC with the second electronic device. This direct connection does not affect the connections between the first and second electronic devices and their respective APs. Therefore, the first electronic device does not need to use the network of the second electronic device, thus avoiding increased load on the second electronic device and improving user experience; the first and second electronic devices do not use the same local area network and do not compete for bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a device connection method, system, electronic device, and storage medium. Background Technology

[0002] With the continuous development of communication and terminal technologies, the interconnection and interoperability between electronic devices has attracted increasing attention. Among related technologies, the interconnection between mainstream Android smart devices generally uses standard P2P connection schemes or SoftAP-WLAN STA connection schemes. For interconnection between smart devices that do not support P2P (such as Windows PCs), the only options are to use the same local area network or the SoftAP-WLAN STA connection scheme.

[0003] If the interconnection between electronic devices uses a SoftAP-WLAN STA connection scheme, the electronic device acting as the WLAN STA needs to switch its original WLAN network to connect to the electronic device acting as the SoftAP, and then use the network of the SoftAP device, resulting in a high load on the SoftAP device. Furthermore, the network switching operation required by the WLAN STA device is inflexible and negatively impacts user experience. If the interconnection between electronic devices uses the same local area network (LAN), the two interconnected electronic devices will share the LAN's traffic, leading to anticipated high load and contention. Summary of the Invention

[0004] To overcome the problems existing in the related technologies, this disclosure provides a device connection method, system, electronic device and storage medium.

[0005] According to a first aspect of the present disclosure, a device connection method is provided, applied to a first electronic device, the method comprising:

[0006] Obtain the necessary information of the SoftAP of the second electronic device, including the SSID, which conforms to the P2P specification;

[0007] The necessary information is reorganized to obtain the configuration information of the target P2P Group;

[0008] Based on the configuration information, a connection is initiated with the second electronic device, and it is detected whether the second electronic device has agreed-upon information, the agreed-upon information including the agreed-upon OUI;

[0009] In response to detecting that the second electronic device has the agreed information, a direct connection between SoftAP and P2P GC is established with the second electronic device.

[0010] Optionally, the step of reorganizing the necessary information to obtain the configuration information of the target P2P Group includes:

[0011] Based on a preset P2P template, the necessary information is formatted and converted to form configuration information that conforms to P2P specifications.

[0012] Optionally, the step of obtaining the necessary information of the SoftAP of the second electronic device includes:

[0013] The necessary information of the SoftAP of the second electronic device is obtained through an OOB method, wherein the OOB method includes at least one of the following: barcode scanning, Bluetooth, BLE, and NFC.

[0014] Optionally, during the process of obtaining the necessary information of the SoftAP of the second electronic device to establish a direct connection between the SoftAP and the P2P GC with the second electronic device, the connection between the first electronic device and the AP can be maintained.

[0015] Optionally, after establishing a direct connection between the SoftAP and the P2P GC with the second electronic device, the first electronic device can maintain, establish, or disconnect its connection with the AP while keeping the direct connection with the second electronic device unchanged.

[0016] According to a second aspect of the present disclosure, a device connection method is provided, applied to a second electronic device, the method comprising:

[0017] Start SoftAP and configure the convention information, including the agreed OUI;

[0018] Generate SoftAP configuration information, which includes necessary information, including an SSID that conforms to the P2P specification. The necessary information is used to be acquired and reassembled by the first electronic device to generate configuration information for a target P2P Group. The configuration information is used by the first electronic device to initiate a connection based on the configuration information.

[0019] In response to the connection initiated by the first electronic device, after the agreed information is detected by the first electronic device, a direct connection between SoftAP and P2P GC is established with the first electronic device.

[0020] Optionally, during the process of starting the SoftAP to establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the connection between the second electronic device and the AP can be maintained.

[0021] Optionally, after establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the second electronic device can maintain, establish, or disconnect its connection with the AP while keeping the direct connection with the first electronic device unchanged.

[0022] According to a third aspect of the present disclosure, a device connection system is provided, including a first electronic device and a second electronic device;

[0023] The first electronic device is configured to perform the device connection method described above for the first electronic device;

[0024] The second electronic device is configured to perform the device connection method described above for the second electronic device.

[0025] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising:

[0026] First processor;

[0027] A first memory for storing instructions executable by a first processor;

[0028] The first processor is configured to execute the device connection method applied to the first electronic device.

[0029] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:

[0030] Second processor;

[0031] A second memory used to store instructions executable by a second processor;

[0032] The second processor is configured to execute the device connection method applied to the second electronic device as described above.

[0033] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the device connection method applied to a first electronic device.

[0034] According to a seventh aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the device connection method applied to a second electronic device.

[0035] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0036] Through the above technical solution, the second electronic device, acting as a SoftAP, configures specific agreement information and generates necessary information including an SSID conforming to the P2P specification when the SoftAP is activated. The first electronic device, acting as a P2P GC, acquires and reassembles this necessary information to form configuration information conforming to the P2P specification, initiates a connection to the second electronic device based on this configuration information, and detects whether the second electronic device has the agreement information. If the agreement information is detected, a direct connection between the SoftAP and the P2P GC is established between the first and second electronic devices. After the direct connection between the SoftAP and the P2P GC is established, data transmission or screen mirroring can occur between the first and second electronic devices. This can be either the first electronic device transmitting data or mirroring to the second electronic device, or vice versa. Since the connection between the first and second electronic devices is a direct connection between the SoftAP and the P2P GC, it does not affect the WLAN network connection between the first electronic device and the AP (Access Point, such as a wireless router), nor does it affect the WLAN network connection between the second electronic device and the AP. Therefore, when the first electronic device connects to the second electronic device, there is no need to switch the WLAN network connection between the first electronic device and the AP. The first electronic device does not need to use the second electronic device's network, which does not increase the load on the second electronic device and improves the user experience. Furthermore, the first and second electronic devices can connect to different APs. For example, the first electronic device can connect to the first AP, and the second electronic device can connect to the second AP. In this case, the first and second electronic devices are not using the same local area network, and therefore they will not compete for bandwidth.

[0037] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0038] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0039] Figure 1 This is a flowchart illustrating a device connection method according to an exemplary embodiment.

[0040] Figure 2 This is a flowchart illustrating another device connection method according to an exemplary embodiment.

[0041] Figure 3 This is a block diagram illustrating a device connection system according to an exemplary embodiment.

[0042] Figure 4 This is an interactive timing diagram illustrating a device connection system according to an exemplary embodiment.

[0043] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0044] Figure 6 This is a block diagram illustrating another electronic device according to an exemplary embodiment. Detailed Implementation

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0046] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.

[0047] This disclosure also provides a device connection method applied to a first electronic device. The first electronic device supports P2P functionality. P2P (peer-to-peer) corresponds to the WiFi Direct protocol launched by the Wi-Fi Alliance, and is also known as WiFi Direct, WiFi Direct, WLAN (Wireless LAN) Direct Connection, etc. Figure 1 This is a flowchart illustrating a device connection method according to an exemplary embodiment. Figure 1 As shown, the device connection method includes the following steps:

[0048] In step S11, the necessary information of the SoftAP of the second electronic device is obtained, including the SSID, which conforms to the P2P specification.

[0049] SoftAP is short for Soft Access Point, also known as a soft AP / Hotspot / Portable Hotspot, etc. SSID is short for Service Set Identifier. The second electronic device must support the SoftAP function. Before step S11, the second electronic device can pre-start SoftAP and generate configuration information, which includes necessary information, including an SSID conforming to the P2P specification. Typically, for security reasons, the necessary information for the second electronic device also includes a password; therefore, the necessary information for the SoftAP of the second electronic device obtained through step S11 also includes the password.

[0050] In step S12, the necessary information is reorganized to obtain the configuration information of the target P2P Group.

[0051] P2P Group is an abbreviation for peer-to-peer Group. The configuration information can be Config information. Step S12 converts the necessary SoftAP information from SoftAP format to P2P format. If the necessary information also includes a password, decryption of the necessary information is performed before step S12. Step S12 involves reconstructing the decrypted necessary information to obtain the configuration information of the target P2P Group.

[0052] In step S13, a connection is initiated to the second electronic device based on the configuration information, and it is detected whether the second electronic device has agreed information, the agreed information including the agreed OUI.

[0053] OUI is an abbreviation for Organizationally Unique Identifier. The agreed-upon information can be a pre-defined Vendor Information Element (VIE). The second electronic device can configure this agreed-upon information when it starts SoftAP. When two electronic devices initiate a P2P connection, it checks whether the connected electronic device meets the P2P IE conditions. In this embodiment, when the first electronic device initiates a connection to the second electronic device based on the configuration information, it checks whether the second electronic device has the agreed-upon information. If the agreed-upon information is detected, a direct connection between SoftAP and P2P GC is established with the second electronic device; if the agreed-upon information is not detected, a direct connection between SoftAP and P2P GC cannot be established with the second electronic device.

[0054] In step S14, in response to detecting that the second electronic device has the agreed information, a direct connection between SoftAP and P2P GC is established with the second electronic device.

[0055] P2P GC is an abbreviation for peer-to-peer group client.

[0056] Through the above technical solution, the second electronic device, acting as a SoftAP, configures specific agreement information and generates necessary information including an SSID conforming to the P2P specification when the SoftAP is activated. The first electronic device, acting as a P2P GC, acquires and reassembles this necessary information to form configuration information conforming to the P2P specification, initiates a connection to the second electronic device based on this configuration information, and detects whether the second electronic device has the agreement information. If the agreement information is detected, a direct connection between the SoftAP and the P2P GC is established between the first and second electronic devices. After the direct connection between the SoftAP and the P2P GC is established, data transmission or screen mirroring can occur between the first and second electronic devices. This can be either the first electronic device transmitting data or mirroring to the second electronic device, or vice versa. Since the connection between the first and second electronic devices is a direct connection between the SoftAP and the P2P GC, it does not affect the WLAN network connection between the first electronic device and the AP (Access Point, such as a wireless router), nor does it affect the WLAN network connection between the second electronic device and the AP. Therefore, when the first electronic device connects to the second electronic device, there is no need to switch the WLAN network connection between the first electronic device and the AP. The first electronic device does not need to use the second electronic device's network, which does not increase the load on the second electronic device and improves the user experience. Furthermore, the first and second electronic devices can connect to different APs. For example, the first electronic device can connect to the first AP, and the second electronic device can connect to the second AP. In this case, the first and second electronic devices are not using the same local area network, and therefore they will not compete for bandwidth.

[0057] The first electronic device supports P2P functionality, and the second electronic device supports SoftAP functionality. The first and second electronic devices can be mobile phones, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart speakers, set-top boxes (STBs), televisions, or smart screens, etc., without any restrictions.

[0058] Optionally, step S12 includes:

[0059] Based on a preset P2P template, the necessary information is formatted and converted to form configuration information that conforms to P2P specifications.

[0060] After obtaining the necessary information, the information can be formatted and filled into a preset P2P template to form configuration information that conforms to P2P specifications.

[0061] Optionally, step S11 includes:

[0062] The necessary information of the SoftAP of the second electronic device is obtained through an OOB method, wherein the OOB method includes at least one of the following: barcode scanning, Bluetooth, BLE, and NFC.

[0063] OOB is an abbreviation for Out of Band, which means out-of-band data.

[0064] Optionally, during the process of obtaining the necessary information of the SoftAP of the second electronic device to establish a direct connection between the SoftAP and the P2P GC with the second electronic device, the connection between the first electronic device and the AP can be maintained.

[0065] The first electronic device can also act as a STA (a type of WLAN mode, sometimes also called a Station) and connect to an AP (Access Point, such as a wireless router). Furthermore, the direct connection between the SoftAP and P2P GC between the first and second electronic devices will not affect the WLAN network connection between the first electronic device and the AP. If, during the process of obtaining the necessary information of the second electronic device's SoftAP and establishing a direct connection between the SoftAP and P2P GC, the first electronic device is already connected to the AP, it can choose to maintain or disconnect the connection with the AP according to the user's selection. If, during the process of obtaining the necessary information of the second electronic device's SoftAP and establishing a direct connection between the SoftAP and P2P GC, the first electronic device is not connected to the AP, it can choose to establish or not establish a connection with the AP according to the user's selection.

[0066] Optionally, after establishing a direct connection between the SoftAP and the P2P GC with the second electronic device, the first electronic device can maintain, establish, or disconnect its connection with the AP while keeping the direct connection with the second electronic device unchanged.

[0067] Similarly, since the SoftAP and P2P GC are directly connected between the first electronic device and the second electronic device, the WLAN network connection between the first electronic device and the AP will not be affected. Therefore, after establishing a direct connection between the SoftAP and P2P GC with the second electronic device, the first electronic device can, while maintaining the direct connection with the second electronic device, establish a connection with the AP according to user selection if the first electronic device is not connected to the AP; if the first electronic device is already connected to the AP, it can maintain or disconnect the connection with the AP according to user selection.

[0068] Based on the above technical concept, this disclosure also provides a device connection method applied to a second electronic device. The second electronic device supports the SoftAP function. Figure 2 This is a flowchart illustrating a device connection method according to an exemplary embodiment. Figure 2 As shown, the device connection method includes the following steps:

[0069] Step S21: Start SoftAP and configure convention information, including the convention OUI.

[0070] Step S22: Generate SoftAP configuration information. The SoftAP configuration information includes necessary information, including an SSID that conforms to the P2P specification. The necessary information is used to be acquired and reassembled by the first electronic device to generate configuration information for the target P2P Group. The configuration information is used by the first electronic device to initiate a connection based on the configuration information.

[0071] Step S23: In response to the connection initiated by the first electronic device, after the agreed information is detected by the first electronic device, a direct connection between SoftAP and P2P GC is established with the first electronic device.

[0072] It should be understood that the specific implementation of steps S21 to S23 has been described in detail in the above embodiments of the device connection method applied to the first electronic device, and will not be repeated here.

[0073] Similarly, through the above technical solution, the second electronic device, acting as a SoftAP, configures specific agreement information and generates necessary information including an SSID conforming to the P2P specification when the SoftAP is activated. The first electronic device, acting as a P2P GC, acquires and reassembles this necessary information to form configuration information conforming to the P2P specification, and initiates a connection to the second electronic device based on this configuration information. It also detects whether the second electronic device possesses the agreement information. If the agreement information is detected, a direct connection between the SoftAP and the P2P GC is established between the first and second electronic devices. After the direct connection between the SoftAP and the P2P GC is established, data transmission or screen mirroring can occur between the two devices. This can be either the first electronic device transmitting data or mirroring it to the second electronic device, or vice versa. Since the connection between the first and second electronic devices is a direct connection between the SoftAP and the P2P GC, it does not affect the WLAN network connection between the first electronic device and the AP (Access Point, such as a wireless router), nor does it affect the WLAN network connection between the second electronic device and the AP. Therefore, when the first electronic device connects to the second electronic device, there is no need to switch the WLAN network connection between the first electronic device and the AP. The first electronic device does not need to use the second electronic device's network, which does not increase the load on the second electronic device and improves the user experience. Furthermore, the first and second electronic devices can connect to different APs. For example, the first electronic device can connect to the first AP, and the second electronic device can connect to the second AP. In this case, the first and second electronic devices are not using the same local area network, and therefore they will not compete for bandwidth.

[0074] Optionally, during the process of starting the SoftAP to establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the connection between the second electronic device and the AP can be maintained.

[0075] The second electronic device can also function as a STA (a type of WLAN mode, sometimes also called a Station) and connect to an AP (Access Point, such as a wireless router). Furthermore, the direct connection between the SoftAP and P2P GC between the second and first electronic devices will not affect the WLAN network connection between the second electronic device and the AP. If the second electronic device is already connected to the AP during the process of starting the SoftAP and establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the second electronic device can choose to maintain or disconnect its connection with the AP. If the second electronic device is not connected to the AP during the process of starting the SoftAP and establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the second electronic device can choose to establish or not establish a connection with the AP.

[0076] Optionally, after establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the second electronic device can maintain, establish, or disconnect its connection with the AP while keeping the direct connection with the first electronic device unchanged.

[0077] Similarly, since the SoftAP and P2P GC are directly connected between the second electronic device and the first electronic device, the WLAN network connection between the second electronic device and the AP will not be affected. Therefore, after establishing a direct connection between the SoftAP and P2P GC with the first electronic device, the second electronic device can, while maintaining the direct connection with the first electronic device, establish a connection with the AP if the second electronic device is not connected to the AP, according to user selection; if the second electronic device is already connected to the AP, the second electronic device can maintain or disconnect the connection with the AP according to user selection. Based on the above technical concept, this disclosure also provides a device connection system. Figure 3 This is a block diagram illustrating a device connection system according to an exemplary embodiment. Figure 3 As shown, the device connection system includes the first electronic device 10 and the second electronic device 20 described above. The first electronic device 10 is configured to use the device connection method described above. The second electronic device 20 is configured to use the device connection method described above.

[0078] Figure 4This is an interaction timing diagram illustrating a device connection system according to an exemplary embodiment. For example... Figure 4 As shown, when executing the device connection method, the device connection system may include the following steps:

[0079] S41, the second electronic device starts SoftAP and configures the convention information, which includes the convention OUI.

[0080] S42, the second electronic device generates SoftAP configuration information, the SoftAP configuration information includes necessary information, the necessary information includes SSID, the SSID conforms to the P2P specification.

[0081] S43, the first electronic device obtains the necessary information of the second electronic device's SoftAP.

[0082] S44, the first electronic device reassembles the necessary information to obtain the configuration information of the target P2P Group.

[0083] S45, the first electronic device initiates a connection to the second electronic device based on the configuration information, and detects whether the second electronic device has agreed information.

[0084] S46, in response to detecting that the second electronic device has the agreed information, the first electronic device establishes a direct connection between SoftAP and P2P GC with the second electronic device.

[0085] It should be understood that the specific implementation methods of steps S41 to S47 have been described in detail in the above embodiments regarding the connection methods applied to the first electronic device and the second electronic device, respectively, and will not be repeated here. Based on the above technical concept, this disclosure also provides an electronic device. This electronic device corresponds to the first electronic device described above. Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 5 As shown, the electronic device includes:

[0086] First processor 11;

[0087] A first memory 12 is used to store executable instructions of the first processor 11;

[0088] The first processor 11 is configured to execute the device connection method applied to the first electronic device.

[0089] The electronic device supports P2P functionality and can be a mobile phone, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), smart speaker, set-top box (STB), television or smart screen, etc., including the aforementioned first processor and first memory, without any restrictions.

[0090] Based on the above-described technical concept, this disclosure also provides an electronic device. This electronic device corresponds to the second electronic device described above. Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 6 As shown, the electronic device includes:

[0091] Second processor 21;

[0092] A second memory 22 is used to store executable instructions of the second processor 21;

[0093] The second processor 21 is configured to execute a device connection method applied to the second electronic device.

[0094] The electronic device supports the SoftAP function and can be a mobile phone, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), smart speaker, set-top box (STB), television or smart screen, etc., including the aforementioned second processor and second memory, without any restrictions.

[0095] This disclosure also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the device connection method for a first electronic device provided in this disclosure.

[0096] This disclosure also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the device connection method for a second electronic device provided in this disclosure.

[0097] In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable device, the computer program having a code portion for performing the steps of the device connection method applied to the first electronic device as described above when executed by the programmable device.

[0098] In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable device, the computer program having a code portion for performing the steps of the device connection method applied to the second electronic device as described above when executed by the programmable device.

[0099] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0100] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A device connection method characterized by, The method includes: Obtain the necessary information of the SoftAP of the second electronic device, including the SSID, which conforms to the P2P specification. The second electronic device pre-starts SoftAP and generates SoftAP configuration information, which includes the necessary information. The necessary information is reorganized to obtain the configuration information of the target P2P Group; Based on the configuration information, a connection is initiated with the second electronic device, and it is detected whether the second electronic device has agreed-upon information, the agreed-upon information including the agreed-upon OUI; In response to detecting that the second electronic device has the agreed information, a direct connection between SoftAP and P2P GC is established with the second electronic device; The step of reorganizing the necessary information to obtain the configuration information of the target P2P Group includes: Based on a preset P2P template, the necessary information is converted into a P2P format, including converting the acquired SoftAP necessary information from SoftAP format to P2P format to form configuration information that conforms to the P2P specification. Specifically, during the process of obtaining the necessary information of the SoftAP of the second electronic device to establish a direct connection between the SoftAP and the P2P GC with the second electronic device, the connection between the first electronic device and the AP can be maintained. During the process of starting the SoftAP to establish a direct connection between the SoftAP and the P2P GC with the first electronic device, the connection between the second electronic device and the AP can be maintained.

2. The device connection method according to claim 1, wherein The steps for obtaining the necessary information of the SoftAP of the second electronic device include: The necessary information of the SoftAP of the second electronic device is obtained through an OOB method, wherein the OOB method includes at least one of the following: barcode scanning, Bluetooth, BLE, and NFC.

3. The device connection method according to any one of claims 1-2, wherein, After establishing a direct connection between the SoftAP and the P2P GC with the second electronic device, the first electronic device can maintain, establish, or disconnect its connection with the AP while keeping the direct connection with the second electronic device unchanged.

4. A device connection method characterized by, The method includes: Start SoftAP and configure the convention information, including the agreed OUI; Generating SoftAP configuration information, the SoftAP configuration information includes necessary information, including an SSID that conforms to the P2P specification. The necessary information is used to be acquired and reassembled by a first electronic device to generate configuration information for a target P2P Group. The configuration information is used by the first electronic device to initiate a connection based on the configuration information. The reassembly includes: converting the format of the necessary information based on a preset P2P template, including: converting the acquired SoftAP necessary information from SoftAP format to P2P format to form configuration information that conforms to the P2P specification. In response to the connection initiated by the first electronic device, after the agreed information is detected by the first electronic device, a direct connection between SoftAP and P2P GC is established with the first electronic device. During the process of obtaining the necessary information of SoftAP of the second electronic device and establishing a direct connection between SoftAP and P2P GC with the second electronic device, the connection between the first electronic device and AP can be maintained. During the process of starting SoftAP and establishing a direct connection between SoftAP and P2P GC with the first electronic device, the connection between the second electronic device and AP can be maintained.

5. The device connection method according to claim 4, wherein After establishing a direct connection between the SoftAP and the P2P GC with the first electronic device, the second electronic device can maintain, establish, or disconnect its connection with the AP while keeping the direct connection with the first electronic device unchanged.

6. A device connection system, characterized by Including the first electronic device and the second electronic device; The first electronic device is configured to perform the method of any one of claims 1-3; The second electronic device is configured to perform the method of any one of claims 4-5.

7. An electronic device, comprising: include: First processor; A first memory for storing instructions executable by a first processor; The first processor is configured to execute the method of any one of claims 1-3.

8. An electronic device, comprising: include: Second processor; A second memory used to store instructions executable by a second processor; The second processor is configured to execute the method of any one of claims 4-5.

9. A computer-readable storage medium having stored thereon computer program instructions, wherein, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1-3.

10. A computer-readable storage medium having stored thereon computer program instructions, wherein, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 4-5.

Citation Information

Patent Citations

  • Information detection method and electronic equipment

    CN111291369A

  • Data transmission method based on Wi-Fi P2P and electronic equipment

    CN115022849A