Plutoberth / SonyHeadphonesClient

A {Windows, macOS, Linux} client recreating the functionality of the Sony Headphones app
MIT License
1.07k stars 84 forks source link

WF-1000XM4 - Couldn't connect (10049) #65

Open 1oh1 opened 2 years ago

1oh1 commented 2 years ago

Headset: WF-1000XM4 Client version: v1.2 OS: Windows 11 Description: Can't connect Errors: Couldn't connect: 10049

Any chance TWS earbuds like the WF-1000XM4 can be supported?

1oh1 commented 2 years ago

I must mention that the touch controls on the earbuds can already be used to turn ANC on/off but ambient sound levels can't be changed

Also, if the function of the touch controls were changed to control volume instead in the Sony Headphones app, then ANC can't be turned on/off with touch controls.

Kjelstad37 commented 2 years ago

Headset: WF-1000XM4 Client version: v1.3 OS: Windows 10 Description: Can't connect Errors: Couldn't connect: 10049 image

drfeelgoodesq commented 2 years ago

Screenshot_1

Exactly the same issue here, would LOVE this to work on the XM-4's I just bought if possible!

pseudobacon commented 2 years ago

image

Same :(

TheFatTurtle commented 2 years ago

The issue here seems to be that the device uses a different ServiceClassId. Changing SONY_UUID to "81c2e72a-0591-443e-a1ff-05f988593351" makes the application connect correctly, however you still can't change any values

1oh1 commented 2 years ago

Has anyone figured out how the 'Speak to Chat' setting is toggled? That's the most annoying feature that you can't turn off when using the earbuds with a PC and requires connection to the phone to toggle

I wonder if Windows Subsystem for Android can be used to get the Sony Headphones app running on Windows and change the settings on the earbuds? I'll try it out sometime.

1oh1 commented 2 years ago

If this helps someone, I was able to capture Bluetooth logs from my Android phone (Poco F1) while it was connected to WF-1000XM4. The btsnoop_hci.log file can be opened in Wireshark.

Bluetooth capture: btsnoop_hci.log

I only toggled the 'Speak to chat' feature on and off several times. Didn't touch any other settings. I can capture more logs later on while interacting with all the other toggles if that helps.

1oh1 commented 2 years ago

I captured some more logs, but this time I played with almost every feature available in the Sony Headphones app while recording the screen so hopefully that helps match a particular action in the recording with what's observed in the Bluetooth traffic capture.

The screen capture was started at 2022-07-17-21-38-46-724 (India time UTC+05:30)

Bluetooth capture: btsnoop_hci.log

Screen capture: Screenrecorder-2022-07-17-21-38-46-724.mp4

TheFatTurtle commented 2 years ago

After looking at more captures I found multiple Service Ids that all allow a connection. inline constexpr const char * UUIDS[] = { "81c2e72a-0591-443e-a1ff-05f988593351", "764cbf0d-bbcb-438f-a8bb-6b92759d6053", "f8d1fbe4-7966-4334-8024-ff96c9330e15", "956c7b26-d49a-4ba8-b03f-b17d393cb6e2", "df21fe2c-2515-4fdb-8886-f12c4d67927c", "931c7e8a-540f-4686-b798-e8df0a2ad9f7", };

UUID 0 causes headphone chrash on connect. Music stops fails to send data.
UUID 1 works, no discconnect UUID 2 gets stuck sending data. UUID 3 works no dissconnect UUID 4 gets stuck while sending, stuck while disconnect
UUID 5 gets stuck while sending, stuck while disconnect

crab2313 commented 2 years ago

After looking at more captures I found multiple Service Ids that all allow a connection. inline constexpr const char * UUIDS[] = { "81c2e72a-0591-443e-a1ff-05f988593351", "764cbf0d-bbcb-438f-a8bb-6b92759d6053", "f8d1fbe4-7966-4334-8024-ff96c9330e15", "956c7b26-d49a-4ba8-b03f-b17d393cb6e2", "df21fe2c-2515-4fdb-8886-f12c4d67927c", "931c7e8a-540f-4686-b798-e8df0a2ad9f7", };

UUID 0 causes headphone chrash on connect. Music stops fails to send data. UUID 1 works, no discconnect UUID 2 gets stuck sending data. UUID 3 works no dissconnect UUID 4 gets stuck while sending, stuck while disconnect UUID 5 gets stuck while sending, stuck while disconnect

The right UUID is "956c7b26-d49a-4ba8-b03f-b17d393cb6e2". The wire format is similar to WF1000-XM3,but the fields have different meaning. Thanks to snoop log from @1oh1, I found the packet to turn on/off speak to chat feature and verified on my WF1000XM4.

3e0c0100000004f80200010c3c -----------> on 3e0c0000000004f80201010c3c ------------> off

This is a filtered version of btsnoop_hci.log from @1oh1 data.csv

HiddenWalrus commented 2 years ago

Would love to see this implemented as well! Any way I could help out with providing logs, etc.?

m10x commented 1 year ago

Gadgetbridge just implemented support for WF-1000XM4 with all its features supported (the commit). Based on logs and information from this github issue. Maybe this is helpful.

tasskakajoe2326 commented 1 year ago

Still not working for me as well.

krauthaus commented 6 months ago

Hey, i got a pair of wh-1000 MX5. I get the same error. Is there any more debug data I can collect and provide for you to make them work? I relly like the project! :D

chrislikescisco commented 5 months ago

I just had the same error, has this been fixed as of yet? image