shermp / Pico-ASHA

ASHA on a Pico
BSD 3-Clause "New" or "Revised" License
29 stars 1 forks source link

Testing Oticon devices #17

Open ian123net opened 1 month ago

ian123net commented 1 month ago

I might be missing something but these are my results with Oticon More 1s (which should work?!) and Oticon Intent1s. Both on build 140:

Oticon More 1s not detected:

[INFO : 257] BT ASHA starting. [INFO : 257] L2CAP Init. [INFO : 257] SM Init. [INFO : 257] GATT Client Init. [INFO : 257] HCI power on. [INFO : 1174] BTstack up and running on 28:CD:C1:0C:FE:07 [INFO : 1174] Start scanning.

Oticon Intent 1s connection fails:

[INFO : 256] BT ASHA starting. [INFO : 256] L2CAP Init. [INFO : 256] SM Init. [INFO : 256] GATT Client Init. [INFO : 256] HCI power on. [INFO : 1174] BTstack up and running on 28:CD:C1:0C:FE:07 [INFO : 1174] Start scanning. [INFO : 33186] Identity resolving succeeded [INFO : 33186] Connecting to address 50:C7:1B:76:C9:79 [INFO : 33279] Device connected. Attempt pairing [INFO : 33281] Reencryption started [INFO : 33281] HCI: Num Connnections changed to 1 [INFO : 33461] Reencryption complete [INFO : 33461] HCI: HCI_EVENT_ENCRYPTION_CHANGE [INFO : 33501] DL set to: RX Octets: 251, RX Time: 2120 us, TX Octets: 251, TX Time: 2120 us [INFO : 33501] Device paired. Discovering ASHA service [INFO : 33641] GAP service found [INFO : 33641] DIS service found [INFO : 33801] ASHA service found [INFO : 33884] Unknown: Discovering characteristics for ASHA service [INFO : 33922] Unknown: Got ROP Characteristic [INFO : 33922] Unknown: Got ACP Characteristic [INFO : 33922] Unknown: Got AUS Characteristic [INFO : 33922] Unknown: Got VOL Characteristic [INFO : 33922] Unknown: Got PSM Characteristic [INFO : 33922] Unknown: Discover ASHA Chars success [ERROR : 33961] Unknown: Read ROP failed with error code: 0x05 [ERROR : 34021] Unknown: Read ROP failed with error code: 0x05 [ERROR : 34061] Unknown: Read ROP failed with error code: 0x05

etc etc.

shermp commented 1 month ago

Hi @ian123net

Your Oticon More should work (I have a set of More 2's myself). Make sure to put the hearing aids in pairing mode (turn them off then on) then plug in the Pico to see if that helps.

With regards to the Intent, it looks like they may have changed something regarding authentication? The error is ATT_ERROR_INSUFFICIENT_AUTHENTICATION.

It looks like you are using the gatt-refactor-3 branch, is this correct?

For the Intent's could you please do the following:

  1. Install the UF2 from this action when it completes and is available
  2. Once connected to serial, enter {"cmd": "clear_dev_db"} to clear the pairing database
  3. Switch of both (if you have two) hearing aids
  4. Send the command {"cmd": "hci_dump": true}. The pico should reboot and start dumping a lot of stuff to serial. If there's no output after reconnecting, pressing enter at serial should get it displaying stuff
  5. Turn ONE hearing aid on
  6. After the hearing aid has turned on, wait for approx 30 seconds. Stop monitoring or disconnect from serial and copy the output to a text file and attach it here
  7. Reconnect to serial and send {"cmd": "hci_dump": false}. The pico will reboot again into normal mode.

This should hopefully give me the information needed to get it working.

ian123net commented 1 month ago

Thanks - the clear database command actually made the Mores work! I must have kept trying the Intents first and blocking the pairing of a new device.

In fact the Intents now also work, in stereo, after following the instructions and using the 141 build.

For the Intents, I am not sure whether I entered the hci_dump command correctly or not - it didn't obviously reboot. I tried both {"cmd": "hci_dump": true} and {"cmd": "hci_dump", "value": true}. Sound played through the single hearing aid and the following text was returned:

[INFO : 1208492] HA discovered with addr 6A:3C:43:89:DA:83. Connecting... [INFO : 1208521] Device connected. Attempt pairing [INFO : 1208522] Pairing started [INFO : 1208522] HCI: Num Connnections changed to 1 [INFO : 1208574] Just Works requested [INFO : 1213013] HCI: HCI_EVENT_ENCRYPTION_CHANGE [INFO : 1213043] Pairing complete, success [INFO : 1213308] DL set to: RX Octets: 251, RX Time: 2120 us, TX Octets: 167, TX Time: 1064 us [INFO : 1213308] Device paired. Discovering ASHA service [INFO : 1213374] GAP service found [INFO : 1213374] DIS service found [INFO : 1213534] ASHA service found [INFO : 1213615] Unknown: Discovering characteristics for ASHA service [INFO : 1213656] Unknown: Got ROP Characteristic [INFO : 1213656] Unknown: Got ACP Characteristic [INFO : 1213657] Unknown: Got AUS Characteristic [INFO : 1213657] Unknown: Got VOL Characteristic [INFO : 1213657] Unknown: Got PSM Characteristic [INFO : 1213657] Unknown: Discover ASHA Chars success [INFO : 1213694] Right: Read ROP success [INFO : 1213734] Right: PSM: 128 [INFO : 1213734] ROP - Side: R, Mode: B, M. ID: 0107, Delay: 89, 16KHz: Y, 24KHz: N [INFO : 1213734] Right: 128 [INFO : 1213734] Right: Read PSM success [INFO : 1213736] Right: Discovering characteristics for GAP service [INFO : 1213774] Right: Got Device Name Characteristic [INFO : 1213774] Right: Discover GAP Chars success [INFO : 1213775] Right: Discovering characteristics for DIS service [INFO : 1213815] Right: Got Model Number Characteristic [INFO : 1213816] Right: Got Manufacture Name Characteristic [INFO : 1213816] Right: Got FW Version Characteristic [INFO : 1213816] Right: Discover DIS Chars success [INFO : 1213855] Right: Read Device Name success [INFO : 1213894] Right: Read Manufacture Name success [INFO : 1213934] Right: Read Model Num success [INFO : 1213974] Right: HA: SBO Hearing Intent 1 - FW 1.1.0 [INFO : 1213974] Right: Read FW Version success [INFO : 1213975] Right: Connecting to L2CAP [INFO : 1214014] Right: L2CAP CoC channel created [INFO : 1214134] Right: Subscribe to ASP success [INFO : 1226695] Right: ASP Start Ok

shermp commented 1 month ago

Yay, great to see they both work!

I hadn't anticipated people testing with different hearing aids, that does indeed cause issues, something to think about improving for the future.

The log you posted is just the normal log. For some reason enabling the HCI dump didn't work. Oh well, it seems it wasn't required anyway :)

Pico-ASHA should just be considered a stopgap solution for your Intents. I would personally recommend switching to LE Audio when you are able to, either by use of an adapter, or a new enough PC.