Skip to content

Hearing aid script settings don't seem to stick #358

@RBastianini

Description

@RBastianini

I've attempted to use the linux/hearing-aid-adjustments.py (incorrectly referenced in the linux/README.md as hearing_aid.py) to configure hearing aid on a pair of Airpods Pro 2 using Ubuntu 22.04.5 LTS.
In order to make the script run I first applied the patch from PR 355, then I added the recommended deviceID configuration DeviceID = bluetooth:004C:0000:0000 to /etc/bluetooth/main.conf, downloaded PyQt5 using pip and installed libbluetooth-dev (without which, the script would fail to run).

With this setup in place, the dialog pops up and I can see communication happening in the console when I interact with the controls, but I can't hear any difference in the headphones. Also, if I close and relaunch the script, everything resets to default, and the logs seem to confirm that the settings were not saved (because the response when reading the hearing aid after relaunching the script is the same as the previous execution).

As a last resort I also attempted using the windows script from PR 333, but after setting it up, the result is the same: I can't hear any difference and the settings seem to reset every time I relaunch the script.

Am I doing something wrong?

Here are the logs when running the linux script.

2025-12-07 12:34:38,821 - INFO - Starting app
2025-12-07 12:34:38,830 - INFO - ATTManager initialized
2025-12-07 12:34:38,830 - INFO - HearingAidConfig initialized
2025-12-07 12:34:38,830 - DEBUG - Initializing UI
2025-12-07 12:34:38,854 - DEBUG - UI initialized
2025-12-07 12:34:38,854 - INFO - Connecting to ATT in UI
2025-12-07 12:34:38,854 - INFO - Attempting to connect to ATT socket
2025-12-07 12:34:38,938 - INFO - Starting notification listener thread
2025-12-07 12:34:38,939 - INFO - Connected to ATT socket
2025-12-07 12:34:38,939 - DEBUG - Sending CCCD write request for handle HEARING_AID: 122b000100
2025-12-07 12:34:38,940 - DEBUG - Sent PDU: 122b000100
2025-12-07 12:34:38,989 - DEBUG - Received PDU: 13
2025-12-07 12:34:38,990 - DEBUG - Response received: 
2025-12-07 12:34:38,990 - DEBUG - CCCD write response received for handle HEARING_AID
2025-12-07 12:34:38,990 - INFO - Enabled notifications for handle HEARING_AID
2025-12-07 12:34:38,990 - DEBUG - Registered listener for handle 42
2025-12-07 12:34:38,991 - DEBUG - Sending read request for handle HEARING_AID: 0a2a00
2025-12-07 12:34:38,991 - DEBUG - Sent PDU: 0a2a00
2025-12-07 12:34:39,020 - DEBUG - Received PDU: 0b020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,021 - DEBUG - Response received: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,021 - DEBUG - Read response for handle HEARING_AID: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,022 - DEBUG - Parsing hearing aid settings from data: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,022 - INFO - Parsing hearing aid settings, starting read at offset 4, value: 00
2025-12-07 12:34:39,022 - DEBUG - HearingAidSettings created: amp=0.0, balance=0.0, tone=0.0, anr=0.0, conv=False
2025-12-07 12:34:39,022 - INFO - Parsed settings: amp=0.0, balance=0.0
2025-12-07 12:34:39,023 - DEBUG - Updating UI with settings
2025-12-07 12:34:39,023 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,023 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,024 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,025 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,026 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,026 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,026 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,027 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,027 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,027 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,027 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,028 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,028 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,028 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,029 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,029 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,029 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,030 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,030 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:39,030 - INFO - Initial settings loaded
2025-12-07 12:34:39,167 - INFO - Sending settings from UI
2025-12-07 12:34:39,167 - DEBUG - HearingAidSettings created: amp=0.0, balance=0.0, tone=0.0, anr=0.0, conv=False
2025-12-07 12:34:39,168 - INFO - Sending hearing aid settings
2025-12-07 12:34:39,168 - DEBUG - Sending read request for handle HEARING_AID: 0a2a00
2025-12-07 12:34:39,168 - DEBUG - Sent PDU: 0a2a00
2025-12-07 12:34:39,221 - DEBUG - Received PDU: 0b020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,222 - DEBUG - Response received: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,222 - DEBUG - Read response for handle HEARING_AID: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,222 - DEBUG - Sending write request for handle HEARING_AID: 122a00020064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,222 - DEBUG - Sent PDU: 122a00020064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:39,230 - DEBUG - Received PDU: 13
2025-12-07 12:34:39,230 - DEBUG - Response received: 
2025-12-07 12:34:39,230 - DEBUG - Write response received for handle HEARING_AID
2025-12-07 12:34:39,230 - INFO - Hearing aid settings sent
2025-12-07 12:34:46,565 - DEBUG - UI value changed, starting debounce
... more debounce lines ...
2025-12-07 12:34:47,876 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:47,977 - INFO - Sending settings from UI
2025-12-07 12:34:47,978 - DEBUG - HearingAidSettings created: amp=0.0, balance=0.0, tone=0.0, anr=0.94, conv=False
2025-12-07 12:34:47,978 - INFO - Sending hearing aid settings
2025-12-07 12:34:47,979 - DEBUG - Sending read request for handle HEARING_AID: 0a2a00
2025-12-07 12:34:47,979 - DEBUG - Sent PDU: 0a2a00
2025-12-07 12:34:48,017 - DEBUG - Received PDU: 0b020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:48,017 - DEBUG - Response received: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:48,018 - DEBUG - Read response for handle HEARING_AID: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:48,018 - DEBUG - Sending write request for handle HEARING_AID: 122a00020064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7a3703f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7a3703f0000003f
2025-12-07 12:34:48,018 - DEBUG - Sent PDU: 122a00020064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7a3703f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7a3703f0000003f
2025-12-07 12:34:48,039 - DEBUG - Received PDU: 13
2025-12-07 12:34:48,040 - DEBUG - Response received: 
2025-12-07 12:34:48,040 - DEBUG - Write response received for handle HEARING_AID
2025-12-07 12:34:48,040 - INFO - Hearing aid settings sent
2025-12-07 12:34:54,081 - DEBUG - UI value changed, starting debounce
... more debounce lines ...
2025-12-07 12:34:54,834 - DEBUG - UI value changed, starting debounce
2025-12-07 12:34:54,940 - INFO - Sending settings from UI
2025-12-07 12:34:54,941 - DEBUG - HearingAidSettings created: amp=0.69, balance=0.0, tone=0.0, anr=0.94, conv=False
2025-12-07 12:34:54,941 - INFO - Sending hearing aid settings
2025-12-07 12:34:54,942 - DEBUG - Sending read request for handle HEARING_AID: 0a2a00
2025-12-07 12:34:54,942 - DEBUG - Sent PDU: 0a2a00
2025-12-07 12:34:54,958 - DEBUG - Received PDU: 0b020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:54,959 - DEBUG - Response received: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:54,959 - DEBUG - Read response for handle HEARING_AID: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:34:54,959 - DEBUG - Sending write request for handle HEARING_AID: 122a00020064000000000000000000000000000000000000000000000000000000000000000000d7a3303f0000000000000000d7a3703f0000000000000000000000000000000000000000000000000000000000000000d7a3303f0000000000000000d7a3703f0000003f
2025-12-07 12:34:54,960 - DEBUG - Sent PDU: 122a00020064000000000000000000000000000000000000000000000000000000000000000000d7a3303f0000000000000000d7a3703f0000000000000000000000000000000000000000000000000000000000000000d7a3303f0000000000000000d7a3703f0000003f
2025-12-07 12:34:55,010 - DEBUG - Received PDU: 13
2025-12-07 12:34:55,010 - DEBUG - Response received: 
2025-12-07 12:34:55,010 - DEBUG - Write response received for handle HEARING_AID
2025-12-07 12:34:55,011 - INFO - Hearing aid settings sent
2025-12-07 12:35:05,217 - INFO - Closing app
2025-12-07 12:35:05,218 - INFO - Disconnecting from ATT socket
2025-12-07 12:35:05,218 - INFO - Closing socket
2025-12-07 12:35:05,218 - INFO - Stopping notification thread
2025-12-07 12:35:05,254 - INFO - Notification listener thread stopped, trying to reconnect
2025-12-07 12:35:05,254 - INFO - Disconnected from ATT socket

