Connecting method and apparatus for bluetooth hearing aid, and electronic device
By using the third or fourth information in the BLE broadcast packet to identify the device type and left and right ear identification in the Bluetooth hearing aid connection method, the problem that electronic devices cannot recognize the Bluetooth hearing aid is solved, achieving a more efficient connection and user-friendly experience.
Patent Information
- Application Number
- PCT/CN2024/086873
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-28
- Filing Date
- 2024-04-09
- Publication Date
- 2025-01-02
AI Technical Summary
In the prior art, electronic devices cannot accurately identify the device type of Bluetooth hearing aid, which makes it difficult to connect to Bluetooth hearing aids, especially when the device type and left and right ear identification information are missing in the notification data packet.
By receiving the announcement packet and scanning response frames in the Bluetooth low-power BLE broadcast packet, the device type and left and right ear identification of the peripheral device are determined using the third or fourth information, and even in the absence of the ASHA UUID, the volume of the hearing aid is used. Adjust the service, audio control point service, or audio control point status report service to identify the Bluetooth hearing aid and display the corresponding icon on the Search or Connect page to help users choose.
It improves the connection efficiency and accuracy of electronic devices and Bluetooth hearing aids, solves the problem of difficulty in device type identification, and enhances the user experience, especially in single-ear wear scenarios.
Smart Images

Figure CN2024086873_02012025_PF_FP_ABST
Abstract
Description
Bluetooth hearing aid connection method, electronic device and device Technical Field
[0001] The present application belongs to the field of communication technology, and in particular relates to a Bluetooth hearing aid connection method, electronic device, and apparatus. Background Art
[0002] A Bluetooth hearing aid is a hearing aid with Bluetooth function. It can receive audio signals from mobile phones or other Bluetooth-enabled electronic devices via Bluetooth, and then transmit the audio signals to the Bluetooth hearing aid, thereby helping users wearing Bluetooth hearing aids to hear the corresponding audio signals.
[0003] Audio streaming for hearing aids (ASHA) is a hearing aid protocol specifically designed for Bluetooth hearing aids. When using this protocol, electronic devices can receive notification packets within Bluetooth low energy (BLE) broadcast packets sent by Bluetooth hearing aids while searching for them. These packets can then be used to identify the device type and connect to the hearing aid. Once connected, the device can then transmit its audio signals to the hearing aid.
[0004] However, some fields in the notification data packet are sometimes missing, causing the electronic device to be unable to accurately identify whether the sender of the notification data packet is a Bluetooth hearing aid, which further makes it difficult for the electronic device to connect to the Bluetooth hearing aid.
[0005] Summary of the Invention
[0006] In order to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids, embodiments of the present application provide a Bluetooth hearing aid connection method and device.
[0007] In a first aspect, an embodiment of the present application provides a Bluetooth hearing aid connection method, which is applied to an electronic device, comprising:
[0008] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0009] If the announcement data packet does not include the first information and the second information, determining the device type of the peripheral device according to third information in the scan response frame, or according to fourth information, wherein the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, the third information is at least one piece of information used to indicate the device type and the left and right ear identifiers, and the fourth information is located in the announcement data packet and / or the scan response frame and is used to indicate services supported by the peripheral device;
[0010] If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0011] Through the above method, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and left and right ear identifiers, and connect the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids and that electronic devices have difficulty connecting to Bluetooth hearing aids.
[0012] In an optional design, determining the device type of the peripheral device based on the fourth information includes:
[0013] If the fourth information indicates that the services supported by the peripheral device include a hearing aid volume adjustment service, determining that the device type of the peripheral device is a Bluetooth hearing aid;
[0014] Alternatively, if the fourth information indicates that the services supported by the peripheral device include audio control point services, determining that the device type of the peripheral device is a Bluetooth hearing aid;
[0015] Alternatively, if the fourth information indicates that the services supported by the peripheral device include audio control point status reporting, it is determined that the device type of the peripheral device is a Bluetooth hearing aid.
[0016] Through the above method, it is possible to identify whether the peripheral device is a Bluetooth hearing aid based on different types of fourth information.
[0017] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0018] If the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes the left and right ear identifiers, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers;
[0019] If the Bluetooth hearing aid has not been paired in advance, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the search page of the Bluetooth hearing aid.
[0020] Through the above method, when it is determined that the peripheral device is a Bluetooth hearing aid, the left ear or right ear corresponding to the Bluetooth hearing aid can be further determined based on the left and right ear identifiers included in the scan response frame, and the corresponding icon can be displayed on the search page to prompt the user.
[0021] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0022] If the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes the left and right ear identifiers, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers;
[0023] After the Bluetooth hearing aid is connected, an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0024] Through the above method, when it is determined that the peripheral device is a Bluetooth hearing aid, the left ear or right ear corresponding to the Bluetooth hearing aid can be further determined based on the left and right ear identifiers included in the scan response frame, and the corresponding icon can be displayed on the connection page to prompt the user.
[0025] In an optional design, the connecting to the Bluetooth hearing aid includes:
[0026] If it is paired with the Bluetooth hearing aid in advance, it is directly connected to the Bluetooth hearing aid;
[0027] or,
[0028] If the Bluetooth hearing aid has not been paired in advance, the icon of the Bluetooth hearing aid is displayed on the search page;
[0029] After receiving a connection operation for the search page, the Bluetooth hearing aid is connected.
[0030] Through the above method, when the electronic device is pre-paired with the Bluetooth hearing aid, it can be directly connected to the Bluetooth hearing aid to improve the efficiency of connecting to the Bluetooth hearing aid. Moreover, when the electronic device is not paired with the Bluetooth hearing aid, the Bluetooth hearing aid can be connected according to the connection operation on the search page to meet the user's needs for using the Bluetooth hearing aid.
[0031] In a second aspect, an embodiment of the present application provides a Bluetooth hearing aid connection method, which is applied to an electronic device, comprising:
[0032] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0033] If the notification data packet does not include the first information and the second information, determining the device type of the peripheral device according to the device name indicated by the BLE broadcast packet, the first information and the second information being used to indicate the device type and the left and right ear identifiers, respectively;
[0034] If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0035] Through the above method, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and left and right ear identifiers, and connect the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids and that electronic devices have difficulty connecting to Bluetooth hearing aids.
[0036] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0037] If the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame;
[0038] If the Bluetooth hearing aid has not been paired in advance, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the search page of the Bluetooth hearing aid.
[0039] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0040] If the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame;
[0041] After the Bluetooth hearing aid is connected, an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0042] In an optional design, the connecting to the Bluetooth hearing aid includes:
[0043] If it is paired with the Bluetooth hearing aid in advance, it is directly connected to the Bluetooth hearing aid;
[0044] or,
[0045] If the Bluetooth hearing aid has not been paired in advance, the icon of the Bluetooth hearing aid is displayed on the search page;
[0046] After receiving a connection operation for the search page, the Bluetooth hearing aid is connected.
[0047] In a third aspect, an embodiment of the present application provides a Bluetooth hearing aid connection method, which is applied to an electronic device, comprising:
[0048] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0049] If the notification data packet does not include the first information and the second information, matching the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information;
[0050] If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the peripheral device is connected.
[0051] Through the above method, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and left and right ear identifiers, and connect the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids and that electronic devices have difficulty connecting to Bluetooth hearing aids.
[0052] In an optional design, matching the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information includes:
[0053] Determine the target connection information in the historical connection information, where a difference between a time corresponding to the target connection information and a time of receiving the BLE broadcast packet is within a preset range;
[0054] The address of the peripheral device is matched with the address of the Bluetooth hearing aid included in the target connection information.
[0055] Through the above method, it is only necessary to match the address of the peripheral device with the address of the Bluetooth hearing aid included in the target connection information, thereby reducing the matching operations and improving the efficiency of connecting the Bluetooth hearing aid.
[0056] In an optional design, after matching the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information, the method further includes:
[0057] If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, and the BLE broadcast packet also includes a scan response frame, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame;
[0058] After the Bluetooth hearing aid is connected, an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0059] In a fourth aspect, an embodiment of the present application provides a Bluetooth hearing aid connection method, which is applied to an electronic device, comprising:
[0060] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0061] determining a device type of the peripheral device according to first information included in the notification data packet, where the first information is used to indicate the device type;
[0062] If the announcement data packet does not include the second information, and the device type of the peripheral device is a Bluetooth hearing aid, determining the left ear or the right ear of the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame, where the second information is used to indicate the left and right ear identifiers;
[0063] The Bluetooth hearing aid is connected, and an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0064] Through the above method, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and left and right ear identifiers, and connect the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids and that electronic devices have difficulty connecting to Bluetooth hearing aids.
[0065] In a fifth aspect, an embodiment of the present application provides a Bluetooth hearing aid connection method, which is applied to an electronic device, comprising:
[0066] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0067] If the announcement data packet does not include the first information and the second information, after determining that the peripheral device is a Bluetooth hearing aid based on third information in the scan response frame, connecting the Bluetooth hearing aid, the first information and the second information being used to indicate the device type and the left and right ear identifiers, respectively, and the third information being at least one piece of information being used to indicate the device type and the left and right ear identifiers;
[0068] If the scan response frame does not include the third information, connecting the Bluetooth hearing aid after determining that the peripheral device is a Bluetooth hearing aid based on fourth information, the fourth information being located in the announcement data packet and / or the scan response frame and indicating services supported by the peripheral device;
[0069] If neither the notification data packet nor the scan response frame includes the fourth information, after determining that the peripheral device is a Bluetooth hearing aid according to the device name indicated by the BLE broadcast packet, connecting the Bluetooth hearing aid;
[0070] If the BLE broadcast packet does not include the device name, after determining that the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the peripheral device is connected.
[0071] Through the above method, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and left and right ear identifiers, and connect the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids and that electronic devices have difficulty connecting to Bluetooth hearing aids.
[0072] An optional design also includes:
[0073] Determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame;
[0074] The left ear or right ear icon corresponding to the Bluetooth hearing aid is displayed on the search page and / or connection page of the Bluetooth hearing aid.
[0075] In a sixth aspect, an embodiment of the present application provides an electronic device, including:
[0076] Receiving module, device identification module and connection module;
[0077] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0078] If the announcement data packet does not include the first information and the second information, the device identification module is configured to determine a device type of the peripheral device based on third information in the scan response frame or based on fourth information, wherein the first information and the second information are respectively used to indicate the device type and left and right ear identifiers, the third information is at least one piece of information used to indicate the device type and left and right ear identifiers, and the fourth information is located in the announcement data packet and / or the scan response frame and is used to indicate services supported by the peripheral device;
[0079] If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
[0080] In a seventh aspect, an embodiment of the present application provides an electronic device, including:
[0081] Receiving module, device identification module and connection module;
[0082] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0083] If the notification data packet does not include the first information and the second information, the device identification module is used to determine the device type of the peripheral device according to the device name indicated by the BLE broadcast packet, and the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively;
[0084] If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
[0085] In an eighth aspect, an embodiment of the present application provides an electronic device, including:
[0086] Receiving module, device identification module and connection module;
[0087] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0088] If the notification data packet does not include the first information and the second information, the device identification module is configured to match the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information;
[0089] If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
[0090] In a ninth aspect, an embodiment of the present application provides an electronic device, including:
[0091] Receiving module, device identification module and connection module;
[0092] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0093] The device identification module is used to determine the device type of the peripheral device according to the first information included in the notification data packet, where the first information is used to indicate the device type;
[0094] If the announcement data packet does not include the second information, and the device type of the peripheral device is a Bluetooth hearing aid, the device identification module is further configured to determine the left ear or the right ear of the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame, where the second information is used to indicate the left and right ear identifiers;
[0095] The connection module is used to connect to the Bluetooth hearing aid and display the left ear or right ear icon corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0096] In a tenth aspect, an embodiment of the present application provides an electronic device, including:
[0097] Receiving module, device identification module and connection module;
[0098] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0099] If the announcement data packet does not include the first information and the second information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid based on the third information in the scan response frame, the connection module is configured to connect the Bluetooth hearing aid, wherein the first information and the second information are respectively used to indicate the device type and the left and right ear identifiers, and the third information is at least one piece of information used to indicate the device type and the left and right ear identifiers;
[0100] If the scan response frame does not include the third information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid based on fourth information, the connection module is configured to connect to the Bluetooth hearing aid, and the fourth information is located in the notification data packet and / or the scan response frame and is configured to indicate services supported by the peripheral device;
[0101] If neither the notification data packet nor the scan response frame includes the fourth information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid according to the device name indicated by the BLE broadcast packet, the connection module is configured to connect to the Bluetooth hearing aid;
[0102] If the BLE broadcast packet does not include the device name, after the device identification module determines that the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the connection module is used to connect the peripheral device.
[0103] In the eleventh aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the method described in any one of the first to fifth aspects.
[0104] In the twelfth aspect, an embodiment of the present application provides a computer storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method described in any one of the first to fifth aspects is executed.
[0105] In the thirteenth aspect, an embodiment of the present application provides a chip system, which includes a processor, and the processor is coupled to a memory, and is used to execute a computer program or instruction stored in the memory. When the computer program or instruction is executed, the method described in any one of the first to fifth aspects is executed.
[0106] Through the solution provided in the embodiment of the present application, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and the left and right ear identifiers, and connect to the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids.
[0107] In addition, in the prior art, whether the Bluetooth hearing aid corresponds to the left ear or the right ear is determined by the second information included in the notification data packet. If the notification data packet does not include the second information, it is impossible to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear.
[0108] In the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, it is also possible to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear by scanning the left and right ear identifiers included in the response frame, thereby solving the above problem.
[0109] In addition, the solution can also display the left or right ear icon of the Bluetooth hearing aid on the search page and / or connection page of the Bluetooth hearing aid, so that users can understand the left and right ears corresponding to the Bluetooth hearing aid through the icons on the search page and / or connection page. In addition, if the user needs to wear a Bluetooth hearing aid in one ear, the solution also makes it easy for the user to select the Bluetooth hearing aid they need to wear based on the icon, improving the user's wearing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0110] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0111] Figure 1(a) is a schematic diagram of a connection page of an electronic device;
[0112] Figure 1(b) is a schematic diagram of a search page of an electronic device;
[0113] Figure 1(c) is a schematic diagram of a reminder page of an electronic device;
[0114] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0115] FIG3 is a schematic diagram of a workflow of a Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0116] FIG4 is a schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0117] FIG5( a ) is a schematic diagram of a search page of an electronic device provided in an embodiment of the present application;
[0118] FIG5( b ) is a schematic diagram of a connection page of an electronic device provided in an embodiment of the present application;
[0119] FIG6 is a schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0120] FIG7 is a schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0121] FIG8 is a schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0122] FIG9 is a schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0123] FIG10 is a schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0124] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0125] FIG12 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0126] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0127] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of this application and the appended claims, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0128] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0129] To make the description of the following embodiments clear and concise, a brief introduction to the related technologies is first given:
[0130] A Bluetooth hearing aid is a hearing aid with Bluetooth function. It can receive audio signals from mobile phones or other Bluetooth-enabled electronic devices via Bluetooth, and then transmit the audio signals to the Bluetooth hearing aid, thereby helping users wearing Bluetooth hearing aids to hear the corresponding audio signals.
[0131] If a Bluetooth hearing aid is required, the electronic device usually needs to go through two stages: search and connection. In the search stage, the electronic device searches for the data packet sent by the Bluetooth hearing aid, and identifies the sender of the data packet as a Bluetooth hearing aid based on the data packet. Then, in the connection stage, the connection with the Bluetooth hearing aid is achieved so that the audio signal can be transmitted to the Bluetooth hearing aid through the connection. After the electronic device is connected to the Bluetooth hearing aid, its interface may be as shown in Figure 1(a). The interface indicates that the electronic device has been connected to "Hearing Aids No. 5". Specifically, the interface prompts that the peripheral device connected this time is a Bluetooth hearing aid through the ear-shaped icon on the left side of the "Hearing Aids No. 5" field.
[0132] In addition, FIG1( a ) is only an example. In actual application scenarios, other forms of icons may be used to indicate that the currently connected peripheral device is a Bluetooth hearing aid.
[0133] The ASHA protocol is a proprietary protocol for Bluetooth hearing aids. When using this protocol, electronic devices can receive Bluetooth Low Energy (BLE) broadcast packets from Bluetooth hearing aids during the search phase. These BLE broadcast packets include a notification data packet and a scan response frame (i.e., a scan response). Electronic devices typically identify the device type based on the hearing aid's audio streaming universally unique identifier (ASHA UUID) included in the notification data packet.
[0134] However, the notification data packet sometimes does not contain the ASHA UUID. In this case, after receiving the BLE broadcast packet, the electronic device cannot identify whether it is a Bluetooth hearing aid based on the notification data packet.
[0135] If an electronic device cannot identify whether a peripheral device is a Bluetooth hearing aid based on the advertising data packet, the following two situations usually occur:
[0136] (Case 1) Even if the peripheral device is a Bluetooth hearing aid, the electronic device cannot connect to the Bluetooth hearing aid.
[0137] In this case, since the electronic device cannot identify whether the peripheral device is a Bluetooth hearing aid, even if the peripheral device is a Bluetooth hearing aid, the electronic device cannot connect to the Bluetooth hearing aid.
[0138] Because the electronic device cannot identify the device type of the peripheral device, the search interface displayed by the electronic device during the search phase will not display the device type of the corresponding peripheral device. In one example, see Figure 1(b) showing the interface of the electronic device during the search phase. In this interface, the icon to the left of "Hearing Aids No. 5" is a Bluetooth icon, which only indicates that the searched device is a Bluetooth-enabled device, not a Bluetooth hearing aid.
[0139] Furthermore, if during the search phase, the electronic device only displays a Bluetooth icon for the peripheral device, the user may sometimes operate the electronic device's interface (for example, clicking on "Hearing Aids No. 5" displayed on the interface) in the hope that the electronic device can display the device type of the peripheral device so that the user can determine whether to connect to the peripheral device based on the device type. However, since the electronic device cannot accurately identify the type of the peripheral device, even if it receives the user's operation, it cannot display the device type of the peripheral device and usually only displays a reminder that pairing is required.
[0140] In one example, the reminder displayed by the electronic device may be as shown in Figure 1(c). Referring to this interface, after receiving the user's operation, the electronic device may display a pop-up window, which includes a reminder "Please use the application corresponding to this device to complete the pairing", that is, the device type of the peripheral device cannot be displayed.
[0141] In this case, when the electronic device receives the reminder dismissal operation, it often just stops displaying the reminder and does not perform the connection operation, so the peripheral device will not be connected.
[0142] For example, in the example corresponding to Figure 1(c), after receiving the touch operation of "Got it" displayed below "Please use the application corresponding to this device to complete the pairing", the electronic device will no longer display the pop-up reminder and will not perform the connection operation, thereby not connecting the peripheral device.
[0143] (Case 2) The electronic device downloads a corresponding application according to a user operation, and connects to a peripheral device according to the user operation on the downloaded application.
[0144] Some electronic devices provide pairing applications for certain peripheral devices. In this case, because the electronic device cannot identify the device type of the peripheral device, the electronic device's search page will not display relevant information indicating the device type. The user must use their own judgment or other means to determine the device type of the peripheral device before operating the electronic device. Based on the user's operation, the electronic device downloads the application corresponding to the device type. After the application is downloaded, the electronic device can perform pairing with the peripheral device based on the received user operation for the application, thereby establishing a connection between the electronic device and the peripheral device.
[0145] However, if the user incorrectly determines the device type of the peripheral device, the application downloaded by the electronic device will often not match the peripheral device, resulting in a failure to connect to the peripheral device.
[0146] That is, in this case, the electronic device needs to download the corresponding application according to multiple operations of the user before it can connect to the peripheral device. The operation is relatively cumbersome and there is a possibility of failure in connecting to the peripheral device.
[0147] That is to say, in the prior art, the notification data packet in the BLE broadcast packet usually does not contain the ASHA UUID, which makes it impossible to identify whether the peripheral device is a Bluetooth hearing aid, further resulting in the electronic device being unable to connect to the peripheral device, or causing the process of the electronic device connecting to the peripheral device to be more cumbersome, that is, making it difficult for the electronic device to connect to the peripheral device.
[0148] Furthermore, when the ASHA protocol is used, the notification packet may also include corresponding left and right ear identifiers. For example, if the Bluetooth hearing aid is suitable for wearing in the user's left ear, the notification packet may include a left ear identifier. If the Bluetooth hearing aid is suitable for wearing in the user's right ear, the notification packet may include a right ear identifier. In this case, after receiving the notification packet, the electronic device may also display an icon indicating the left or right ear, so that the user can wear the Bluetooth hearing aid in the appropriate ear based on the icon. Alternatively, if the user only needs to wear one Bluetooth hearing aid, the user can select the appropriate Bluetooth hearing aid based on the icon.
[0149] However, the notification data packet sometimes does not contain left and right ear identifiers, so that the electronic device cannot identify whether the Bluetooth hearing aid is adapted for the left ear or the right ear based on the notification data packet.
[0150] In order to solve the above technical problems, the present application provides a Bluetooth hearing aid connection method and device through the following embodiments.
[0151] The method can be performed by an electronic device that supports Bluetooth functionality, connects to a peripheral device via Bluetooth, and transmits data to the peripheral device via the Bluetooth connection. In a feasible design, the electronic device can be a wireless terminal, a vehicle-mounted wireless terminal, a portable device, a wearable device, a mobile phone (or a "cellular" phone), a portable, pocket-sized, or handheld terminal, etc. For example, the electronic device can be a personal communication service (PCS) phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), an access terminal, a user terminal, a user agent, a user device, or a user equipment (UE), etc. This application does not limit the type of electronic device.
[0152] Taking a mobile phone as an example of the above-mentioned electronic device, in this embodiment, the structure of the electronic device can be as shown in Figure 2, where Figure 2 is a structural schematic diagram of an electronic device applying the Bluetooth hearing aid connection method provided in an embodiment of the present application.
[0153] As shown in FIG2 , the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0154] Furthermore, when the electronic device is a mobile phone, the electronic device may also include: antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, and subscriber identification module (SIM) card interface 195, etc.
[0155] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0156] The processor 110 may include one or more processing units, wherein different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.
[0157] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0158] The charging management module 140 is configured to receive charging input from a charger. The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
[0159] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic devices. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to electronic devices. In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
[0160] Electronic devices implement display functions through a graphics processing unit (GPU), display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0161] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display screen 194 of the electronic device can display a series of graphical user interfaces (GUIs), which are the main screens of the electronic device.
[0162] The electronic device can realize the shooting function through the ISP, camera 193, video codec, GPU, display 194 and application processor.
[0163] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage. The internal memory 121 can be used to store computer-executable program code, which includes instructions. The processor 110 executes the instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device.
[0164] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0165] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0166] Speaker 170A, also known as a "horn," is used to convert audio electrical signals into sound signals. An electronic device can listen to music or make hands-free calls through speaker 170A. Receiver 170B, also known as a "handset," is used to convert audio electrical signals into sound signals. Microphone 170C, also known as a "microphone" or "speakerphone," is used to convert sound signals into electrical signals. When making a call or sending a voice message, a user can speak by placing their mouth close to microphone 170C to input the sound signal into microphone 170C. Headphone jack 170D is used to connect wired headphones.
[0167] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a Hall effect sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip cover. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). The distance sensor 180F is used to measure distance. The proximity light sensor 180G can include a light-emitting diode (LED) and a light detector. The ambient light sensor 180L is used to sense the brightness of ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect temperature. The touch sensor 180K is also called a "touch control device." The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The bone conduction sensor 180M can obtain vibration signals. The buttons 190 include a power button, a volume button, etc. The buttons 190 can be mechanical buttons, touch buttons, or virtual buttons. The motor 191 can generate vibration prompts. The indicator 192 can be an indicator light that can be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.
[0168] Furthermore, operating systems run on the above components, such as the iOS operating system developed by Apple, the Android open-source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on these operating systems.
[0169] In order to clarify the solution provided by this application, the solution provided by this application is introduced and explained through various embodiments in conjunction with the accompanying drawings.
[0170] In order to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids, an embodiment of the present application provides a Bluetooth hearing aid connection method, which is applied to electronic devices.
[0171] 3 , the Bluetooth hearing aid connection method provided in the embodiment of the present application includes the following steps:
[0172] Step S110: Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device.
[0173] In the ASHA protocol, a BLE broadcast packet includes an announcement data packet and a scan response frame (i.e., a scan response). The peripheral device refers to a Bluetooth device that can receive data sent by an electronic device.
[0174] Step S120: If the notification data packet does not include the first information and the second information, determine the device type of the peripheral device according to the third information in the scan response frame or according to the fourth information.
[0175] Among them, the first information and the second information are used to indicate the device type and the left and right ear identifications, respectively. In the ASHA protocol, the first information is the ASHA UUID included in the notification data packet. The electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHA UUID. The second information is the left and right ear identifications in the notification data packet. If the left and right ear identifications are included in the notification information, the electronic device can usually determine that the peripheral device is a Bluetooth hearing aid, and determine whether the Bluetooth hearing aid belongs to the left ear or the right ear based on the left and right ear identifications. In this case, if the notification data packet does not include the first information and the second information, in an embodiment of the present application, the device type of the peripheral device can be determined based on the third information in the scan response frame, or based on the fourth information.
[0176] The third information is at least one information for indicating the device type and the left and right ear identifications. If the electronic device determines that the scan response frame includes at least one of the information, it can determine whether the peripheral device is a Bluetooth hearing aid based on the at least one information.
[0177] In addition, fourth information is located in the notification data packet and / or the scan response frame and is used to indicate services supported by the peripheral device. The notification data packet and / or the scan response frame may include a service UUID supported by the peripheral device. The service UUID is used to indicate the services supported by the peripheral device. If the service corresponds to a service supported by the Bluetooth hearing aid, the electronic device may determine that the peripheral device is a Bluetooth hearing aid.
[0178] Step S130: If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0179] If the electronic device has been paired with the Bluetooth hearing aid in advance, then after determining that the device type of the peripheral device is a Bluetooth hearing aid, the electronic device can be directly connected to the Bluetooth hearing aid to improve the efficiency of connecting the electronic device to the Bluetooth hearing aid.
[0180] In addition, if the electronic device has not been paired with the Bluetooth hearing aid in advance, after determining that the device type of the peripheral device is a Bluetooth hearing aid, the electronic device can display the icon of the Bluetooth hearing aid on the search page, and after receiving the connection operation for the search page, connect the Bluetooth hearing aid, thereby being able to connect the Bluetooth hearing aid according to the user's choice to meet the user's needs.
[0181] According to the above introduction to the prior art, if the electronic device does not recognize the device type of the peripheral device in the prior art, the electronic device cannot connect to the peripheral device, or the user needs to perform multiple operations on the electronic device to connect to the peripheral device.
[0182] Through the above steps provided in this application, the electronic device can identify the device type of the peripheral device, and after identifying that the peripheral device is a Bluetooth hearing aid, directly connect to the Bluetooth hearing aid, or connect to the Bluetooth hearing aid according to the connection operation on the search page. Compared with the existing technology, the connection method is more convenient and efficient.
[0183] Through the solution provided in the embodiment of the present application, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and the left and right ear identifiers, and connect to the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids.
[0184] In step S120, an operation of determining the device type of the peripheral device according to the fourth information is provided. To elaborate on how to determine the device type of the peripheral device according to the fourth information, the following feasible implementations are disclosed:
[0185] (1) If the fourth information indicates that the services supported by the peripheral device include a hearing aid volume adjustment service (ie, Volume), it is determined that the device type of the peripheral device is a Bluetooth hearing aid.
[0186] When using a Bluetooth hearing aid, a user may wish to adjust the volume of the Bluetooth hearing aid output using the volume adjustment service. Therefore, in this implementation, if either the advertising packet or the scan response frame includes fourth information indicating the hearing aid volume adjustment service, the electronic device may determine that the peripheral device is a Bluetooth hearing aid.
[0187] (2) If the fourth information indicates that the services supported by the peripheral device include audio control point service (ie, AudioControlPoint), it is determined that the device type of the peripheral device is a Bluetooth hearing aid.
[0188] The audio control point service is used to instruct the Bluetooth hearing aid whether to start playing the received audio signal. Therefore, if the announcement data packet and / or the scan response frame includes the fourth information indicating the audio control point service, the electronic device can determine that the peripheral device is a Bluetooth hearing aid.
[0189] (3) If the fourth information indicates that the services supported by the peripheral device include audio control point status report (AudioStatusPoint), determine that the device type of the peripheral device is a Bluetooth hearing aid.
[0190] The audio control point status reporting service is used to indicate whether the status of the audio control point is normal. If the notification data packet and / or the scan response frame includes fourth information indicating the audio control point status reporting service, the electronic device can determine that the peripheral device is a Bluetooth hearing aid.
[0191] In actual application scenarios, the device type of the peripheral device can be determined by any of the above implementation methods. Of course, the electronic device can also determine whether the peripheral device is a Bluetooth hearing aid through other forms of service UUID, which is not limited in this application.
[0192] Through the operations of steps S110 to S130, it can be determined whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, the user also wants to know whether the Bluetooth hearing aid is suitable for wearing on the left ear or the right ear. To meet this user's demand, the present application provides another embodiment.
[0193] Referring to the workflow diagram shown in FIG4 , this embodiment includes the following steps:
[0194] Step S210: Receive a BLE broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet and a scan response frame.
[0195] Step S220: If the notification data packet does not include the first information and the second information, determine the device type of the peripheral device according to the third information in the scan response frame, or according to the fourth information, the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, the third information is at least one information used to indicate the device type and the left and right ear identifiers, and the fourth information is located in the notification data packet and / or the scan response frame, and is used to indicate the services supported by the peripheral device.
[0196] The operation process of step S210 and step S220 is the same as the operation process of step S110 and step S120, and they can be referenced to each other, and will not be repeated here.
[0197] Step S230: If the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes left and right ear identifiers, determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers.
[0198] Step S240: If the Bluetooth hearing aid has not been paired in advance, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the search page of the Bluetooth hearing aid, so that the user can choose whether to connect the Bluetooth hearing aid.
[0199] The icon for the left or right ear corresponding to the Bluetooth hearing aid can be represented by letters, text, or graphics. If represented by letters, the letters may include "L" (indicating that the Bluetooth hearing aid is adapted for the left ear) and "R" (indicating that the Bluetooth hearing aid is adapted for the right ear); if represented by text, the text may include "left" (indicating that the Bluetooth hearing aid is adapted for the left ear) and "right" (indicating that the Bluetooth hearing aid is adapted for the right ear); if represented by a graphic, the graphic may include an ear graphic leaning to the left (indicating that the Bluetooth hearing aid is adapted for the left ear) and an ear graphic leaning to the right (indicating that the Bluetooth hearing aid is adapted for the right ear).
[0200] In a feasible design, after identifying the left and right ears corresponding to the Bluetooth hearing aid, the search page displayed by the electronic device may be as shown in Figure 5(a). In this figure, the search page displays the corresponding icon of the Bluetooth hearing aid and includes the letter "L" on the side of the icon, indicating that the Bluetooth hearing aid is adapted for the left ear.
[0201] In the prior art, whether the Bluetooth hearing aid corresponds to the left ear or the right ear is determined by the second information included in the notification data packet. If the notification data packet does not include the second information, it is impossible to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear.
[0202] To address this issue, the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, identifies whether the Bluetooth hearing aid corresponds to the left ear or the right ear by scanning the left and right ear identifiers included in the response frame, thereby solving the above problem. In addition, the solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the search page of the Bluetooth hearing aid, so that the user can understand the left and right ears corresponding to the Bluetooth hearing aid through the icon on the search page. In addition, if the user needs to wear a Bluetooth hearing aid on one ear, the solution also makes it easy for the user to select the Bluetooth hearing aid they need to wear based on the icon, thereby improving the user's wearing experience.
[0203] Furthermore, in this embodiment, if the left ear or right ear icon corresponding to the Bluetooth hearing aid is displayed on the search page, after receiving an operation on the search page, the electronic device can connect to the Bluetooth hearing aid, and the electronic device and the Bluetooth hearing aid enter a connected state.
[0204] Through the operations of steps S110 to S130, it is possible to determine whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, after establishing a connection with the Bluetooth hearing aid, the user may also want to know whether the Bluetooth hearing aid is suitable for wearing on the left ear or the right ear. To meet this user demand, the present application provides another embodiment.
[0205] Referring to the workflow diagram shown in FIG6 , this embodiment includes the following steps:
[0206] Step S310: Receive a BLE broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet and a scan response frame.
[0207] Step S320: If the notification data packet does not include the first information and the second information, determine the device type of the peripheral device based on the third information in the scan response frame or based on the fourth information, the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, the third information is at least one information used to indicate the device type and the left and right ear identifiers, and the fourth information is located in the notification data packet and / or the scan response frame, and is used to indicate the services supported by the peripheral device.
[0208] The operation process of step S310 and step S320 is the same as the operation process of step S110 and step S120, and they can be referenced to each other, and will not be repeated here.
[0209] Step S330: If the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes left and right ear identifiers, determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers.
[0210] Step S340: Connect the Bluetooth hearing aid.
[0211] Step S350: After the Bluetooth hearing aid is connected, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0212] In a feasible design, after identifying the left and right ears corresponding to the Bluetooth hearing aid, the connection page displayed by the electronic device may be as shown in Figure 5(b). In this figure, the connection page displays the corresponding icon of the Bluetooth hearing aid and includes the letter "R" on the side of the icon, indicating that the Bluetooth hearing aid is adapted for the right ear.
[0213] In the solution disclosed in the embodiments of the present application, after determining that the peripheral device is a Bluetooth hearing aid, the left or right ear identifiers included in the response frame are scanned to identify whether the Bluetooth hearing aid corresponds to the left or right ear. This solves the problem in the prior art where the notification data packet does not include the second information and the Bluetooth hearing aid cannot be identified as corresponding to the left or right ear. In addition, this solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the Bluetooth hearing aid connection page. In this case, the user can understand the left or right ear corresponding to the connected Bluetooth hearing aid by viewing the connection page.
[0214] In addition, in the above description and FIG6 , after the left or right ear corresponding to the Bluetooth hearing aid is determined based on the left and right ear identifiers in the scan response frame, the operation of connecting to the Bluetooth hearing aid is performed. In actual application scenarios, there is no strict time limit for these two steps. For example, the operation of connecting to the Bluetooth hearing aid can be performed first, and then the left or right ear corresponding to the Bluetooth hearing aid can be determined based on the left and right ear identifiers in the scan response frame. Or these two steps can be performed simultaneously, and this application does not limit this.
[0215] This application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that electronic devices cannot recognize the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids. This method is applied to electronic devices. Referring to Figure 7, the Bluetooth hearing aid connection method provided in this embodiment of the application includes the following steps:
[0216] Step S410: Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet.
[0217] Step S420: If the notification data packet does not include the first information and the second information, determine the device type of the peripheral device according to the device name indicated by the BLE broadcast packet.
[0218] Among them, the first information and the second information are used to indicate the device type and the left and right ear identifications, respectively. In the ASHA protocol, the first information is the ASHA UUID included in the notification data packet. The electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHA UUID. The second information is the left and right ear identifications in the notification data packet. If the left and right ear identifications are included in the notification information, the electronic device can usually determine that the peripheral device is a Bluetooth hearing aid, and determine whether the Bluetooth hearing aid belongs to the left ear or the right ear based on the left and right ear identifications. In this case, if the notification data packet does not include the first information and the second information, in an embodiment of the present application, the device type of the peripheral device can be determined based on the device name indicated by the BLE broadcast packet.
[0219] For example, if the device name indicated by the BLE advertising packet includes a field such as "Hearing" or "Hearing Aid", it can be determined that the device type of the peripheral device is a Bluetooth hearing aid.
[0220] Step S430: If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0221] If the electronic device has been paired with the Bluetooth hearing aid in advance, then after determining that the device type of the peripheral device is a Bluetooth hearing aid, the electronic device can be directly connected to the Bluetooth hearing aid to improve the efficiency of connecting the electronic device to the Bluetooth hearing aid.
[0222] In addition, if the electronic device has not been paired with the Bluetooth hearing aid in advance, after determining that the device type of the peripheral device is a Bluetooth hearing aid, the electronic device can display the icon of the Bluetooth hearing aid on the search page, and after receiving the connection operation for the search page, connect the Bluetooth hearing aid, thereby being able to connect the Bluetooth hearing aid according to the user's choice to meet the user's needs.
[0223] Through the solution provided in the embodiment of the present application, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and the left and right ear identifiers, and connect to the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids.
[0224] Through the operations of step S410 to step S430, it can be determined whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, the user also wants to know whether the Bluetooth hearing aid is suitable for wearing on the left ear or the right ear. In order to meet this user's demand, the present application provides another embodiment. This embodiment includes the following steps:
[0225] Receive a BLE broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet and a scan response frame.
[0226] If the notification packet does not include the first information and the second information, the device type of the peripheral device is determined based on the device name indicated by the BLE advertising packet, wherein the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively.
[0227] The operation processes of the above two steps are the same as those of step S110 and step S120 , and they can be referenced to each other, and will not be repeated here.
[0228] If the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, the left ear or right ear corresponding to the Bluetooth hearing aid is determined according to the left and right ear identifiers included in the scan response frame.
[0229] If the Bluetooth hearing aid has not been paired in advance, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid will be displayed on the Bluetooth hearing aid search page for the user to choose whether to connect the Bluetooth hearing aid.
[0230] In the prior art, whether the Bluetooth hearing aid corresponds to the left ear or the right ear is determined by the second information included in the notification data packet. If the notification data packet does not include the second information, it is impossible to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear.
[0231] To address this issue, the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, identifies whether the Bluetooth hearing aid corresponds to the left ear or the right ear by scanning the left and right ear identifiers included in the response frame, thereby solving the above problem. In addition, the solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the search page of the Bluetooth hearing aid, so that the user can understand the left and right ears corresponding to the Bluetooth hearing aid through the icon on the search page. In addition, if the user needs to wear a Bluetooth hearing aid on one ear, the solution also makes it easy for the user to select the Bluetooth hearing aid they need to wear based on the icon for connection, thereby improving the user's wearing experience.
[0232] By performing the above steps, it is possible to determine whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, after establishing a connection with the Bluetooth hearing aid, the user also wants to know whether the Bluetooth hearing aid is suitable for wearing on the left ear or the right ear. In order to meet this user's need, the present application provides another embodiment. This embodiment includes the following steps:
[0233] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet.
[0234] If the notification packet does not include the first information and the second information, the device type of the peripheral device is determined based on the device name indicated by the BLE advertising packet, wherein the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively.
[0235] The operation process of the above two steps is the same as the operation process of step S410 and step S420, and they can be referenced to each other, and will not be repeated here.
[0236] If the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, the left ear or right ear corresponding to the Bluetooth hearing aid is determined according to the left and right ear identifiers included in the scan response frame.
[0237] Then, connect your Bluetooth hearing aids.
[0238] After connecting the Bluetooth hearing aid, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0239] In the prior art, whether the Bluetooth hearing aid corresponds to the left ear or the right ear is determined by the second information included in the notification data packet. If the notification data packet does not include the second information, it is impossible to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear.
[0240] To address this issue, the solution disclosed in the embodiments of this application solves this problem by, after determining that the peripheral device is a Bluetooth hearing aid, scanning the left and right ear identifiers included in the response frame to identify whether the Bluetooth hearing aid corresponds to the left or right ear, thereby resolving the aforementioned issue. Furthermore, this solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the Bluetooth hearing aid's connection page. In this case, the user can easily understand the left and right ears corresponding to the connected Bluetooth hearing aid by viewing the connection page.
[0241] In the above description, after the left or right ear corresponding to the Bluetooth hearing aid is determined based on the left and right ear identifiers in the scan response frame, the operation of connecting to the Bluetooth hearing aid is performed. In actual application scenarios, there is no strict time limit for these two steps. For example, the operation of connecting to the Bluetooth hearing aid can be performed first, and then the left or right ear corresponding to the Bluetooth hearing aid can be determined based on the left and right ear identifiers in the scan response frame. Or these two steps can be performed simultaneously, and this application does not limit this.
[0242] This application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that electronic devices cannot recognize the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids. This method is applied to electronic devices. Referring to Figure 8, the Bluetooth hearing aid connection method provided in this embodiment of the application includes the following steps:
[0243] Step S510: Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet.
[0244] Step S520: If the notification data packet does not include the first information and the second information, match the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information.
[0245] Among them, the first information and the second information are used to indicate the device type and the left and right ear identifications, respectively. In the ASHA protocol, the first information is the ASHA UUID included in the notification data packet. The electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHA UUID. The second information is the left and right ear identifications in the notification data packet. If the left and right ear identifications are included in the notification information, the electronic device can usually determine that the peripheral device is a Bluetooth hearing aid, and determine whether the Bluetooth hearing aid belongs to the left ear or the right ear based on the left and right ear identifications. In this case, if the notification data packet does not include the first information and the second information, in an embodiment of the present application, the device type of the peripheral device can be determined based on the matching of the address of the peripheral device and the address of the Bluetooth hearing aid contained in the historical connection information.
[0246] The historical connection information includes address information of the Bluetooth hearing aid previously connected to the electronic device, and the address may be a media access control (MAC) address.
[0247] Step S530: If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the peripheral device is connected.
[0248] If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, it indicates that the electronic device has been connected to the peripheral device before. In this case, the electronic device can determine that the peripheral device is a Bluetooth hearing aid and connect to the peripheral device.
[0249] In addition, in this step, since the address of the peripheral device matches the address of the Bluetooth hearing aid contained in the historical connection information, that is, the electronic device has been connected to the peripheral device before, it indicates that the electronic device has been paired with the Bluetooth hearing aid. In this case, the electronic device can directly connect to the Bluetooth hearing aid to improve the efficiency of the electronic device connecting to the Bluetooth hearing aid.
[0250] Alternatively, the electronic device may also display the icon of the Bluetooth hearing aid on the search page when it determines that the address of the peripheral device matches the address of the Bluetooth hearing aid contained in the historical connection information, and connect the Bluetooth hearing aid after receiving the connection operation for the search page, so as to realize the connection of the Bluetooth hearing aid according to the user's selection and meet the user's needs.
[0251] Through the solution provided in the embodiment of the present application, it is possible to determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and the left and right ear identifiers, and connect to the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids.
[0252] In the above embodiment, step S520 discloses the operation of matching the address of the peripheral device with the address of the Bluetooth hearing aid contained in the historical connection information. In actual application scenarios, the address of the Bluetooth hearing aid usually remains unchanged within a preset period. However, in order to improve the reliability of the electronic device connecting to the Bluetooth hearing aid, the address of the Bluetooth hearing aid will change after a preset period. This preset period can be called the address change period. In this case, the operation of matching the address of the peripheral device with the address of the Bluetooth hearing aid contained in the historical connection information can be achieved by the following steps:
[0253] First, the target connection information in the historical connection information is determined, and the difference between the time corresponding to the target connection information and the time of receiving the BLE broadcast packet is within a preset range.
[0254] After a Bluetooth hearing aid is connected to an electronic device, the electronic device determines the corresponding connection information. This connection information typically includes the address of the Bluetooth hearing aid, which can be determined based on, for example, the address information contained in the BLE broadcast packet. Furthermore, during the connection process, the Bluetooth hearing aid's address typically remains unchanged. If the Bluetooth hearing aid is unpaired from the electronic device, the Bluetooth hearing aid's address typically changes once every first preset time period, starting from the moment of unpairing. Unpairing can include unpairing due to a factory reset or based on a received user action, among other situations.
[0255] Therefore, if the Bluetooth hearing aid is unpaired from the electronic device, the address information contained in the BLE broadcast packet sent by the Bluetooth hearing aid within the first preset time period after the unpairing is unpaired is the same as the address information contained in the BLE broadcast packet sent before the unpairing is unpaired. After the unpairing time exceeds the first preset time period, the address information contained in the BLE broadcast packet sent by the Bluetooth hearing aid is different from the address information contained in the BLE broadcast packet sent before the unpairing.
[0256] In the solution provided in the embodiment of the present application, the electronic device has been connected to a Bluetooth hearing aid, and the connection information of the Bluetooth hearing aid is stored in the electronic device. The connection information of the Bluetooth hearing aid is the target connection information. The time corresponding to the target connection information is the time when the Bluetooth hearing aid that has been historically connected to the electronic device is unpaired from the electronic device, and the difference between the time corresponding to the target connection information and the time when the BLE broadcast packet is received is within a preset range.
[0257] The preset range is determined based on the Bluetooth hearing aid's address change cycle to ensure that the difference between the time corresponding to the target connection information and the time when the BLE advertising packet is received is no greater than the address change cycle. For example, if the Bluetooth hearing aid's address changes every 15 minutes after the hearing aid is unpaired from the electronic device, the difference between the time corresponding to the target connection information and the time when the BLE advertising packet is received is no greater than 15 minutes.
[0258] The address of the peripheral device is then matched with the address of the Bluetooth hearing aid contained in the target connection information.
[0259] Since the address of the Bluetooth hearing aid will change after the pairing with the electronic device is canceled, through the solution of the embodiment of the present application, it is only necessary to match the address of the peripheral device with the address of the Bluetooth hearing aid contained in the target connection information to reduce the amount of matching data, improve the matching efficiency, and further improve the efficiency of connecting the Bluetooth hearing aid.
[0260] Through the operations of step S510 to step S530, it can be determined whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, the user also wants to know whether the Bluetooth hearing aid is suitable for wearing on the left ear or the right ear. In order to meet this user's demand, the present application provides another embodiment. This embodiment includes the following steps:
[0261] Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet.
[0262] If the notification data packet does not include the first information and the second information, the address of the peripheral device is matched with the address of the Bluetooth hearing aid included in the historical connection information. The first information and the second information are used to indicate the device type and the left and right ear identifiers respectively.
[0263] The operation process of the above two steps is the same as the operation process of step S510 and step S520, and they can be referenced to each other, and will not be repeated here.
[0264] If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, and the BLE advertising packet also includes a scan response frame, the left ear or right ear corresponding to the Bluetooth hearing aid is determined according to the left and right ear identifiers included in the scan response frame.
[0265] Then, connect your Bluetooth hearing aids.
[0266] After connecting the Bluetooth hearing aid, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0267] In the prior art, whether the Bluetooth hearing aid corresponds to the left ear or the right ear is determined by the second information included in the notification data packet. If the notification data packet does not include the second information, it is impossible to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear.
[0268] To address this issue, the solution disclosed in the embodiments of this application solves this problem by, after determining that the peripheral device is a Bluetooth hearing aid, scanning the left and right ear identifiers included in the response frame to identify whether the Bluetooth hearing aid corresponds to the left or right ear, thereby resolving the aforementioned issue. Furthermore, this solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the Bluetooth hearing aid's connection page. In this case, the user can easily understand the left and right ears corresponding to the connected Bluetooth hearing aid by viewing the connection page.
[0269] In the above description, after the left or right ear corresponding to the Bluetooth hearing aid is determined based on the left and right ear identifiers in the scan response frame, the operation of connecting to the Bluetooth hearing aid is performed. In actual application scenarios, there is no strict time limit for these two steps. For example, the operation of connecting to the Bluetooth hearing aid can be performed first, and then the left or right ear corresponding to the Bluetooth hearing aid can be determined based on the left and right ear identifiers in the scan response frame. Or these two steps can be performed simultaneously, and this application does not limit this.
[0270] This application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that electronic devices cannot recognize the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids. This method is applied to electronic devices. Referring to Figure 9, the Bluetooth hearing aid connection method provided in this embodiment of the application includes the following steps:
[0271] Step S610: Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet and a scan response frame.
[0272] Step S620: Determine the device type of the peripheral device according to the first information included in the notification data packet, where the first information is used to indicate the device type.
[0273] In the ASHA protocol, the first information is the ASHA UUID included in the notification data packet. The electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHA UUID.
[0274] Step S630: If the notification data packet does not include the second information, and the device type of the peripheral device is a Bluetooth hearing aid, determine the left ear or right ear of the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame, and the second information is used to indicate the left and right ear identifiers.
[0275] The second information is the left and right ear identifiers in the notification packet. If the left and right ear identifiers are included in the notification packet, the electronic device can typically determine whether the Bluetooth hearing aid is for the left or right ear based on the left and right ear identifiers. In this case, if the notification packet does not include the second information, the electronic device cannot determine the left and right ears corresponding to the Bluetooth hearing aid based on the notification packet. Therefore, the electronic device can determine the left and right ears of the Bluetooth hearing aid by scanning the left and right ear identifiers included in the response frame.
[0276] In this step, after determining the left and right ears corresponding to the Bluetooth hearing aid, the corresponding icon can also be displayed on the search page.
[0277] Step S640: Connect the Bluetooth hearing aid, and display the left ear or right ear icon corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0278] Through the solution provided in the embodiment of the present application, it is possible to determine whether the peripheral device is a Bluetooth hearing aid based on the first information in the notification data packet when the notification data packet does not include the second information for indicating the left and right ear identifiers, and connect to the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids.
[0279] Furthermore, the solution can also determine the left and right ears corresponding to the Bluetooth hearing aid based on the scan response frame, and display the left or right ear icon corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0280] Accordingly, the present application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids. This method is applied to electronic devices. This embodiment can comprehensively apply multiple pieces of information to determine the device type of the peripheral device. Referring to Figure 10, the Bluetooth hearing aid connection method provided in this embodiment of the present application includes the following steps:
[0281] Step S710: Receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, where the BLE broadcast packet includes a notification data packet and a scan response frame.
[0282] Step S720: If the notification data packet does not include the first information and the second information, determine whether the device type of the peripheral device can be determined by scanning the third information in the response frame; if not, execute the operation of step S1300; if so, execute the operation of step S1600.
[0283] The first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, and the third information is at least one piece of information used to indicate the device type and the left and right ear identifiers.
[0284] Step S730: If the scan response frame does not include the third information, determine whether the device type of the peripheral device can be determined through the fourth information; if not, execute the operation of step S740; if so, execute the operation of step S760.
[0285] The fourth information is located in the notification data packet and / or the scan response frame, and is used to indicate the services supported by the peripheral device.
[0286] Step S740: If neither the notification data packet nor the scan response frame includes the fourth information, determine whether the device type of the peripheral device can be determined by the device name indicated by the BLE broadcast packet; if not, execute step S750; if so, execute step S760.
[0287] Step S750: If the BLE broadcast packet does not include a device name, determine whether the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, and if the two match, execute the operation of step S760.
[0288] If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, it can be determined that the peripheral device is a Bluetooth hearing aid.
[0289] Step S760: If the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0290] Through the operations of steps S710 to S760, a Bluetooth hearing aid connection method is provided. The method can determine whether the peripheral device is a Bluetooth hearing aid based on multiple information, such as the third information in the scan response frame, the fourth information located in the notification data packet and / or the scan response frame, the device name indicated by the BLE broadcast packet, and the address of the peripheral device, thereby improving the accuracy of identifying the device type of the peripheral device. Accordingly, it can improve the accuracy of connecting the electronic device to the Bluetooth hearing aid.
[0291] Furthermore, the solution provided in the embodiment of the present application further includes the following steps:
[0292] Determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame;
[0293] On the search page and / or connection page of the Bluetooth hearing aid, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed.
[0294] Through the above steps, when it is determined that the peripheral device is a Bluetooth hearing aid, the left and right ears corresponding to the Bluetooth hearing aid can be determined, and the icon of the left ear or right ear corresponding to the Bluetooth hearing aid can be displayed on the search page and / or the connection page, so that the user can determine the left and right ears corresponding to the Bluetooth hearing aid by viewing the search page and / or the connection page.
[0295] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0296] An embodiment of the present application discloses an electronic device. Referring to the structural diagram shown in FIG11 , the device includes: a receiving module 210 , a device identification module 220 and a connection module 230 .
[0297] The receiving module 210 is used to receive a Bluetooth Low Energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0298] If the announcement data packet does not include the first information and the second information, the device identification module 220 is configured to determine the device type of the peripheral device based on third information in the scan response frame or based on fourth information, where the first information and the second information are used to indicate the device type and left and right ear identifiers, respectively; the third information is at least one piece of information used to indicate the device type and left and right ear identifiers; and the fourth information is located in the announcement data packet and / or the scan response frame and is used to indicate services supported by the peripheral device;
[0299] If the device type of the peripheral device is a Bluetooth hearing aid, the connecting module 230 is configured to connect to the Bluetooth hearing aid.
[0300] The device provided by the embodiment of the present application can determine whether the peripheral device is a Bluetooth hearing aid when the notification data packet does not include information for indicating the device type and the left and right ear identifiers, and connect to the Bluetooth hearing aid when it is determined that the peripheral device is a Bluetooth hearing aid, so as to solve the problem in the prior art that electronic devices cannot identify the device type of Bluetooth hearing aids, resulting in difficulty in connecting electronic devices to Bluetooth hearing aids.
[0301] In a feasible design, the device identification module 220 is specifically configured to, if the fourth information indicates that the services supported by the peripheral device include a hearing aid volume adjustment service, determine that the device type of the peripheral device is a Bluetooth hearing aid;
[0302] Alternatively, if the fourth information indicates that the services supported by the peripheral device include audio control point services, determining that the device type of the peripheral device is a Bluetooth hearing aid;
[0303] Alternatively, if the fourth information indicates that the services supported by the peripheral device include audio control point status reporting, it is determined that the device type of the peripheral device is a Bluetooth hearing aid.
[0304] In a feasible design, the electronic device is also used to, after determining the device type of the peripheral device, if the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes the left and right ear identifiers, determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers; if it has not been paired with the Bluetooth hearing aid in advance, display the icon of the left ear or right ear corresponding to the Bluetooth hearing aid on the search page of the Bluetooth hearing aid.
[0305] In a feasible design, after determining the device type of the peripheral device, if the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes the left and right ear identifiers, the electronic device is further used to determine the left ear or right ear corresponding to the Bluetooth hearing aid based on the left and right ear identifiers; after connecting the Bluetooth hearing aid, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0306] In a feasible design, the connection module 230 is specifically used to directly connect to the Bluetooth hearing aid if it has been paired with the Bluetooth hearing aid in advance; or, if it has not been paired with the Bluetooth hearing aid in advance, display the icon of the Bluetooth hearing aid on the search page; after receiving the connection operation for the search page, connect the Bluetooth hearing aid.
[0307] Accordingly, the present application provides an electronic device through another embodiment. In this embodiment, the electronic device includes:
[0308] Receiving module, device identification module and connection module;
[0309] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0310] If the notification data packet does not include the first information and the second information, the device identification module is used to determine the device type of the peripheral device according to the device name indicated by the BLE broadcast packet, and the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively;
[0311] If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
[0312] In a feasible design, the electronic device is also used to, if the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame; if it has not been paired with the Bluetooth hearing aid in advance, display the icon of the left ear or right ear corresponding to the Bluetooth hearing aid on the search page of the Bluetooth hearing aid.
[0313] In a feasible design, after determining the device type of the peripheral device, if the device type of the peripheral device is a Bluetooth hearing aid and the BLE broadcast packet also includes a scan response frame, the electronic device is further used to determine the left ear or right ear corresponding to the Bluetooth hearing aid based on the left and right ear identifiers included in the scan response frame; after connecting the Bluetooth hearing aid, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
[0314] In a feasible design, the connection module is specifically used to, if it is paired with the Bluetooth hearing aid in advance, directly connect to the Bluetooth hearing aid; or, if it is not paired with the Bluetooth hearing aid in advance, display the icon of the Bluetooth hearing aid on the search page; after receiving the connection operation for the search page, connect to the Bluetooth hearing aid.
[0315] Accordingly, the present application provides an electronic device through another embodiment, in which the receiving module, the device identification module and the connection module;
[0316] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0317] If the notification data packet does not include the first information and the second information, the device identification module is configured to match the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information;
[0318] If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
[0319] In a feasible design, the device identification module is specifically used to determine the target connection information in the historical connection information, and the difference between the time corresponding to the target connection information and the time of receiving the BLE broadcast packet is within a preset range; and match the address of the peripheral device with the address of the Bluetooth hearing aid contained in the target connection information.
[0320] In a feasible design, after matching the address of the peripheral device with the address of the Bluetooth hearing aid contained in the historical connection information, if the address of the peripheral device matches the address of the Bluetooth hearing aid contained in the historical connection information, and the BLE broadcast packet also includes a scan response frame, the electronic device is further used to determine the left ear or right ear corresponding to the Bluetooth hearing aid based on the left and right ear identifiers included in the scan response frame; after connecting to the Bluetooth hearing aid, display the icon of the left ear or right ear corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0321] Accordingly, the present application provides an electronic device through another embodiment, in which the receiving module, the device identification module and the connection module;
[0322] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0323] The device identification module is used to determine the device type of the peripheral device according to the first information included in the notification data packet, where the first information is used to indicate the device type;
[0324] If the announcement data packet does not include the second information, and the device type of the peripheral device is a Bluetooth hearing aid, the device identification module is further configured to determine the left ear or the right ear of the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame, where the second information is used to indicate the left and right ear identifiers;
[0325] The connection module is used to connect to the Bluetooth hearing aid and display the left ear or right ear icon corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0326] Accordingly, the present application provides an electronic device through another embodiment, in which the receiving module, the device identification module and the connection module;
[0327] The receiving module is used to receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame;
[0328] If the announcement data packet does not include the first information and the second information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid based on the third information in the scan response frame, the connection module is configured to connect the Bluetooth hearing aid, wherein the first information and the second information are respectively used to indicate the device type and the left and right ear identifiers, and the third information is at least one piece of information used to indicate the device type and the left and right ear identifiers;
[0329] If the scan response frame does not include the third information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid based on fourth information, the connection module is configured to connect to the Bluetooth hearing aid, and the fourth information is located in the notification data packet and / or the scan response frame and is configured to indicate services supported by the peripheral device;
[0330] If neither the notification data packet nor the scan response frame includes the fourth information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid according to the device name indicated by the BLE broadcast packet, the connection module is configured to connect to the Bluetooth hearing aid;
[0331] If the BLE broadcast packet does not include the device name, after the device identification module determines that the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the connection module is used to connect the peripheral device.
[0332] In a feasible design, the electronic device is further used to determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame;
[0333] The left ear or right ear icon corresponding to the Bluetooth hearing aid is displayed on the search page and / or connection page of the Bluetooth hearing aid.
[0334] Accordingly, an embodiment of the present application discloses an electronic device. Referring to the structural diagram shown in FIG12 , the electronic device includes:
[0335] Processor 1101 and memory,
[0336] The memory is used to store program instructions;
[0337] The processor 1101 is used to call and execute the program instructions stored in the memory. When the program instructions stored in the memory are executed by the processor 1101, the electronic device executes all or part of the steps in the embodiments corresponding to Figures 3, 4, and 6 to 10.
[0338] Furthermore, the electronic device may further include: a transceiver 1102 and a bus 1103 , and the memory includes a random access memory 1104 and a read-only memory 1105 .
[0339] The processor is coupled to the transceiver, random access memory, and read-only memory via a bus. When the electronic device needs to be operated, it is booted via a basic input / output system (BIOS) stored in the read-only memory or a bootloader system in an embedded system, thereby guiding the electronic device into normal operation. After the electronic device enters normal operation, the application program and operating system are run in the random access memory, causing the electronic device to execute all or part of the steps in the embodiments corresponding to Figures 3, 4, and 6 to 10.
[0340] The electronic device of an embodiment of the present invention may correspond to the electronic device in the embodiments corresponding to the above-mentioned Figures 3, 4, and 6 to 10, and the processor and storage in the electronic device may implement the functions and / or the various steps and methods implemented by the electronic device in the embodiments corresponding to Figures 3, 4, and 6 to 10. For the sake of brevity, they will not be repeated here.
[0341] In a specific implementation, an embodiment of the present application further provides a computer storage medium, wherein a computer program or instruction is stored in the computer storage medium. When the computer program or instruction is executed, the computer can implement all or part of the steps in the embodiments corresponding to Figures 3, 4, and 6 to 10. The computer-readable storage medium is set in any device, and the arbitrary device can be a random-access memory (RAM). The memory can also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the memory can also include a combination of the above-mentioned types of memory, etc.
[0342] The present application also provides a chip system, which includes a processor coupled to a memory and configured to execute a computer program or instruction stored in the memory. When the computer program or instruction is executed, the chip system implements all or part of the steps in the embodiments corresponding to Figures 3, 4, and 6 to 10. The chip system can be composed of a chip or include a chip and other discrete components.
[0343] The various illustrative logic units and circuits described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital information processor, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor, optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital information processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital information processor core, or any other similar configuration.
[0344] The steps of the methods or algorithms described in the embodiments of the present application can be directly embedded in hardware, software units executed by a processor, or a combination of the two. The software units can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, removable disks, portable compact disc read-only memory (CD-ROM), or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium can also be integrated into the processor. The processor and storage medium can be provided in an ASIC, which can be provided in a user equipment (UE). Alternatively, the processor and storage medium can also be provided in different components in the UE.
[0345] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0346] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid state drive (SSD)).
[0347] The same or similar parts between the various embodiments of this specification can be referred to in conjunction with each other, and each embodiment focuses on the differences between the other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0348] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solutions in the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention or certain portions of the embodiments.
[0349] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the embodiments of the device disclosed in this application, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0350] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. A Bluetooth hearing aid connection method, applied to electronic equipment, characterized in that: include: Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame; If the notification data packet does not include the first information and the second information, determining the device type of the peripheral device according to the third information in the scan response frame, or according to the fourth information, the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, the third information is at least one information used to indicate the device type and the left and right ear identifiers, and the fourth information is located in the notification data packet and / or the scan response frame, and is used to indicate the services supported by the peripheral device; If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
2. The method according to claim 1, characterized in that The determining the device type of the peripheral device according to the fourth information includes: If the fourth information indicates that the services supported by the peripheral device include a hearing aid volume adjustment service, determining that the device type of the peripheral device is a Bluetooth hearing aid; or, If the fourth information indicates that the services supported by the peripheral device include audio control point services, determining that the device type of the peripheral device is a Bluetooth hearing aid; or, If the fourth information indicates that the services supported by the peripheral device include audio control point status reporting, it is determined that the device type of the peripheral device is a Bluetooth hearing aid.
3. The method according to claim 1, characterized in that After determining the device type of the peripheral device, the method further includes: If the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes the left and right ear identifiers, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers; If the Bluetooth hearing aid has not been paired in advance, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the search page of the Bluetooth hearing aid.
4. The method according to claim 1, characterized in that After determining the device type of the peripheral device, the method further includes: If the device type of the peripheral device is a Bluetooth hearing aid, and the third information in the scan response frame includes the left and right ear identifiers, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers; After the Bluetooth hearing aid is connected, an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
5. The method according to any one of claims 1 to 4, characterized in that: The connecting the Bluetooth hearing aid comprises: If paired with the Bluetooth hearing aid in advance, directly connect to the Bluetooth hearing aid; or, If the Bluetooth hearing aid has not been paired in advance, the icon of the Bluetooth hearing aid is displayed on the search page; After receiving a connection operation for the search page, the Bluetooth hearing aid is connected.
6. A Bluetooth hearing aid connection method, applied to electronic equipment, characterized in that: include: Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet; If the notification data packet does not include the first information and the second information, determining the device type of the peripheral device according to the device name indicated by the BLE broadcast packet, the first information and the second information being used to indicate the device type and the left and right ear identifiers, respectively; If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
7. The method according to claim 6, characterized in that After determining the device type of the peripheral device, the method further includes: If the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame; If the Bluetooth hearing aid has not been paired in advance, the icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the search page of the Bluetooth hearing aid.
8. The method according to claim 6, characterized in that After determining the device type of the peripheral device, the method further includes: If the device type of the peripheral device is a Bluetooth hearing aid, and the BLE broadcast packet also includes a scan response frame, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame; After the Bluetooth hearing aid is connected, an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
9. The method according to any one of claims 6 to 8, characterized in that: The connecting the Bluetooth hearing aid comprises: If it is paired with the Bluetooth hearing aid in advance, it is directly connected to the Bluetooth hearing aid; or, If the Bluetooth hearing aid has not been paired in advance, the icon of the Bluetooth hearing aid is displayed on the search page; After receiving a connection operation for the search page, the Bluetooth hearing aid is connected.
10. A Bluetooth hearing aid connection method, applied to electronic equipment, characterized in that: include: Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet; If the notification data packet does not include the first information and the second information, matching the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information; If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the peripheral device is connected.
11. The method according to claim 10, characterized in that The matching of the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information includes: Determine the target connection information in the historical connection information, where the difference between the time corresponding to the target connection information and the time of receiving the BLE broadcast packet is within a preset range; The address of the peripheral device is matched with the address of the Bluetooth hearing aid included in the target connection information.
12. The method according to claim 10 or 11, characterized in that: After matching the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information, the method further includes: If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, and the BLE broadcast packet also includes a scan response frame, determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame; After the Bluetooth hearing aid is connected, an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
13. A Bluetooth hearing aid connection method, applied to electronic equipment, characterized in that: include: Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame; Determine the device type of the peripheral device according to first information included in the notification data packet, where the first information is used to indicate the device type; If the notification data packet does not include the second information, and the device type of the peripheral device is a Bluetooth hearing aid, determining the left ear or the right ear of the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame, and the second information is used to indicate the left and right ear identifiers; The Bluetooth hearing aid is connected, and an icon of the left ear or right ear corresponding to the Bluetooth hearing aid is displayed on the connection page of the Bluetooth hearing aid.
14. A Bluetooth hearing aid connection method, applied to electronic equipment, characterized in that: include: Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame; If the notification data packet does not include the first information and the second information, after determining that the peripheral device is a Bluetooth hearing aid according to the third information in the scan response frame, connecting the Bluetooth hearing aid, the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, and the third information is at least one information used to indicate the device type and the left and right ear identifiers; If the scan response frame does not include the third information, after determining that the peripheral device is a Bluetooth hearing aid according to fourth information, connecting the Bluetooth hearing aid, the fourth information being located in the notification data packet and / or the scan response frame and being used to indicate services supported by the peripheral device; If neither the notification data packet nor the scan response frame includes the fourth information, after determining that the peripheral device is a Bluetooth hearing aid according to the device name indicated by the BLE broadcast packet, connecting the Bluetooth hearing aid; If the BLE broadcast packet does not include the device name, after determining that the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the peripheral device is connected.
15. The method according to claim 14, characterized in that Also includes: Determine the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame; The left ear or right ear icon corresponding to the Bluetooth hearing aid is displayed on the search page and / or connection page of the Bluetooth hearing aid.
16. An electronic device, characterized in that: include: Receiving module, device identification module and connection module; The receiving module is used to receive a Bluetooth low energy BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame; If the notification data packet does not include the first information and the second information, the device identification module is used to determine the device type of the peripheral device according to the third information in the scan response frame, or according to the fourth information, the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, the third information is at least one information used to indicate the device type and the left and right ear identifiers, and the fourth information is located in the notification data packet and / or the scan response frame, and is used to indicate the services supported by the peripheral device; If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
17. An electronic device, characterized in that: include: Receiving module, device identification module and connection module; The receiving module is used to receive a Bluetooth low energy BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet; If the notification data packet does not include the first information and the second information, the device identification module is used to determine the device type of the peripheral device according to the device name indicated by the BLE broadcast packet, and the first information and the second information are used to indicate the device type and the left and right ear identifications, respectively; If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
18. An electronic device, characterized in that: include: Receiving module, device identification module and connection module; The receiving module is used to receive a Bluetooth low energy BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet; If the notification data packet does not include the first information and the second information, the device identification module is used to match the address of the peripheral device with the address of the Bluetooth hearing aid included in the historical connection information; If the device type of the peripheral device is a Bluetooth hearing aid, the connection module is used to connect to the Bluetooth hearing aid.
19. An electronic device, characterized in that: include: Receiving module, device identification module and connection module; The receiving module is used to receive a Bluetooth low energy BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame; The device identification module is used to determine the device type of the peripheral device according to the first information included in the notification data packet, where the first information is used to indicate the device type; If the notification data packet does not include the second information, and the device type of the peripheral device is a Bluetooth hearing aid, The device identification module is further used to determine the left ear or right ear of the Bluetooth hearing aid according to the left and right ear identifiers included in the scan response frame, and the second information is used to indicate the left and right ear identifiers; The connection module is used to connect the Bluetooth hearing aid and display the left ear or right ear icon corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
20. An electronic device, characterized in that: include: Receiving module, device identification module and connection module; The receiving module is used to receive a Bluetooth low energy BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame; If the notification data packet does not include the first information and the second information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid according to the third information in the scan response frame, the connection module is used to connect the Bluetooth hearing aid, the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively, and the third information is at least one piece of information used to indicate the device type and the left and right ear identifiers; If the scan response frame does not include the third information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid according to the fourth information, the connection module is used to connect the Bluetooth hearing aid, and the fourth information is located in the notification data packet and / or the scan response frame, and is used to indicate the services supported by the peripheral device; If neither the notification data packet nor the scan response frame includes the fourth information, after the device identification module determines that the peripheral device is a Bluetooth hearing aid according to the device name indicated by the BLE broadcast packet, the connection module is used to connect the Bluetooth hearing aid; If the BLE broadcast packet does not include the device name, after the device identification module determines that the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, the connection module is used to connect the peripheral device.
21. A computer storage medium, characterized in that The computer storage medium stores a computer program or instruction. When the computer program or instruction is executed, the method according to any one of claims 1 to 15 is executed.
22. A chip system, characterized in that: The chip system includes a processor, which is coupled to a memory and is used to execute a computer program or instruction stored in the memory. When the computer program or instruction is executed, the method as described in any one of claims 1 to 15 is executed.
Citation Information
Patent Citations
Bluetooth connection method and electronic equipment
CN112449332A
WiFi network access method, communication method, peripheral equipment and storage medium
CN114980266A
Display device, hearing aid and volume adjusting method
CN115567862A
Bluetooth connection control method, system and equipment
CN116056051A
Bluetooth service query method and electronic device
WO2020132878A1