Equipment connection method and device, electronic equipment and computer readable storage medium
By initiating the connection only when a probe request frame is received from a paired device after the TV is turned on, the performance degradation caused by automatic TV connection is resolved, achieving a more stable Wi-Fi connection.
Patent Information
- Application Number
- CN202511047962.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-10-17
AI Technical Summary
After the TV is turned on, it automatically starts a point-to-point hotspot to connect to the smart speaker, causing Wi-Fi module performance degradation or unstable connection, affecting network speed.
When the second device needs to connect to the first device, the first device starts the connection function, and ensures that only paired devices can be successfully connected by receiving and verifying the information to be verified in the detection request frame sent by the second device.
This avoids the negative performance impact caused by automatic connection after the first device is turned on, and improves the performance and connection stability of the device.
Smart Images

Figure CN120812583A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, in particular to a device connection method and device, electronic device and computer readable storage medium. BACKGROUND
[0002] Wireless direct connection (Wi-Fi Direct) allows devices to establish a point-to-point (P2P) connection directly through Wi-Fi technology without an intermediate wireless access point (Access Point, AP). In a traditional method, a television will automatically start a P2P hotspot after starting, and a smart speaker can directly connect to the P2P hotspot, thereby realizing wireless direct connection between the smart speaker and the television. The television generally also uses a Wi-Fi module to connect to a router to use the network. However, the P2P hotspot started by the television and the connection to the router use the same Wi-Fi module, and starting the P2P hotspot when the speaker is not used can negatively affect the performance of the Wi-Fi module, resulting in a decrease in network speed or unstable connection. SUMMARY
[0003] Embodiments of the present application provide a device connection method and device, electronic device and computer readable storage medium, which can start the function of connecting the second device only when the first device needs to connect the second device.
[0004] In a first aspect, embodiments of the present application provide a device connection method applied to a first device, the method comprising:
[0005] When a probe request frame sent by a second device is received, obtaining to-be-verified information carried in the probe request frame;
[0006] Obtaining verification information of a paired device corresponding to the first device;
[0007] When the to-be-verified information passes verification of the verification information, starting a function of connecting the second device.
[0008] In a second aspect, embodiments of the present application provide a device connection method applied to a second device, the method comprising:
[0009] Sending a probe request frame to a first device;
[0010] The probe request frame carries to-be-verified information, so that the first device starts a function of connecting the second device when the to-be-verified information passes verification of the verification information;
[0011] The verification information is verification information of a paired device corresponding to the first device.
[0012] In a third aspect, an apparatus for device connection is provided, which is applied to a first device and includes:
[0013] a first obtaining module, configured to obtain to-be-verified information carried in a probe request frame sent by a second device when the probe request frame is received;
[0014] a second obtaining module, configured to obtain verification information of a paired device corresponding to the first device;
[0015] a starting module, configured to start a function of connecting the second device when the to-be-verified information passes verification of the verification information.
[0016] In a fourth aspect, an apparatus for device connection is provided, which is applied to a second device and includes:
[0017] a sending module, configured to send a probe request frame to a first device;
[0018] wherein the probe request frame carries to-be-verified information, so that the first device starts a function of connecting the second device when the to-be-verified information passes verification of verification information.
[0019] The verification information is verification information of a paired device corresponding to the first device.
[0020] In a fifth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program, when executed by the processor, implements the steps of the device connection method described above.
[0021] In a sixth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the device connection method described above.
[0022] In a seventh aspect, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementation manners described in the embodiments of the present application.
[0023] The embodiment of the present application has the following beneficial effects: the second device sends a probe request frame carrying to-be-verified information when it needs to connect the first device, thus the first device can confirm that the second device requests to connect the first device when the first device receives the probe request frame sent by the second device and the to-be-verified information carried in the probe request frame passes the verification of the verification information of the corresponding pairing device of the first device, so that the first device starts the function of connecting the second device only when the second device needs to connect the first device; the negative influence on the performance of the first device caused by the automatic starting of the connection function of the first device after the first device is powered on but the second device does not actually connect is avoided; in this way, the performance of the first device is improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0025] Figure 1 is a step schematic diagram of the device connection method provided by an embodiment of the present application;
[0026] Figure 2 is a flow schematic diagram of the device connection method provided by an embodiment of the present application;
[0027] Figure 3 is a step schematic diagram of the device connection method provided by an embodiment of the present application;
[0028] Figure 4 is a structure schematic diagram of the device connection apparatus provided by an embodiment of the present application;
[0029] Figure 5 is a structure schematic diagram of the device connection apparatus provided by an embodiment of the present application;
[0030] Figure 6 is a structure schematic diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the present application will be described in detail below with reference to the drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the protection scope of the present application.
[0032] In order to facilitate understanding, the following terms are explained first:
[0033] Wi-Fi Direct is a technology standard introduced by the Wi-Fi Alliance that allows devices to establish a peer-to-peer connection directly through Wi-Fi technology without the need for an intermediate wireless access point. Wi-Fi Direct provides the same data rates and range as traditional Wi-Fi, but removes the dependency on a wireless access point, making direct communication between devices more convenient and efficient.
[0034] A Basic Service Set Identifier (BSSID) is a unique MAC address that identifies the interface of a wireless access point or wireless device.
[0035] A Probe Request frame is a management frame used by a wireless device to actively scan for wireless networks in its surroundings. The Probe Request frame can carry information such as the device's capabilities and the BSSID it expects to connect to.
[0036] A Peer-to-Peer Group (P2P Group) is a network composed of multiple devices that support Wi-Fi Direct. These devices share resources and communicate through direct connections without relying on a wireless access point.
[0037] A Group Owner (GO) is a special device in a P2P Group that acts like a wireless access point in a traditional wireless network. In a P2P network, the GO is played by one of the peer devices.
[0038] In one embodiment, as shown in FIG. 1, a device connection method is provided, although the logical order is shown in the step diagram, in some cases, the steps shown or described can be performed in an order different from that shown in the figure. Specifically, the device connection method can be applied in a first device, wherein the first device can have a wireless direct connection and / or a Bluetooth connection with a second device. The first device can include, but is not limited to, one or more of a smart TV, a laptop, a desktop computer, and an in-vehicle computer. The second device can include, but is not limited to, one or more of a smart speaker and a game controller. Figure 1 In one embodiment, in a wireless direct connection scenario, the first device can be a group owner, and the second device can be a device requesting to join a P2P group; in another embodiment, in a wireless direct connection scenario, the first device can be a device requesting to join a P2P group, and the second device can be a group owner.
[0039]
[0040] In one embodiment, in the Bluetooth connection scenario, the first device can be a master device, and the second device can be a slave device; in another embodiment, in the Bluetooth connection scenario, the first device can be a slave device, and the second device can be a master device.
[0041] The following are described in detail respectively. It should be noted that the description order of the following embodiments is not limited as the priority order of the embodiments.
[0042] According to Figure 1 The device connection method shown in the figure is applied to a first device, and the method at least includes steps S110 to S130, which are described in detail as follows:
[0043] In step S110, when a probe request frame sent by a second device is received, the to-be-verified information carried in the probe request frame is obtained.
[0044] The second device can continuously send a probe request frame when it needs to connect to the first device, and the probe request frame is used to probe the first device that can be connected to the second device. The to-be-verified information is included in the probe request frame; the first device can determine whether the second device corresponding to the to-be-verified information is a paired or connected device according to the to-be-verified information, so as to determine whether it can be connected to the second device.
[0045] In one embodiment, the to-be-verified information can include device information of the second device itself. In the wireless direct connection scenario, the to-be-verified information can include the BSSID of the Wi-Fi module of the second device; in the Bluetooth connection scenario, the to-be-verified information can include the Bluetooth pairing information of the second device.
[0046] In another embodiment, the to-be-verified information can be encrypted information.
[0047] In step S120, the verification information of the paired device corresponding to the first device is obtained.
[0048] The paired device corresponding to the first device is a device that has historically paired and connected with the first device. When the paired device corresponding to the first device historically pairs and connects with the first device, the first device can obtain the verification information of the paired device and save the verification information. The paired device (which can be the second device) corresponding to the first device can obtain and save the connection information of the first device when it historically pairs and connects with the first device, so as to establish a connection with the first device through the saved connection information of the first device when the first device starts the function of connecting the second device.
[0049] Optionally, the check information of the pairing device corresponding to the first device can include the BSSID of the pairing device; the check information of the pairing device corresponding to the first device can include the Bluetooth pairing information of the pairing device; the check information of the pairing device corresponding to the first device can include decryption information, which can be sent by the pairing device to the first device or can be agreed by the pairing device and the first device.
[0050] After the first device obtains the to-be-checked information, the first device can obtain the check information of the pairing device corresponding to the first device.
[0051] In step S130, when the to-be-checked information passes the check of the check information, the function of connecting the second device is started.
[0052] In one of the embodiments, in the wireless direct connection scenario, the first device can determine whether the to-be-checked information passes the check of the check information by judging whether the BSSID of the second device included in the to-be-checked information is consistent with the BSSID of the pairing device corresponding to the first device. When the BSSID of the second device included in the to-be-checked information is consistent with the BSSID of the pairing device corresponding to the first device, it can be determined that the to-be-checked information passes the check of the check information, and the function of wireless direct connection with the second device is started, that is, the point-to-point hotspot is started, so that the second device connects the first device through the point-to-point hotspot.
[0053] In one of the embodiments, in the Bluetooth connection scenario, the first device can determine whether the to-be-checked information passes the check of the check information by judging whether the Bluetooth pairing information of the second device included in the to-be-checked information is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device. When the Bluetooth pairing information of the second device included in the to-be-checked information is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, it can be determined that the to-be-checked information passes the check of the check information, and the Bluetooth function is started, that is, the point-to-point hotspot is started, so that the second device connects the first device through the point-to-point hotspot, and the second device and the first device are connected through Bluetooth.
[0054] In one of the embodiments, when the to-be-checked information includes encryption information and the check information includes decryption information, the first device can judge whether the encryption information can be decrypted according to the decryption information. In the case of successful decryption, it can be determined that the to-be-checked information passes the check of the check information, and the function of connecting the second device is started. The function of connecting the second device started can be set or agreed according to actual needs, which can be starting the point-to-point hotspot or starting the Bluetooth function.
[0055] By adopting the technical scheme of the embodiment of the present application, when the second device needs to connect the first device, the second device sends a probe request frame carrying to-be-verified information, therefore, the first device can confirm that the second device requests to connect the first device when the first device receives the probe request frame sent by the second device and the to-be-verified information carried in the probe request frame passes the verification of the verification information of the pairing device corresponding to the first device, so that the first device starts the function of connecting the second device only when the second device needs to connect the first device, thereby avoiding the negative impact on the performance of the first device caused by the fact that the first device automatically starts the connection function after being powered on but the second device does not actually connect, and thus the performance of the first device is improved.
[0056] On the basis of the above technical scheme, as an embodiment, before the verification information of the pairing device corresponding to the first device is acquired, the device connection method can further include: pairing and connecting with the pairing device corresponding to the first device; acquiring the verification information of the pairing device corresponding to the first device; and saving the verification information of the pairing device corresponding to the first device.
[0057] The first device has been paired and connected with the pairing device corresponding to the first device in advance, and in the connected state, the first device can acquire the verification information of the pairing device corresponding to the first device. The first device can save the verification information of the pairing device corresponding to the first device.
[0058] The pairing device corresponding to the first device (which can be the second device) can acquire and save the connection information of the first device when the pairing device corresponding to the first device historically pairs and connects with the first device, so that when the first device starts the function of connecting the second device, the first device establishes a connection with the first device by using the saved connection information (such as the BSSID of the first device and / or the Bluetooth pairing information of the first device) of the first device.
[0059] In one of the embodiments, the first device has been Wi-Fi paired with the pairing device corresponding to the first device in advance, and in the case of successful pairing, the first device has a Wi-Fi connection with the pairing device corresponding to the first device, wherein the Wi-Fi connection can be a connection through a wireless access point or a wireless direct connection. When the first device has the Wi-Fi connection with the pairing device corresponding to the first device, the first device can acquire the BSSID of the pairing device corresponding to the first device. The first device saves the BSSID of the pairing device corresponding to the first device, so as to subsequently determine whether the BSSID is consistent with the BSSID of the second device carried in the probe request frame sent by the second device.
[0060] In one of the embodiments, the first device is previously paired with the pairing device corresponding to the first device via Bluetooth, and is connected with the pairing device corresponding to the first device via Bluetooth when the pairing is successful. When the first device is connected with the pairing device corresponding to the first device via Bluetooth, the first device can obtain the Bluetooth pairing information of the pairing device corresponding to the first device. The first device saves the Bluetooth pairing information of the pairing device corresponding to the first device, so as to subsequently determine whether the Bluetooth pairing information is consistent with the Bluetooth pairing information of the second device carried in the probe request frame sent by the second device.
[0061] In one of the embodiments, the first device is previously paired with the pairing device corresponding to the first device via Wi-Fi, and is connected with the pairing device corresponding to the first device via Wi-Fi when the pairing is successful. The Wi-Fi connection can be a connection via a wireless access point or a wireless direct connection. When the first device is connected with the pairing device corresponding to the first device via Wi-Fi, the first device can obtain the decryption information sent by the pairing device, which can be used to decrypt the encrypted information sent by the pairing device.
[0062] In one of the embodiments, the first device is previously paired with the pairing device corresponding to the first device via Bluetooth, and is connected with the pairing device corresponding to the first device via Bluetooth when the pairing is successful. When the first device is connected with the pairing device corresponding to the first device via Bluetooth, the first device can obtain the decryption information sent by the pairing device, which can be used to decrypt the encrypted information sent by the pairing device.
[0063] By using the technical solution of the embodiments of the present application, the first device previously obtains and saves the verification information of the pairing device corresponding to the first device, so that when the verification request frame of the second device is obtained, the verification information can be used to determine whether the to-be-verified information is verified. Because the verification information is the information of the pairing device corresponding to the first device, when the to-be-verified information is verified, it can be determined that the second device can be connected with the first device, so that the function of connecting the second device can be started.
[0064] On the basis of the above technical solution, as one of the embodiments, the verification information can include the BSSID of the pairing device corresponding to the first device, and the to-be-verified information can include the BSSID of the second device. When the to-be-verified information is verified by the verification information, the function of connecting the second device can include: when the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device, starting the point-to-point hotspot.
[0065] The first device has made a Wi-Fi connection with a pairing device corresponding to the first device in advance, and the first device can obtain a BSSID of the pairing device corresponding to the first device in the connection process and save the BSSID.
[0066] The second device can continuously send a probe request frame when it needs to make a Wi-Fi connection with the first device, and the probe request frame carries to-be-verified information, which is a BSSID of the second device itself.
[0067] After the first device receives the probe request frame sent by the second device, the first device can obtain the BSSID of the second device carried in the probe request frame. The first device can determine whether the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device saved by the first device.
[0068] When the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device, the first device can start a point-to-point hotspot, so that the second device makes a wireless direct connection with the first device through the point-to-point hotspot.
[0069] The technical solution of the embodiment of the present application is adopted, the second device sends a probe request frame carrying a BSSID of the second device when it needs to make a wireless direct connection with the first device, therefore, the first device can confirm that the second device requests to connect the first device when it receives the probe request frame sent by the second device and the BSSID carried in the probe request frame is consistent with the BSSID of the pairing device corresponding to the first device, so as to realize the function that the first device starts to connect the second device only when the second device needs to connect the first device; and the negative influence on the performance of the first device caused by the fact that the first device automatically starts a connection function after being powered on but the second device does not actually make a connection is avoided.
[0070] On the basis of the above technical solution, as an embodiment, the to-be-verified information can further include a BSSID of a pairing device corresponding to the second device. When the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device, starting a point-to-point hotspot can include: obtaining a BSSID of the first device; and when the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device and the BSSID of the pairing device corresponding to the second device is consistent with the BSSID of the first device, starting a point-to-point hotspot.
[0071] When the first device and the second device are historically paired devices, the first device saves the BSSID of the second device. However, if the second device is restored to factory settings (the saved BSSID of the first device is cleared) or the second device is replaced with a paired device (the saved BSSID of the first device is replaced with the BSSID of another paired device), the first device is unaware of the change, but the first device still saves the BSSID of the second device. In this case, if the probe request frame sent by the second device includes the BSSID of the second device itself, the first device can still determine that the BSSID is correct based on the saved BSSID of the second device, and thus initiate a function of connecting the second device. However, in this case, the second device does not connect to the first device, and the initiated function of connecting the second device is idle, which affects the performance of the first device.
[0072] To solve the above problem, an embodiment of the present application proposes that the BSSID of the paired device corresponding to the second device can also be verified to be consistent with the BSSID of the first device.
[0073] The first device has previously performed Wi-Fi connection with the paired device corresponding to the first device. The first device can obtain the BSSID of the paired device corresponding to the first device during the connection process, and save the BSSID.
[0074] The second device has previously performed Wi-Fi connection with the paired device corresponding to the second device. The second device can obtain the BSSID of the paired device corresponding to the first device during the connection process, and save the BSSID.
[0075] When the second device needs to perform Wi-Fi connection with the first device, the second device can continuously send a probe request frame, which carries to-be-verified information. The to-be-verified information can include the BSSID of the second device itself and the BSSID of the paired device corresponding to the second device.
[0076] After the first device receives the probe request frame sent by the second device, the first device can obtain the two BSSIDs carried in the probe request frame. The first device can determine whether the BSSID of the second device is consistent with the saved BSSID of the paired device corresponding to the first device, and determine whether the BSSID of the paired device corresponding to the second device is consistent with the BSSID of the first device itself.
[0077] When the BSSID of the second device is consistent with the BSSID of the paired device corresponding to the first device, and the BSSID of the paired device corresponding to the second device is consistent with the BSSID of the first device, the first device can start a point-to-point hotspot, so that the second device performs wireless direct connection with the first device through the point-to-point hotspot.
[0078] By verifying whether the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device and whether the BSSID of the pairing device corresponding to the second device is consistent with the BSSID of the first device, the technical solution of the embodiment of the present application can avoid the situation that the second device actually does not want to connect the first device after the second device is restored to the factory settings or the pairing device is replaced, but the first device still starts the point-to-point hotspot, thereby affecting the performance of the first device.
[0079] On the basis of the above technical solution, as an embodiment, the verification information can include Bluetooth pairing information of the pairing device corresponding to the first device; the to-be-verified information can include Bluetooth pairing information of the second device. When the to-be-verified information passes the verification of the verification information, starting the function of connecting the second device can include: when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, starting the Bluetooth function.
[0080] The first device has previously performed Bluetooth connection with the pairing device corresponding to the first device, and the first device can obtain the Bluetooth pairing information of the pairing device corresponding to the first device in the connection process and save the Bluetooth pairing information.
[0081] When the second device needs to perform Bluetooth connection with the first device, the second device can continuously send a probe request frame, and the probe request frame carries to-be-verified information, which is Bluetooth pairing information of the second device itself.
[0082] After the first device receives the probe request frame sent by the second device, the first device can obtain the Bluetooth pairing information of the second device carried in the probe request frame. The first device can determine whether the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device saved by the first device.
[0083] When the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, the first device can start Bluetooth, thereby enabling the second device to perform Bluetooth connection with the first device.
[0084] By the technical solution of the embodiment of the present application, when the second device needs to perform Bluetooth connection with the first device, the second device sends a probe request frame carrying Bluetooth pairing information of the second device. Therefore, the first device can confirm that the second device requests to connect the first device when the first device receives the probe request frame sent by the second device and the Bluetooth pairing information carried in the probe request frame is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, thereby enabling the first device to start the function of connecting the second device only when the second device needs to connect the first device; and avoiding the negative impact on the performance of the first device caused by the automatic starting of the connection function of the first device after the first device is powered on but the second device does not actually perform connection.
[0085] On the basis of the above technical solutions, as an embodiment, the to-be-verified information can further include Bluetooth pairing information of the paired device corresponding to the second device. When the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the paired device corresponding to the first device, the Bluetooth function is started, which can include: obtaining the Bluetooth pairing information of the first device; when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the paired device corresponding to the first device, and the Bluetooth pairing information of the paired device corresponding to the second device is consistent with the Bluetooth pairing information of the first device, starting the Bluetooth function.
[0086] When the first device and the second device are historically paired Bluetooth devices, the first device saves the Bluetooth pairing information of the second device. However, if the second device is later restored to factory settings or replaced with a paired device, the first device is unaware, but the first device still saves the Bluetooth pairing information of the second device. In this case, if the probe request frame sent by the second device includes the Bluetooth pairing information of the second device itself, the first device can still determine that it passes the verification according to the Bluetooth pairing information of the second device saved by itself, and thus start the Bluetooth function. However, in this case, the second device will not connect to the first device, resulting in the Bluetooth function being idle, thereby affecting the performance of the first device in Bluetooth connection with other devices, for example, increasing the latency when the first device is in Bluetooth connection with other devices.
[0087] To solve the above problems, an embodiment of the present application proposes that the Bluetooth pairing information of the paired device corresponding to the second device can also be verified for consistency with the Bluetooth pairing information of the first device.
[0088] The first device has previously performed Bluetooth connection with the paired device corresponding to the first device, and the first device can obtain the Bluetooth pairing information of the paired device corresponding to the first device during the connection process and save the Bluetooth pairing information.
[0089] The second device has previously performed Bluetooth connection with the paired device corresponding to the second device, and the second device can obtain the Bluetooth pairing information of the paired device corresponding to the first device during the connection process and save the Bluetooth pairing information.
[0090] When the second device needs to perform Bluetooth connection with the first device, it can continuously send a probe request frame, which carries to-be-verified information. The to-be-verified information can include the Bluetooth pairing information of the second device itself and the Bluetooth pairing information of the paired device corresponding to the second device.
[0091] After the first device receives the probe request frame sent by the second device, the first device can obtain the two Bluetooth pairing information carried in the probe request frame. The first device can determine whether the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device saved by the first device, and determine whether the Bluetooth pairing information of the pairing device corresponding to the second device is consistent with the Bluetooth pairing information of the first device.
[0092] When the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, and the Bluetooth pairing information of the pairing device corresponding to the second device is consistent with the Bluetooth pairing information of the first device, the first device can start the Bluetooth function, so that the second device is connected with the first device through Bluetooth.
[0093] By verifying whether the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, and whether the Bluetooth pairing information of the pairing device corresponding to the second device is consistent with the Bluetooth pairing information of the first device, the technical solution of the embodiment of the present application can avoid the situation that the second device does not actually want to connect the first device when the second device is restored to factory settings or the pairing device is replaced, but the first device still starts the Bluetooth function, thereby affecting the performance of the first device.
[0094] On the basis of the above technical solution, as an embodiment, the verification information can include decryption information, and the to-be-verified information can include encrypted information. When the to-be-verified information passes the verification of the verification information, starting the function of connecting the second device can include: when the encrypted information is successfully decrypted according to the decryption information, starting the function of connecting the second device.
[0095] In an embodiment, the first device is connected with the pairing device corresponding to the first device in advance (which can be a WI-FI connection or a Bluetooth connection), and the first device can obtain the decryption information of the pairing device corresponding to the first device in the connection process. The decryption information can be sent by the pairing device to the first device, or can be agreed by the pairing device and the first device.
[0096] When the second device needs to be connected with the first device, the second device can continuously send a probe request frame, and the probe request frame carries to-be-verified information, which is encrypted information.
[0097] After the first device receives the probe request frame sent by the second device, the first device can obtain the encryption information carried in the probe request frame. The first device can determine whether the decryption information stored by the first device can decrypt the encryption information. In the case that the decryption can be successfully performed, the first device can determine that the to-be-verified information passes the verification of the verification information, and thus the function of connecting the second device is started. The function of connecting the second device that is started can be set or agreed according to actual requirements, and can be starting a point-to-point hotspot or starting a Bluetooth function.
[0098] According to the technical solution of the embodiment of the present application, when the second device needs to be connected to the first device, the second device sends a probe request frame carrying encryption information. Therefore, when the first device receives the probe request frame sent by the second device, and the encryption information carried in the probe request frame can be decrypted by the decryption information stored by the first device, the first device can confirm that the second device requests to be connected to the first device, so that the function of connecting the second device is started only when the second device needs to be connected to the first device. The negative impact of the performance of the first device caused by the automatic starting of the connection function of the first device after the first device is powered on but the second device does not actually need to be connected is avoided. In addition, the security is improved through the encryption information.
[0099] On the basis of the above technical solution, as an embodiment, the device connection method can further include: when a target data packet broadcasted by the second device is received, the target data packet is parsed; and when the parsing result of the target data packet indicates that the second device requests to be connected to the first device, the function of connecting the second device is started.
[0100] The second device can not use the probe request frame, but use a customized target data packet to request the first device to start the function of connecting the second device. The target data packet can be a data packet agreed by the first device and the second device.
[0101] The second device can broadcast the target data packet, and the first device can parse the target data packet after receiving the target data packet. When the parsing result of the target data packet indicates that the second device requests to be connected to the first device, the first device can start the function of connecting the second device.
[0102] The function of connecting the second device that is started can be set or agreed according to actual requirements, and can be starting a point-to-point hotspot or starting a Bluetooth function.
[0103] By adopting the technical solution of the embodiment of the present application, the second device sends a target data packet when it needs to connect to the first device. Therefore, the first device can confirm that the second device requests to connect to the first device when it receives the target data packet sent by the second device and the parsing result of the target data packet indicates that the second device requests to connect to the first device, thereby realizing that the first device only starts the function of connecting to the second device when the second device needs to connect to the first device; avoiding the negative impact on the performance of the first device caused by the first device automatically starting the connection function after turning on the power on but the second device is not actually connected.
[0104] Figure 2 It is a flowchart of a device connection method provided in one embodiment of the present application. Figure 2 In the device connection method shown, the first device is a TV and the second device is a speaker. The TV and the speaker can be directly connected wirelessly. Figure 2 As shown, in step S210, the speaker and TV are paired and connected, and the speaker and TV each save the other's BSSID. In step S220, the speaker and TV are disconnected. The two can be disconnected when either the speaker or the TV is turned off. In step S230, the TV is turned on and the P2P hotspot is not automatically started. In step S240, when the speaker needs to connect to the TV, it continues to send a probe request frame with its own BSSID. When the speaker needs to connect to the TV after restarting, it can continue to send a probe request frame with its own BSSID. In step S250, it is determined whether the TV has received a probe request frame with the BSSID of the speaker. When the TV receives a probe request frame with the BSSID of the speaker, step S260 can be executed. In step S260, it is determined whether the BSSID is saved in the TV. When the BSSID is saved in the TV, step S270 can be executed. In step S270, the TV starts the P2P hotspot. In step S280, the speaker connects to the TV using the TV's BSSID. In step S290, the connection is successful. If the TV does not receive a probe request frame with the speaker's BSSID and / or the TV does not store the BSSID, step S200 may be executed. In step S200, the TV does not initiate the P2P hotspot.
[0105] By adopting the technical solutions of the embodiments of the present application, the second device sends a probe request frame carrying to-be-verified information when it needs to connect the first device, and therefore the first device can confirm that the second device requests to connect the first device when it receives the probe request frame sent by the second device and the to-be-verified information carried in the probe request frame passes the verification of the verification information of the pairing device corresponding to the first device, so that the first device starts the function of connecting the second device only when the second device needs to connect the first device, thereby avoiding the negative impact on the performance of the first device caused by the automatic starting of the connection function of the first device after the first device is powered on but the second device does not actually perform the connection, and thus the performance of the first device is improved.
[0106] In one embodiment, as shown in Figure 3 the device connection method can be applied to a second device, wherein the second device can perform a wireless direct connection and / or a Bluetooth connection with a first device. The first device can include, but is not limited to, one or more of a smart television, a portable computer, a desktop computer, and a vehicle-mounted computer. The second device can include, but is not limited to, one or more of a smart speaker and a gamepad.
[0107] In one embodiment, in a wireless direct connection scenario, the first device can be a group owner, and the second device can be a device requesting to join a P2P group; in another embodiment, in a wireless direct connection scenario, the first device can be a device requesting to join a P2P group, and the second device can be a group owner.
[0108] In one embodiment, in a Bluetooth connection scenario, the first device can be a master device, and the second device can be a slave device; in another embodiment, in a Bluetooth connection scenario, the first device can be a slave device, and the second device can be a master device.
[0109] In one of the embodiments, after the function of connecting the second device is started, the device connection method further includes: responding to a connection request of a third device; and connecting the third device through the started function of connecting the second device.
[0110] The third device can be any device that can establish a connection with the first device through the function of connecting the second device.
[0111] For example, the first device is a television, the second device is a sound box, and the third device is a game handle, and the first device, the second device, and the third device all have a Bluetooth connection function. After the first device starts the Bluetooth function after the probe request frame sent by the second device passes the verification, the third device does not need to send a probe request frame again, and the third device can directly connect with the first device through the Bluetooth function started by the first device.
[0112] The following will be described in detail. It should be noted that the order of the following embodiments is not limited as the priority order of the embodiments.
[0113] According to Figure 3 The device connection method shown in the figure is applied to a second device, and the method at least includes step S310, which is described in detail as follows.
[0114] In step S310, a probe request frame is sent to a first device.
[0115] The probe request frame carries to-be-verified information, so that the first device starts a function of connecting the second device when the to-be-verified information passes the verification of the verification information.
[0116] The verification information is verification information of a paired device corresponding to the first device.
[0117] When the second device needs to connect the first device, the second device can continuously send a probe request frame, which is used to detect the first device that can be connected with the second device. The probe request frame includes to-be-verified information; the first device can determine whether the second device corresponding to the to-be-verified information is a paired or connected device according to the to-be-verified information, so as to determine whether the second device can be connected.
[0118] In one embodiment, the to-be-verified information can include device information of the second device itself. In a wireless direct connection scene, the to-be-verified information can include a BSSID of a Wi-Fi module of the second device; in a Bluetooth connection scene, the to-be-verified information can include Bluetooth pairing information of the second device.
[0119] In another embodiment, the to-be-verified information can be encrypted information.
[0120] The paired device corresponding to the first device is a device that has historically paired and connected with the first device. When the paired device corresponding to the first device historically pairs and connects with the first device, the first device can obtain the verification information of the paired device and save the verification information. The paired device (which can be the second device) corresponding to the first device can obtain and save the connection information of the first device when the paired device historically pairs and connects with the first device, so as to establish a connection with the first device through the saved connection information of the first device when the first device starts the function of connecting the second device.
[0121] Optionally, the check information of the paired device corresponding to the first device can include the BSSID of the paired device; the check information of the paired device corresponding to the first device can include the Bluetooth pairing information of the paired device; the check information of the paired device corresponding to the first device can include decryption information, which can be sent by the paired device to the first device or can be agreed by the paired device and the first device.
[0122] After the first device obtains the to-be-checked information, the first device can obtain the check information of the paired device corresponding to the first device.
[0123] In one of the embodiments, in the wireless direct connection scenario, the first device can determine whether the to-be-checked information passes the check of the check information by judging whether the BSSID of the second device included in the to-be-checked information is consistent with the BSSID of the paired device corresponding to the first device. When the BSSID of the second device included in the to-be-checked information is consistent with the BSSID of the paired device corresponding to the first device, it can be determined that the to-be-checked information passes the check of the check information, and the function of wireless direct connection with the second device is started, that is, the point-to-point hotspot is started, so that the second device connects the first device through the point-to-point hotspot.
[0124] In one of the embodiments, in the Bluetooth connection scenario, the first device can determine whether the to-be-checked information passes the check of the check information by judging whether the Bluetooth pairing information of the second device included in the to-be-checked information is consistent with the Bluetooth pairing information of the paired device corresponding to the first device. When the Bluetooth pairing information of the second device included in the to-be-checked information is consistent with the Bluetooth pairing information of the paired device corresponding to the first device, it can be determined that the to-be-checked information passes the check of the check information, and the Bluetooth function is started, that is, the point-to-point hotspot is started, so that the second device connects the first device through the point-to-point hotspot, and the second device and the first device are connected through Bluetooth.
[0125] In one of the embodiments, when the to-be-checked information includes encryption information and the check information includes decryption information, the first device can judge whether the encryption information can be decrypted according to the decryption information. In the case of successful decryption, it can be determined that the to-be-checked information passes the check of the check information, and the function of connecting the second device is started. The function of connecting the second device that is started can be set or agreed according to actual requirements, which can be starting the point-to-point hotspot or starting the Bluetooth function.
[0126] The technical solution of the embodiment of the application is adopted, the second device sends a detection request frame carrying to-be-verified information when the second device needs to connect the first device, therefore, the first device can confirm that the second device requests to connect the first device when the first device receives the detection request frame sent by the second device and the to-be-verified information carried in the detection request frame passes the verification of the verification information of the pairing device corresponding to the first device, so that the first device starts the function of connecting the second device only when the second device needs to connect the first device, thereby avoiding the negative impact on the performance of the first device caused by the fact that the first device automatically starts the connection function after being powered on but the second device does not actually connect, and thus the performance of the first device is improved.
[0127] In one of the embodiments, after the first device starts the function of connecting the second device, the method further includes:
[0128] connecting with the first device.
[0129] In one of the embodiments, the verification information includes the BSSID of the pairing device corresponding to the first device, the to-be-verified information includes the BSSID of the second device, and the first device starts the function of connecting the second device when the to-be-verified information passes the verification of the verification information, including:
[0130] The first device starts a point-to-point hotspot when the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device, so that the second device connects the first device through the point-to-point hotspot.
[0131] In one of the embodiments, the to-be-verified information further includes the BSSID of the pairing device corresponding to the second device.
[0132] The first device starts a point-to-point hotspot when the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device, including:
[0133] The first device starts a point-to-point hotspot when the BSSID of the second device is consistent with the BSSID of the pairing device corresponding to the first device and the BSSID of the pairing device corresponding to the second device is consistent with the BSSID of the first device.
[0134] In one of the embodiments, the verification information includes Bluetooth pairing information of the pairing device corresponding to the first device, the to-be-verified information includes Bluetooth pairing information of the second device, and the first device starts the function of connecting the second device when the to-be-verified information passes the verification of the verification information, including:
[0135] The first device starts a Bluetooth function when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, so that the second device is connected to the first device through Bluetooth.
[0136] In one of the embodiments, the to-be-verified information further comprises the Bluetooth pairing information of the pairing device corresponding to the second device; and the first device starts the Bluetooth function when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, comprising:
[0137] The first device starts the Bluetooth function when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, and the Bluetooth pairing information of the pairing device corresponding to the second device is consistent with the Bluetooth pairing information of the first device.
[0138] In one of the embodiments, the verification information comprises decryption information; and the to-be-verified information comprises encryption information.
[0139] The first device starts the function of connecting the second device when the to-be-verified information is verified by the verification information, comprising:
[0140] The first device starts the function of connecting the second device when the encryption information is decrypted according to the decryption information.
[0141] In one of the embodiments, the method further comprises:
[0142] Broadcasting a target data packet, so that the first device analyzes the target data packet when receiving the target data packet broadcasted by the second device, and starts the function of connecting the second device when the analysis result of the target data packet indicates that the second device requests to connect the first device.
[0143] In one of the embodiments, before the first device is sent the probe request frame, the method further comprises:
[0144] Pairing with the first device;
[0145] Sending the verification information to the first device, so that the first device saves the verification information.
[0146] In order to better implement the device connection method, the application further provides a device connection apparatus based on the above device connection method. The meanings of the terms are the same as those in the above device connection method, and the specific implementation details can be referred to the description in the method embodiment.
[0147] Please refer to Figure 4 ,Figure 4 is a structural schematic diagram of a device connection apparatus provided by an embodiment of the present application, wherein the device connection apparatus is applied to a first device, and the device connection apparatus comprises:
[0148] The first obtaining module 401 is configured to obtain to-be-verified information carried in a probe request frame sent by a second device when the probe request frame is received.
[0149] The second obtaining module 402 is configured to obtain verification information of a paired device corresponding to the first device.
[0150] The starting module 403 is configured to start a function of connecting the second device when the to-be-verified information passes verification of the verification information.
[0151] In one of the embodiments, the verification information comprises a basic service set identifier (BSSID) of the paired device corresponding to the first device, and the to-be-verified information comprises a BSSID of the second device.
[0152] The starting module 403 comprises:
[0153] The first starting unit is configured to start a point-to-point hotspot when the BSSID of the second device is consistent with the BSSID of the paired device corresponding to the first device.
[0154] In one of the embodiments, the to-be-verified information further comprises a BSSID of a paired device corresponding to the second device.
[0155] The first starting unit comprises:
[0156] The BSSID obtaining sub-unit is configured to obtain the BSSID of the first device.
[0157] The first starting sub-unit is configured to start a point-to-point hotspot when the BSSID of the second device is consistent with the BSSID of the paired device corresponding to the first device, and the BSSID of the paired device corresponding to the second device is consistent with the BSSID of the first device.
[0158] In one of the embodiments, the verification information comprises Bluetooth pairing information of the paired device corresponding to the first device, and the to-be-verified information comprises Bluetooth pairing information of the second device.
[0159] The starting module 403 comprises:
[0160] The second starting unit is configured to start a Bluetooth function when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the paired device corresponding to the first device.
[0161] In one of the embodiments, the to-be-verified information further comprises Bluetooth pairing information of the pairing device corresponding to the second device.
[0162] The second starting unit comprises:
[0163] a Bluetooth pairing information obtaining sub-unit, configured to obtain Bluetooth pairing information of the first device;
[0164] a second starting sub-unit, configured to start the Bluetooth function when the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the pairing device corresponding to the first device, and the Bluetooth pairing information of the pairing device corresponding to the second device is consistent with the Bluetooth pairing information of the first device.
[0165] In one of the embodiments, the verification information comprises decryption information, and the to-be-verified information comprises encrypted information.
[0166] The starting module 403 comprises:
[0167] a third starting unit, configured to start the function of connecting the second device when the decryption of the encrypted information according to the decryption information is successful.
[0168] In one of the embodiments, the apparatus further comprises:
[0169] a connecting module, configured to pair and connect with the pairing device corresponding to the first device;
[0170] an information obtaining module, configured to obtain verification information of the pairing device corresponding to the first device;
[0171] a saving module, configured to save the verification information of the pairing device corresponding to the first device.
[0172] In one of the embodiments, the apparatus further comprises:
[0173] a parsing module, configured to parse a target data packet broadcasted by the second device when the target data packet is received;
[0174] a starting function module, configured to start the function of connecting the second device when the parsing result of the target data packet indicates that the second device requests to connect the first device.
[0175] The technical scheme of the embodiment of the present application is adopted, the second device sends a detection request frame carrying to-be-verified information when the second device needs to connect the first device, therefore, the first device can confirm that the second device requests to connect the first device when the first device receives the detection request frame sent by the second device and the to-be-verified information carried in the detection request frame passes the verification of the verification information of the pairing device corresponding to the first device, so that the first device starts the function of connecting the second device only when the second device needs to connect the first device, thereby avoiding the negative influence on the performance of the first device caused by the fact that the first device starts the connection function automatically after being powered on but the second device does not actually connect, and thus the performance of the first device is improved.
[0176] Please refer to Figure 5 , Figure 5 is a structural schematic diagram of a device connection apparatus provided by the embodiment of the present application, wherein the device connection apparatus is applied to a second device, and the device connection apparatus comprises:
[0177] The sending module 501 is configured to send a detection request frame to a first device.
[0178] The detection request frame carries to-be-verified information, so that the first device starts a function of connecting the second device when the to-be-verified information passes the verification of the verification information.
[0179] The verification information is verification information of a pairing device corresponding to the first device.
[0180] The technical scheme of the embodiment of the present application is adopted, the second device sends a detection request frame carrying to-be-verified information when the second device needs to connect the first device, therefore, the first device can confirm that the second device requests to connect the first device when the first device receives the detection request frame sent by the second device and the to-be-verified information carried in the detection request frame passes the verification of the verification information of the pairing device corresponding to the first device, so that the first device starts the function of connecting the second device only when the second device needs to connect the first device, thereby avoiding the negative influence on the performance of the first device caused by the fact that the first device starts the connection function automatically after being powered on but the second device does not actually connect, and thus the performance of the first device is improved.
[0181] The specific limitation of the device connection apparatus can be referred to the limitation of the device connection method in the foregoing, and will not be described herein. Each module in the device connection apparatus can be realized by software, hardware and combination thereof in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operation corresponding to each module.
[0182] In addition, the present application further provides an electronic device, such as Figure 6As shown in the figure, it shows a structural schematic diagram of an electronic device related to the present application, in particular:
[0183] The electronic device can include a processor 601 with one or more processing cores and a memory 602 with one or more computer readable storage media, etc. Those skilled in the art can understand that, Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements. Among them:
[0184] The processor 601 is the control center of the electronic device, which connects all parts of the electronic device through various interfaces and lines, executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, thereby overall monitoring the electronic device. Optionally, the processor 601 can include one or more processing cores; preferably, the processor 601 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 601.
[0185] The memory 602 can be used to store software programs and modules, and the processor 601 executes various functions and data processing by running the software programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store the operating system, at least one application program required by the function (such as sound playing function, image playing function, etc.), etc.; the data storage area can store the data created according to the use of the electronic device, etc. In addition, the memory 602 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 602 can also include a memory controller to provide access for the processor 601 to the memory 602.
[0186] In one embodiment, the electronic device further includes a power supply 603 for supplying power to each component, and preferably the power supply 603 can be logically connected to the processor 601 through a power management system, so as to realize the functions of managing charging, discharging, power consumption management, etc. through the power management system. The power supply 603 can also include one or more direct or alternating current power supplies, recharging systems, power supply device debugging circuits, power supply converters or inverters, power supply state indicators, etc. any components.
[0187] In one embodiment, the electronic device can further include an input unit 604, which can be used to receive inputted digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0188] Although not shown, the electronic device can further include a display unit, etc., which will not be described here. In particular in the present embodiment, the processor 601 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and run the application program stored in the memory 602 by the processor 601, thereby implementing the steps in any of the device connection methods provided by the embodiments of the present application.
[0189] Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0190] In one embodiment, an electronic device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the method described in any of the embodiments of the present application when executing the computer program.
[0191] In one embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the method described in any of the embodiments of the present application.
[0192] In some embodiments, a computer program product is also provided, including a computer program or instructions, which are executed by a processor to implement the method described in any of the embodiments of the present application.
[0193] The specific implementation of each of the above operations can refer to the previous embodiments, which will not be described here.
[0194] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by relevant hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0195] To this end, the present application provides a computer readable storage medium, storing a computer program, which can be loaded by a processor to execute the steps in any of the device connection methods provided by the present application.
[0196] The specific implementation of each operation can refer to the foregoing embodiments, which will not be repeated here.
[0197] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0198] Due to the instructions stored in the computer readable storage medium, the steps of any of the device connection methods provided in the present application can be performed, and thus the beneficial effects of any of the device connection methods provided in the present application can be achieved. Details are described in the foregoing embodiments, which will not be repeated here.
[0199] Finally, it should be noted that, in this document, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or terminal device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or terminal device including the element.
[0200] The above describes in detail the device connection method, apparatus, electronic device and computer readable storage medium provided in the present application. The principles and implementation manners of the present application are described by applying specific examples in this document. The above description of the embodiments is only for helping to understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed, and in view of the above, the content of the specification should not be understood as limiting the present application.
Claims
1. A device connection method, characterized in that: Applied to a first device; the method includes: Upon receiving the probe request frame sent by the second device, obtaining the to-be-verified information carried in the probe request frame; Obtain verification information of a paired device corresponding to the first device; When the information to be verified passes the verification of the verification information, a function of connecting to the second device is started.
2. The method according to claim 1, characterized in that The verification information includes a basic service set identifier (BSSID) of a paired device corresponding to the first device; the information to be verified includes a BSSID of the second device; When the information to be verified passes the verification of the verification information, starting the function of connecting to the second device includes: When the BSSID of the second device is consistent with the BSSID of the paired device corresponding to the first device, the ad hoc hotspot is started.
3. The method according to claim 2, characterized in that The information to be verified further includes a BSSID of a paired device corresponding to the second device; When the BSSID of the second device is consistent with the BSSID of the paired device corresponding to the first device, starting the peer-to-peer hotspot includes: Obtaining a BSSID of the first device; When the BSSID of the second device is consistent with the BSSID of the paired device corresponding to the first device, and the BSSID of the paired device corresponding to the second device is consistent with the BSSID of the first device, the ad hoc hotspot is started.
4. The method according to claim 1, wherein The verification information includes Bluetooth pairing information of a paired device corresponding to the first device; the information to be verified includes Bluetooth pairing information of the second device; When the information to be verified passes the verification of the verification information, starting the function of connecting to the second device includes: When the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the paired device corresponding to the first device, the Bluetooth function is activated.
5. The method according to claim 4, characterized in that The information to be verified also includes Bluetooth pairing information of a paired device corresponding to the second device; When the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the paired device corresponding to the first device, starting the Bluetooth function includes: Obtaining Bluetooth pairing information of the first device; When the Bluetooth pairing information of the second device is consistent with the Bluetooth pairing information of the paired device corresponding to the first device, and the Bluetooth pairing information of the paired device corresponding to the second device is consistent with the Bluetooth pairing information of the first device, the Bluetooth function is activated.
6. The method according to claim 1, characterized in that The verification information includes decrypted information; the information to be verified includes encrypted information; When the information to be verified passes the verification of the verification information, starting the function of connecting to the second device includes: When the encrypted information is successfully decrypted according to the decryption information, a function of connecting to the second device is started.
7. The method according to any one of claims 1 to 6, characterized in that: Before obtaining verification information of a paired device corresponding to the first device, the method further includes: Pairing and connecting with a paired device corresponding to the first device; Obtain verification information of a paired device corresponding to the first device; Save verification information of the paired device corresponding to the first device.
8. The method according to claim 1, characterized in that The method further comprises: Upon receiving the target data packet broadcasted by the second device, parsing the target data packet; When the parsing result of the target data packet indicates that the second device requests to connect to the first device, a function of connecting to the second device is started.
9. A device connection method, characterized in that: Applied to the second device, the method includes: Sending a probe request frame to the first device; The probe request frame carries information to be verified, so that the first device starts a function of connecting to the second device when the information to be verified passes the verification of the verification information; The verification information is verification information of a paired device corresponding to the first device.
10. A device connection device, characterized in that: Applied to a first device; the apparatus comprises: A first acquisition module is configured to, upon receiving a probe request frame sent by a second device, acquire the to-be-verified information carried in the probe request frame; A second acquisition module is used to obtain verification information of a paired device corresponding to the first device; The starting module is used to start the function of connecting to the second device when the information to be verified passes the verification of the verification information.
11. A device connecting device, characterized in that: Applied to the second device, the apparatus includes: A sending module, configured to send a probe request frame to the first device; The probe request frame carries information to be verified, so that the first device starts a function of connecting to the second device when the information to be verified passes the verification of the verification information; The verification information is verification information of a paired device corresponding to the first device.
12. An electronic device, characterized in that: The device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the device connection method according to any one of claims 1 to 9 when executing the computer program.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the device connection method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Data transmission method, device and system and storage medium
CN109890012A
Communication connection method and equipment
CN111163468A
Pairing connection method and device and storage medium
CN118900412A
Wi-fi p2p connection method, electronic device and computer readable storage medium
WO2022063109A1