Bluetooth hearing aid connection method, electronic equipment and device
By using the third or fourth information in the BLE broadcast packet to identify the device type and left and right ear identifiers 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
- CN202310780952.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
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 ASHAUUID, through supported services The information recognizes the Bluetooth hearing aid and displays the corresponding icon on the Search or Connect page to help the user 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 CN119233437A_ABST
Abstract
Description
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 equipment and device. 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 aid (ASHA) is a hearing aid protocol exclusive to Bluetooth hearing aids. When this protocol is applied, electronic devices can receive notification data packets in Bluetooth low energy (BLE) broadcast packets sent by Bluetooth hearing aids during the process of searching for Bluetooth hearing aids, and identify the device type through the notification data packets to achieve connection with the Bluetooth hearing aid, so that after the connection, the audio signal emitted by itself can be transmitted to the Bluetooth 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. Summary of the invention
[0005] 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, the embodiments of the present application provide a Bluetooth hearing aid connection method and device.
[0006] 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:
[0007] 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;
[0008] 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;
[0009] If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0010] 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 when it is determined that the peripheral device is a Bluetooth hearing aid, connect the 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 it is difficult for electronic devices to connect to Bluetooth hearing aids.
[0011] In an optional design, determining the device type of the peripheral device according to the fourth information includes:
[0012] 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;
[0013] 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;
[0014] 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.
[0015] 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.
[0016] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0017] 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;
[0018] 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.
[0019] 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 according to 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.
[0020] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0021] 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;
[0022] 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.
[0023] 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 according to 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.
[0024] In an optional design, the connecting the Bluetooth hearing aid includes:
[0025] If paired with the Bluetooth hearing aid in advance, directly connect to the Bluetooth hearing aid;
[0026] or,
[0027] If the Bluetooth hearing aid has not been paired in advance, the icon of the Bluetooth hearing aid is displayed on the search page;
[0028] After receiving a connection operation for the search page, the Bluetooth hearing aid is connected.
[0029] Through the above method, when the electronic device is paired with the Bluetooth hearing aid in advance, it can directly connect 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.
[0030] 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:
[0031] Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0032] 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;
[0033] If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0034] 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 when it is determined that the peripheral device is a Bluetooth hearing aid, connect the 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 it is difficult for electronic devices to connect to Bluetooth hearing aids.
[0035] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0036] 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;
[0037] 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.
[0038] In an optional design, after determining the device type of the peripheral device, the method further includes:
[0039] 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;
[0040] 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.
[0041] In an optional design, the connecting the Bluetooth hearing aid includes:
[0042] If paired with the Bluetooth hearing aid in advance, directly connect to the Bluetooth hearing aid;
[0043] or,
[0044] If the Bluetooth hearing aid has not been paired in advance, the icon of the Bluetooth hearing aid is displayed on the search page;
[0045] After receiving a connection operation for the search page, the Bluetooth hearing aid is connected.
[0046] 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:
[0047] Receive a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet;
[0048] 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;
[0049] 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.
[0050] 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 when it is determined that the peripheral device is a Bluetooth hearing aid, connect the 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 it is difficult for electronic devices to connect to Bluetooth hearing aids.
[0051] 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:
[0052] 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;
[0053] The address of the peripheral device is matched with the address of the Bluetooth hearing aid included in the target connection information.
[0054] Through the above method, 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, thereby reducing the matching operations and improving the efficiency of connecting the Bluetooth hearing aid.
[0055] 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:
[0056] 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;
[0057] 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.
[0058] 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:
[0059] 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;
[0060] 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;
[0061] 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;
[0062] 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.
[0063] 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 when it is determined that the peripheral device is a Bluetooth hearing aid, connect the 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 it is difficult for electronic devices to connect to Bluetooth hearing aids.
[0064] 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:
[0065] 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;
[0066] 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;
[0067] 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;
[0068] 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;
[0069] 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.
[0070] 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 when it is determined that the peripheral device is a Bluetooth hearing aid, connect the 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 it is difficult for electronic devices to connect to Bluetooth hearing aids.
[0071] An optional design also includes:
[0072] 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;
[0073] 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.
[0074] In a sixth aspect, an embodiment of the present application provides an electronic device, including:
[0075] Receiving module, device identification module and connection module;
[0076] 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;
[0077] 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;
[0078] 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.
[0079] In a seventh aspect, an embodiment of the present application provides an electronic device, including:
[0080] Receiving module, device identification module and connection module;
[0081] 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;
[0082] 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;
[0083] 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.
[0084] In an eighth aspect, an embodiment of the present application provides an electronic device, including:
[0085] Receiving module, device identification module and connection module;
[0086] 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;
[0087] 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;
[0088] 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.
[0089] In a ninth aspect, an embodiment of the present application provides an electronic device, including:
[0090] Receiving module, device identification module and connection module;
[0091] 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;
[0092] 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;
[0093] 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;
[0094] 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.
[0095] In a tenth aspect, an embodiment of the present application provides an electronic device, including:
[0096] Receiving module, device identification module and connection module;
[0097] 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;
[0098] 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;
[0099] 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;
[0100] 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;
[0101] 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.
[0102] 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.
[0103] In a twelfth aspect, an embodiment of the present application provides a computer storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed, the method described in any one of the first to fifth aspects is executed.
[0104] In the thirteenth aspect, an embodiment of the present application provides a chip system, which includes a processor, 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.
[0105] 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 indicating the left and right ear identifiers, and when it is determined that the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid, so as to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid.
[0106] 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.
[0107] 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.
[0108] In addition, the solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the search page and / or connection 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 icons on the search page and / or connection page. In addition, if the user needs to wear a Bluetooth hearing aid on one ear, the solution also facilitates the user to select the Bluetooth hearing aid he needs to wear based on the icon, thereby improving the user's wearing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0109] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces 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 creative work.
[0110] FIG. 1( a ) is a schematic diagram of a connection page of an electronic device;
[0111] FIG1( b ) is a schematic diagram of a search page of an electronic device;
[0112] FIG1( c ) is a schematic diagram of a reminder page of an electronic device;
[0113] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0114] Figure 3 A schematic diagram of a workflow of a Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0115] Figure 4A schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0116] FIG5( a) is a schematic diagram of a search page of an electronic device provided in an embodiment of the present application;
[0117] FIG5( b ) is a schematic diagram of a connection page of an electronic device provided in an embodiment of the present application;
[0118] Figure 6 A schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0119] Figure 7 A schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0120] Figure 8 A schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0121] Fig. 9 A schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0122] Fig.10 A schematic diagram of a workflow of another Bluetooth hearing aid connection method provided in an embodiment of the present application;
[0123] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0124] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0125] 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.
[0126] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "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 may exist; for example, A and / or B can represent: 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 objects associated before and after are in an "or" relationship.
[0127] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0128] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:
[0129] 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.
[0130] 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 the 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), which indicates that the electronic device has been connected to "HearingAids 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 "HearingAids No. 5" field.
[0131] In addition, FIG. 1( 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.
[0132] Among them, the ASHA protocol is a proprietary protocol for Bluetooth hearing aids. When the protocol is applied, during the search phase, the electronic device can receive the BLE broadcast packet sent by the Bluetooth hearing aid. The BLE broadcast packet includes a notification data packet and a scan response frame (i.e., scan response). Electronic devices usually identify the device type based on the hearing aid audio streaming universally unique identifier (ASHA UID) included in the notification data packet.
[0133] However, the notification data packet sometimes does not contain ASHAUUID. 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 therein.
[0134] If the electronic device cannot identify whether the peripheral device is a Bluetooth hearing aid based on the announcement data packet, the following two situations usually occur:
[0135] (Case 1) Even if the peripheral device is a Bluetooth hearing aid, the electronic device cannot connect to the Bluetooth hearing aid.
[0136] 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.
[0137] Since 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, referring to the interface diagram of the electronic device during the search phase shown in FIG1(b), in which the icon to the left of "No. 5 HearingAids" is a Bluetooth icon, which can only indicate that the searched device is a Bluetooth-enabled device, but cannot indicate that the device is a Bluetooth hearing aid.
[0138] Furthermore, if the electronic device only displays the Bluetooth icon for the peripheral device during the search phase, the user may sometimes operate the interface of the electronic device (for example, click on "No. 5 HearingAids" displayed in 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 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.
[0139] In one example, the reminder displayed by the electronic device may be as shown in Figure 1(c). Referring to the 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.
[0140] In this case, when the electronic device receives the operation to eliminate the reminder, it often just stops displaying the reminder and does not perform the connection operation, so the peripheral device will not be connected.
[0141] 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.
[0142] (Case 2) The electronic device downloads a corresponding application according to a user's operation, and connects to a peripheral device according to the user's operation on the downloaded application.
[0143] Some electronic devices provide pairable applications for some peripheral devices. In this case, since the electronic device cannot identify the device type of the peripheral device, the search page of the electronic device will not display relevant information indicating the device type. The user needs to obtain the device type of the peripheral device based on his or her own experience or other means, and then operate the electronic device. The electronic device downloads the application corresponding to the device type according to the user's operation, and after completing the download of the application, the electronic device can perform pairing with the peripheral device according to the received user operation for the application, thereby realizing the connection between the electronic device and the peripheral device.
[0144] However, if the user makes an error in determining the device type of the peripheral device, it will often result in an application downloaded by the electronic device not matching the peripheral device, causing a failure in connecting to the peripheral device.
[0145] That is, in this case, the electronic device needs to download corresponding applications according to multiple operations of the user in order to achieve connection with the peripheral device. The operation is relatively cumbersome, and there is a possibility of failure in connecting to the peripheral device.
[0146] That is to say, in the prior art, the notification data packet in the BLE broadcast packet usually does not contain ASHAUUID, which makes it impossible to identify whether the peripheral device is a Bluetooth hearing aid, further causing the electronic device to be 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, causing difficulty in connecting the electronic device to the peripheral device.
[0147] Furthermore, when the ASHA protocol is applied, the notification data packet may also include corresponding left and right ear identifiers, where if the Bluetooth hearing aid is suitable for wearing in the user's left ear, the notification data packet may include a left ear identifier, and if the Bluetooth hearing aid is suitable for wearing in the user's right ear, the notification data packet may include a right ear identifier. In this case, after receiving the notification data packet, the electronic device may also display an icon indicating the left ear or right ear, so that the user can wear the Bluetooth hearing aid in the appropriate ear according to the icon, or, when the user only needs to wear one Bluetooth hearing aid, select the appropriate Bluetooth hearing aid according to the icon.
[0148] 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.
[0149] In order to solve the above technical problems, the present application provides a Bluetooth hearing aid connection method and device through the following embodiments.
[0150] The method can be performed by an electronic device, which can support Bluetooth function, realize Bluetooth connection with a peripheral device, and transmit data to the peripheral device through 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, 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. The application does not limit the type of electronic device.
[0151] Taking a mobile phone as an example of the electronic device, in this embodiment, the structure of the electronic device can be as follows: Figure 2 As shown, Figure 2A schematic diagram of the structure of an electronic device to which the Bluetooth hearing aid connection method provided in an embodiment of the present application is applied.
[0152] like Figure 2 As shown, 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.
[0153] 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.
[0154] It is to 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0155] 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. A memory may also be provided in the processor 110 for storing instructions and data.
[0156] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits 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, etc.
[0157] The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used 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 screen 194, the camera 193, and the wireless communication module 160.
[0158] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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 technology (NFC), infrared technology (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.
[0159] The electronic device implements the display function through a graphics processing unit (GPU), a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0160] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. A series of graphical user interfaces (GUIs) can be displayed on the display screen 194 of the electronic device, and these GUIs are the main screens of the electronic device.
[0161] The electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0162] The external memory interface 120 can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121.
[0163] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0164] 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 arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0165] Speaker 170A, also called "horn", is used to convert audio electrical signals into sound signals. The electronic device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting his mouth close to microphone 170C to input the sound signal into microphone 170C. Headphone jack 170D is used to connect wired headphones.
[0166] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. 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 the air pressure. The magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in all directions (generally three axes). The distance sensor 180F is used to measure the 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 the ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. The touch sensor 180K is also called a "touch device". The touch sensor 180K can be set on the display screen 194, and 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 button 190 can be a mechanical button, a touch button, or a virtual button. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.
[0167] In addition, an operating system is running 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 the operating system.
[0168] In order to clarify the solution provided by the present application, the solution provided by the present application is introduced and explained through various embodiments in conjunction with the accompanying drawings.
[0169] 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.
[0170] See also Figure 3 The Bluetooth hearing aid connection method provided in the embodiment of the present application includes the following steps:
[0171] Step S110: receiving a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device.
[0172] In the ASHA protocol, a BLE broadcast packet includes a notification data packet and a scan response frame (ie, scanresponse), and the peripheral device refers to a Bluetooth device that can receive data sent by an electronic device.
[0173] 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.
[0174] Among them, the first information and the second information are used to indicate the device type and the left and right ear identification, respectively. In the ASHA protocol, the first information is the ASHAUUID included in the notification data packet, and the electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHAUUID. The second information is the left and right ear identification in the notification data packet. If the notification information includes the left and right ear identification, 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 identification. 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.
[0175] The third information is at least one kind of 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 kind of information, it can determine whether the peripheral device is a Bluetooth hearing aid based on the at least one kind of information.
[0176] In addition, 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. The notification data packet and / or the scan response frame may include a service UUID supported by the peripheral device, and 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.
[0177] Step S130: If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0178] If the electronic device is 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 be directly connected to the Bluetooth hearing aid to improve the efficiency of connecting the electronic device to the Bluetooth hearing aid.
[0179] 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 may 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 selection to meet the user's needs.
[0180] According to the above introduction to the prior art, if in the prior art, the electronic device fails to identify the device type of the peripheral device, 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.
[0181] Through the above steps provided in the present 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 of the search page. Compared with the existing technology, the connection method is more convenient and efficient.
[0182] 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 indicating the left and right ear identifiers, and when it is determined that the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid, so as to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid.
[0183] In step S120, an operation of determining the device type of the peripheral device according to the fourth information is provided. In order to elaborate on how to determine the device type of the peripheral device according to the fourth information, the following feasible implementation methods are disclosed:
[0184] (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.
[0185] When using a Bluetooth hearing aid, the user sometimes wants to adjust the volume of the Bluetooth hearing aid output through the volume adjustment service. Therefore, in this implementation, if any one of the announcement data packet and the scan response frame includes the fourth information indicating the hearing aid volume adjustment service, the electronic device can determine that the peripheral device is a Bluetooth hearing aid.
[0186] (2) If the fourth information indicates that the services supported by the peripheral device include audio control point services (ie, AudioControlPoint), it is determined that the device type of the peripheral device is a Bluetooth hearing aid.
[0187] 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.
[0188] (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.
[0189] 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.
[0190] In actual application scenarios, the device type of the peripheral device can be determined by any of the above implementations. 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.
[0191] Through the operations of step S110 to step 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. In order to meet this demand of the user, the present application provides another embodiment.
[0192] See also Figure 4 The workflow diagram shown in FIG. 1 includes the following steps:
[0193] Step S210: receiving a BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] Step S240: If the Bluetooth hearing aid has not been paired in advance, the left ear or right ear icon 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.
[0198] The icon of the left ear or right ear corresponding to the Bluetooth hearing aid may be represented by letters, text or graphics. If represented by letters, the letters may include "L" (indicating that the Bluetooth hearing aid is adapted to the left ear) and "R" (indicating that the Bluetooth hearing aid is adapted to the right ear); if represented by text, the text may include "left" (indicating that the Bluetooth hearing aid is adapted to the left ear) and "right" (indicating that the Bluetooth hearing aid is adapted to the right ear); if represented by graphics, the graphics may include an ear graphic leaning to the left (indicating that the Bluetooth hearing aid is adapted to the left ear) and an ear graphic leaning to the right (indicating that the Bluetooth hearing aid is adapted to the right ear).
[0199] 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 which 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.
[0200] 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.
[0201] In response to this problem, in the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, the left and right ear identifiers included in the scanning response frame are used to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear, thereby solving the above problem. In addition, the solution can also display the left ear 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 icons on the search page. In addition, if the user needs to wear a Bluetooth hearing aid on one ear, the solution also facilitates the user to select the Bluetooth hearing aid he needs to wear based on the icon, thereby improving the user's wearing experience.
[0202] Further, 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.
[0203] Through the operations of step S110 to step S130, it can be determined whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, after achieving 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 demand of the user, the present application provides another embodiment.
[0204] See also Figure 6 The workflow diagram shown in FIG. 1 includes the following steps:
[0205] Step S310: Receive a BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet and a scan response frame.
[0206] 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 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.
[0207] 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.
[0208] 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.
[0209] Step S340: Connect the Bluetooth hearing aid.
[0210] Step S350: 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.
[0211] 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 which 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.
[0212] In the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, the left and right ear identifiers included in the scanning response frame are used to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear, thereby solving the problem in the prior art that when 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. In addition, the solution can also display the left or right ear icon corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid. In this case, the user can understand the left and right ears corresponding to the connected Bluetooth hearing aid by viewing the connection page.
[0213] In addition, in the above description and Figure 6 In the embodiment of the present invention, after determining the left ear or right ear corresponding to the Bluetooth hearing aid according to the left and right ear identifiers in the scan response frame, the operation of connecting 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 the Bluetooth hearing aid can be performed first, and then the left ear or right ear corresponding to the Bluetooth hearing aid can be determined according to 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.
[0214] The present application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid. The method is applied to the electronic device. Figure 7 The Bluetooth hearing aid connection method provided in the embodiment of the present application includes the following steps:
[0215] Step S410: receiving a Bluetooth low energy (BLE) broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet.
[0216] 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.
[0217] Among them, the first information and the second information are used to indicate the device type and the left and right ear identification, respectively. In the ASHA protocol, the first information is the ASHAUUID included in the notification data packet, and the electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHAUUID. The second information is the left and right ear identification in the notification data packet. If the notification information includes the left and right ear identification, 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 identification. 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.
[0218] 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.
[0219] Step S430: If the device type of the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0220] If the electronic device is 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 be directly connected to the Bluetooth hearing aid to improve the efficiency of connecting the electronic device to the Bluetooth hearing aid.
[0221] 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 may display the icon of the Bluetooth hearing aid on the search page, and after receiving the connection operation for the search page, connect to the Bluetooth hearing aid, thereby being able to connect the Bluetooth hearing aid according to the user's selection to meet the user's needs.
[0222] 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 indicating the left and right ear identifiers, and when it is determined that the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid, so as to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid.
[0223] 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 demand of the user, the present application provides another embodiment. The embodiment includes the following steps:
[0224] A BLE broadcast packet sent by a peripheral device is received, wherein the BLE broadcast packet includes a notification data packet and a scan response frame.
[0225] If the notification data packet does not include the first information and the second information, the device type of the peripheral device is determined according to the device name indicated by the BLE broadcast packet, wherein the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively.
[0226] The operation process of the above two steps 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.
[0227] 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.
[0228] 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 search page of the Bluetooth hearing aid, so that the user can choose whether to connect the Bluetooth hearing aid.
[0229] 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.
[0230] In response to this problem, in the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, the left and right ear identifiers included in the scanning response frame are used to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear, 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 facilitates the user to select the Bluetooth hearing aid he needs to wear based on the icon for connection, thereby improving the user's wearing experience.
[0231] Through the operation of the above steps, it can be determined whether the peripheral device is a Bluetooth hearing aid. In addition, in some cases, after achieving 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 demand of the user, the present application provides another embodiment. The embodiment includes the following steps:
[0232] A Bluetooth low energy (BLE) broadcast packet sent by a peripheral device is received, wherein the BLE broadcast packet includes a notification data packet.
[0233] If the notification data packet does not include the first information and the second information, the device type of the peripheral device is determined according to the device name indicated by the BLE broadcast packet, wherein the first information and the second information are used to indicate the device type and the left and right ear identifiers, respectively.
[0234] 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.
[0235] 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.
[0236] Connect Bluetooth hearing aids.
[0237] 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.
[0238] 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.
[0239] In view of this problem, in the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, the left and right ear identifiers included in the scanning response frame are used to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear, 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 connection page of the Bluetooth hearing aid. In this case, the user can understand the left and right ears corresponding to the connected Bluetooth hearing aid by viewing the connection page.
[0240] In addition, in the above description, after the left ear or right ear corresponding to the Bluetooth hearing aid is determined according to the left and right ear identifiers in the scan response frame, the operation of connecting the Bluetooth hearing aid is performed. In actual application scenarios, there is no strict time sequence restriction for these two steps. For example, the operation of connecting the Bluetooth hearing aid can be performed first, and then the left ear or right ear corresponding to the Bluetooth hearing aid can be determined according to 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.
[0241] The present application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid. The method is applied to the electronic device. Figure 8 The Bluetooth hearing aid connection method provided in the embodiment of the present application includes the following steps:
[0242] Step S510: receiving a Bluetooth low energy BLE broadcast packet sent by a peripheral device, wherein the BLE broadcast packet includes a notification data packet.
[0243] 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.
[0244] Among them, the first information and the second information are used to indicate the device type and the left and right ear identification, respectively. In the ASHA protocol, the first information is the ASHAUUID included in the notification data packet, and the electronic device can usually identify whether the peripheral device is a Bluetooth hearing aid based on the ASHAUUID. The second information is the left and right ear identification in the notification data packet. If the notification information includes the left and right ear identification, 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 identification. 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 match between the address of the peripheral device and the address of the Bluetooth hearing aid contained in the historical connection information.
[0245] The historical connection information includes address information of the Bluetooth hearing aid that the electronic device was previously connected to, and the address may be a media access control address (MAC) address.
[0246] 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.
[0247] If the address of the peripheral device matches the address of the Bluetooth hearing aid included in the historical connection information, it means 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.
[0248] 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 means 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.
[0249] Alternatively, the electronic device may also display the icon of the Bluetooth hearing aid on the search page when determining that the address of the peripheral device matches the address of the Bluetooth hearing aid contained in the historical connection information, and connect to the Bluetooth hearing aid after receiving a connection operation for the search page, so as to achieve connection to the Bluetooth hearing aid according to the user's selection to meet the user's needs.
[0250] 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 indicating the left and right ear identifiers, and when it is determined that the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid, so as to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid.
[0251] In the above embodiment, the operation of matching the address of the peripheral device with the address of the Bluetooth hearing aid contained in the historical connection information is disclosed through step S520. In actual application scenarios, within a preset period, the address of the Bluetooth hearing aid usually remains unchanged. 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. The preset period can be called the address change period. In view of this situation, 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:
[0252] 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.
[0253] After the Bluetooth hearing aid is connected to the electronic device, the electronic device will determine the corresponding connection information, which usually includes the address of the Bluetooth hearing aid, and the address can be determined based on the address information contained in the BLE broadcast packet. In addition, during the connection between the Bluetooth hearing aid and the electronic device, the address of the Bluetooth hearing aid usually remains unchanged. If the Bluetooth hearing aid is unpaired from the electronic device, the address of the Bluetooth hearing aid will usually change once every first preset time period from the moment of unpairing. Among them, unpairing may include unpairing due to restoring factory settings, or unpairing according to received user operations, and other situations.
[0254] 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, and after the unpairing duration 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.
[0255] 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.
[0256] The preset range is determined according to the change cycle of the address of the Bluetooth hearing aid, and is used to ensure that the difference between the time corresponding to the target connection information and the time of receiving the BLE broadcast packet is not greater than the change cycle of the address. For example, if the address of the Bluetooth hearing aid changes every 15 minutes after the Bluetooth hearing aid is unpaired from the electronic device, the difference between the time corresponding to the target connection information and the time of receiving the BLE broadcast packet is not greater than 15 minutes.
[0257] The address of the peripheral device is then matched with the address of the Bluetooth hearing aid contained in the target connection information.
[0258] 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.
[0259] 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 demand of the user, the present application provides another embodiment. The embodiment includes the following steps:
[0260] A Bluetooth low energy (BLE) broadcast packet sent by a peripheral device is received, wherein the BLE broadcast packet includes a notification data packet.
[0261] 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, wherein the first information and the second information are used to indicate the device type and the left and right ear identifiers respectively.
[0262] 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.
[0263] 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, 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.
[0264] Connect Bluetooth hearing aids.
[0265] 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.
[0266] 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.
[0267] In view of this problem, in the solution disclosed in the embodiment of the present application, after determining that the peripheral device is a Bluetooth hearing aid, the left and right ear identifiers included in the scanning response frame are used to identify whether the Bluetooth hearing aid corresponds to the left ear or the right ear, 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 connection page of the Bluetooth hearing aid. In this case, the user can understand the left and right ears corresponding to the connected Bluetooth hearing aid by viewing the connection page.
[0268] In addition, in the above description, after the left ear or right ear corresponding to the Bluetooth hearing aid is determined according to the left and right ear identifiers in the scan response frame, the operation of connecting the Bluetooth hearing aid is performed. In actual application scenarios, there is no strict time sequence restriction for these two steps. For example, the operation of connecting the Bluetooth hearing aid can be performed first, and then the left ear or right ear corresponding to the Bluetooth hearing aid can be determined according to 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.
[0269] The present application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid. The method is applied to the electronic device. Fig. 9 The Bluetooth hearing aid connection method provided in the embodiment of the present application includes the following steps:
[0270] Step S610: receiving 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.
[0271] 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.
[0272] 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.
[0273] 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.
[0274] The second information is the left and right ear identifiers in the notification data packet. If the notification information includes the left and right ear identifiers, the electronic device can usually determine whether the Bluetooth hearing aid belongs to the left ear or the right ear based on the left and right ear identifiers. In this case, if the notification data packet does not include the second information, the electronic device cannot determine the left and right ears corresponding to the Bluetooth hearing aid through the notification data packet, so the left and right ears of the Bluetooth hearing aid can be determined by scanning the left and right ear identifiers included in the response frame.
[0275] 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.
[0276] 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.
[0277] 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 when it is determined that the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid, so as to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid.
[0278] 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.
[0279] Accordingly, the present application also provides a Bluetooth hearing aid connection method through another embodiment to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid. The method is applied to the electronic device. This embodiment can comprehensively apply multiple information to determine the device type of the peripheral device, see Fig.10 The Bluetooth hearing aid connection method provided in the embodiment of the present application includes the following steps:
[0280] Step S710: receiving 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.
[0281] 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.
[0282] 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.
[0283] 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, perform the operation of step S740; if yes, perform the operation of step S760.
[0284] 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.
[0285] 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.
[0286] 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, perform the operation of step S760.
[0287] 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.
[0288] Step S760: If the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid.
[0289] Through the operations of step S710 to step 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, and accordingly, can improve the accuracy of connecting the electronic device to the Bluetooth hearing aid.
[0290] Furthermore, the solution provided in the embodiment of the present application also includes the following steps:
[0291] 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;
[0292] 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.
[0293] 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.
[0294] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0295] The present application embodiment discloses an electronic device, see Fig.11 As shown in the structural schematic diagram, the device includes: a receiving module 210, a device identification module 220 and a connection module 230.
[0296] 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;
[0297] If the notification data packet does not include the first information and the second information, the device identification module 220 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;
[0298] If the device type of the peripheral device is a Bluetooth hearing aid, the connection module 230 is used to connect to the Bluetooth hearing aid.
[0299] Through the device 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 indicating the left and right ear identifiers, and when it is determined that the peripheral device is a Bluetooth hearing aid, connect the Bluetooth hearing aid, so as to solve the problem in the prior art that the electronic device cannot identify the device type of the Bluetooth hearing aid, resulting in difficulty in connecting the electronic device to the Bluetooth hearing aid.
[0300] In a feasible design, the device identification module 220 is specifically used to determine that the device type of the peripheral device is a Bluetooth hearing aid if the fourth information indicates that the services supported by the peripheral device include a hearing aid volume adjustment service;
[0301] 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;
[0302] 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.
[0303] 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.
[0304] 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, displaying the icon of the left ear or right ear corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0305] In a feasible design, the connection module 230 is specifically used to directly connect to the Bluetooth hearing aid if it is paired with the Bluetooth hearing aid in advance; 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 the Bluetooth hearing aid.
[0306] Accordingly, the present application provides an electronic device through another embodiment. In this embodiment, the electronic device includes:
[0307] Receiving module, device identification module and connection module;
[0308] 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;
[0309] 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;
[0310] 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.
[0311] 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.
[0312] 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, displaying the icon of the left ear or right ear corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0313] In a feasible design, the connection module is specifically used to directly connect to the Bluetooth hearing aid if it is paired with the Bluetooth hearing aid in advance; 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 the Bluetooth hearing aid.
[0314] Accordingly, the present application provides an electronic device through another embodiment, in which a receiving module, a device identification module and a connection module;
[0315] 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;
[0316] 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;
[0317] 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.
[0318] 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.
[0319] 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, displaying the icon of the left ear or right ear corresponding to the Bluetooth hearing aid on the connection page of the Bluetooth hearing aid.
[0320] Accordingly, the present application provides an electronic device through another embodiment, in which a receiving module, a device identification module and a connection module;
[0321] 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;
[0322] 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;
[0323] 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;
[0324] 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.
[0325] Accordingly, the present application provides an electronic device through another embodiment, in which a receiving module, a device identification module and a connection module;
[0326] 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;
[0327] 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;
[0328] 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;
[0329] 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;
[0330] 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.
[0331] 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;
[0332] 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.
[0333] Accordingly, the present application embodiment discloses an electronic device, see Fig.12 As shown in the structural schematic diagram, the electronic device comprises:
[0334] Processor 1101 and memory,
[0335] The memory is used to store program instructions;
[0336] 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 Figure 3 to Figure 4 as well as Figures 6 to 10 All or part of the steps in the corresponding embodiments.
[0337] Furthermore, the electronic device may also include: a transceiver 1102 and a bus 1103 , and the memory includes a random access memory 1104 and a read-only memory 1105 .
[0338] The processor is coupled to the transceiver, random access memory and read-only memory through a bus. When the electronic device needs to be operated, the basic input and output system solidified in the read-only memory or the bootloader boot system in the embedded system is used to start the electronic device and guide it into a normal operating state. After the electronic device enters the normal operating state, the application program and the operating system are run in the random access memory, so that the electronic device executes Figure 3 to Figure 4 as well as Figures 6 to 10 All or part of the steps in the corresponding embodiments.
[0339] The electronic device according to the embodiment of the present invention may correspond to the above Figure 3 to Figure 4 as well as Figures 6 to 10 The electronic device in the corresponding embodiment, and the processor and storage in the electronic device can implement Figure 3 to Figure 4 as well as Figures 6 to 10 For the sake of brevity, the functions of the electronic device in the corresponding embodiment and / or the various steps and methods implemented are not described in detail here.
[0340] In a specific implementation, the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the computer can implement the following steps: Figure 3 to Figure 4 as well as Figures 6 to 10 All or part of the steps in the corresponding embodiments. The computer-readable storage medium is set in any device, and the arbitrary device may be a random access memory (RAM), and the memory may 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 may also include a combination of the above-mentioned types of memory, etc.
[0341] 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 can implement the following steps: Figure 3 to Figure 4 as well as Figures 6 to 10 All or part of the steps in the corresponding embodiments. The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0342] 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, a discrete gate or transistor logic, a discrete hardware component, or the design of any combination of the above to implement or operate the described functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional 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 combined with a digital information processor core, or any other similar configuration.
[0343] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two. The software unit can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, a removable disk, a portable compact disk 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 can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a user terminal (UE). Optionally, the processor and the storage medium can also be arranged in different components in the UE.
[0344] 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.
[0345] 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may 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 may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may 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 integrated. The available medium may 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)), etc.
[0346] The same or similar parts between the various embodiments of this specification can be referred to each other, and each embodiment focuses on the differences from 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 embodiment part.
[0347] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0348] 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.
[0349] 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.