and the log from immediately reopening the tool

2025-12-07 12:35:08,526 - INFO - Starting app
2025-12-07 12:35:08,535 - INFO - ATTManager initialized
2025-12-07 12:35:08,536 - INFO - HearingAidConfig initialized
2025-12-07 12:35:08,536 - DEBUG - Initializing UI
2025-12-07 12:35:08,566 - DEBUG - UI initialized
2025-12-07 12:35:08,566 - INFO - Connecting to ATT in UI
2025-12-07 12:35:08,566 - INFO - Attempting to connect to ATT socket
2025-12-07 12:35:08,639 - INFO - Starting notification listener thread
2025-12-07 12:35:08,639 - INFO - Connected to ATT socket
2025-12-07 12:35:08,640 - DEBUG - Sending CCCD write request for handle HEARING_AID: 122b000100
2025-12-07 12:35:08,640 - DEBUG - Sent PDU: 122b000100
2025-12-07 12:35:08,684 - DEBUG - Received PDU: 13
2025-12-07 12:35:08,685 - DEBUG - Response received: 
2025-12-07 12:35:08,686 - DEBUG - CCCD write response received for handle HEARING_AID
2025-12-07 12:35:08,686 - INFO - Enabled notifications for handle HEARING_AID
2025-12-07 12:35:08,686 - DEBUG - Registered listener for handle 42
2025-12-07 12:35:08,687 - DEBUG - Sending read request for handle HEARING_AID: 0a2a00
2025-12-07 12:35:08,687 - DEBUG - Sent PDU: 0a2a00
2025-12-07 12:35:08,695 - DEBUG - Received PDU: 0b020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,695 - DEBUG - Response received: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,695 - DEBUG - Read response for handle HEARING_AID: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,696 - DEBUG - Parsing hearing aid settings from data: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,696 - INFO - Parsing hearing aid settings, starting read at offset 4, value: 00
2025-12-07 12:35:08,696 - DEBUG - HearingAidSettings created: amp=0.0, balance=0.0, tone=0.0, anr=0.0, conv=False
2025-12-07 12:35:08,696 - INFO - Parsed settings: amp=0.0, balance=0.0
2025-12-07 12:35:08,697 - DEBUG - Updating UI with settings
2025-12-07 12:35:08,697 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,697 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,697 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,699 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,699 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,699 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,700 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,700 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,701 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,701 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,701 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,702 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,702 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,702 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,702 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,703 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,703 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,703 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,704 - DEBUG - UI value changed, starting debounce
2025-12-07 12:35:08,704 - INFO - Initial settings loaded
2025-12-07 12:35:08,805 - INFO - Sending settings from UI
2025-12-07 12:35:08,805 - DEBUG - HearingAidSettings created: amp=0.0, balance=0.0, tone=0.0, anr=0.0, conv=False
2025-12-07 12:35:08,805 - INFO - Sending hearing aid settings
2025-12-07 12:35:08,805 - DEBUG - Sending read request for handle HEARING_AID: 0a2a00
2025-12-07 12:35:08,805 - DEBUG - Sent PDU: 0a2a00
2025-12-07 12:35:08,813 - DEBUG - Received PDU: 0b020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,813 - DEBUG - Response received: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,813 - DEBUG - Read response for handle HEARING_AID: 020060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,813 - DEBUG - Sending write request for handle HEARING_AID: 122a00020064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,813 - DEBUG - Sent PDU: 122a00020064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f
2025-12-07 12:35:08,843 - DEBUG - Received PDU: 13
2025-12-07 12:35:08,843 - DEBUG - Response received: 
2025-12-07 12:35:08,843 - DEBUG - Write response received for handle HEARING_AID
2025-12-07 12:35:08,843 - INFO - Hearing aid settings sent
2025-12-07 12:35:14,996 - INFO - Closing app
2025-12-07 12:35:14,996 - INFO - Disconnecting from ATT socket
2025-12-07 12:35:14,997 - INFO - Closing socket
2025-12-07 12:35:14,997 - INFO - Stopping notification thread
2025-12-07 12:35:15,067 - INFO - Notification listener thread stopped, trying to reconnect
2025-12-07 12:35:15,068 - INFO - Disconnected from ATT socket

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions