Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back sysfs pairing #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dlundqvist
Copy link

For some reason, at least I don't know why, pairing button does not work with some adapters on Linux. Bring back the original support for enabling pairing via sysfs with a fix to bring the adapter out of power save/suspended mode before enabling the pairing.

If device is suspended, enabling pairing will fail. Make sure device
is resumed before trying.
@GuillaumeSmaha
Copy link

GuillaumeSmaha commented Jun 23, 2024

I confirm the PR solved the pairing for my wireless key on Ubuntu 24.04:

[70485.441650] usb 1-4: new high-speed USB device number 18 using xhci_hcd
[70485.570190] usb 1-4: New USB device found, idVendor=045e, idProduct=02e6, bcdDevice= 1.00
[70485.570195] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[70485.570196] usb 1-4: Product: XBOX ACC
[70485.570198] usb 1-4: Manufacturer: Microsoft Inc.
[70485.570199] usb 1-4: SerialNumber: 520636
[70485.688908] usb 1-4: reset high-speed USB device number 18 using xhci_hcd
[70485.817215] xone-dongle 1-4:1.0: xone_mt76_send_firmware: build=201703281033____
[70485.960968] xone-dongle 1-4:1.0: xone_mt76_init_radio: id=0x7612
[70485.966661] xone-dongle 1-4:1.0: xone_mt76_init_address: address=62:45:b4:ec:02:ce
[70485.967966] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=1, power=33
[70485.968358] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=6, power=35
[70485.969181] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=11, power=35
[70485.969543] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=36, power=42
[70485.969926] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=40, power=42
[70485.970328] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=44, power=41
[70485.970686] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=48, power=41
[70485.971043] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=149, power=36
[70485.971417] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=153, power=36
[70485.971864] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=157, power=36
[70485.972297] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=161, power=36
[70485.972757] xone-dongle 1-4:1.0: xone_mt76_evaluate_channels: channel=165, power=36
[70485.972825] xone-dongle 1-4:1.0: xone_mt76_init_channels: channel=165
[70486.929155] xone-dongle 1-4:1.0: xone_dongle_toggle_pairing: enabled=1
[70490.004645] xone-gip gip0: gip_create_adapter: registered
[70490.004746] xone-dongle 1-4:1.0: xone_dongle_add_client: wcid=1, address=7e:ed:89:17:5e:a8
[70490.525432] xone-gip gip0: gip_get_client: initialized client 0
[70490.525436] xone-gip gip0: gip_handle_pkt_announce: address=7e:ed:89:17:5e:a8, vendor=0x045e, product=0x02dd
[70490.525438] xone-gip gip0: gip_handle_pkt_announce: firmware=2.3.2385.0, hardware=258.1.1.1
[70490.541507] xone-gip gip0: gip_init_chunk_buffer: command=0x04, length=0x00d6
[70490.541516] xone-gip gip0: gip_process_pkt_chunked: offset=0x0000, length=0x003a
[70490.557583] xone-gip gip0: gip_process_pkt_chunked: offset=0x003a, length=0x003a
[70490.565633] xone-gip gip0: gip_process_pkt_chunked: offset=0x0074, length=0x003a
[70490.573691] xone-gip gip0: gip_process_pkt_chunked: offset=0x00ae, length=0x0028
[70490.589758] xone-gip gip0: gip_process_pkt_chunked: offset=0x00d6, length=0x0000
[70490.589762] xone-gip gip0: gip_parse_client_commands: command=0x20, length=0x0e, options=0x10
[70490.589764] xone-gip gip0: gip_parse_client_commands: command=0x09, length=0x3c, options=0x08
[70490.589765] xone-gip gip0: gip_parse_firmware_versions: version=1.0
[70490.589767] xone-gip gip0: gip_parse_firmware_versions: version=1.1
[70490.589768] xone-gip gip0: gip_parse_firmware_versions: version=1.2
[70490.589769] xone-gip gip0: gip_parse_firmware_versions: version=1.3
[70490.589770] xone-gip gip0: gip_parse_firmware_versions: version=2.0
[70490.589771] xone-gip gip0: gip_parse_firmware_versions: version=2.1
[70490.589772] xone-gip gip0: gip_parse_firmware_versions: version=2.2
[70490.589773] xone-gip gip0: gip_parse_firmware_versions: version=2.3
[70490.589775] xone-gip gip0: gip_parse_capabilities: out=01-02-03-04-06-07-0c-1e
[70490.589776] xone-gip gip0: gip_parse_capabilities: in=01-04-05-06-0a-0c-1e
[70490.589778] xone-gip gip0: gip_parse_classes: class=Windows.Xbox.Input.Gamepad
[70490.589779] xone-gip gip0: gip_parse_interfaces: guid=56ff7697-fd9b-8145-ad45-b645bba526d6
[70490.589781] xone-gip gip0: gip_parse_interfaces: guid=2c402e08-df07-e145-a5ab-a3127af197b5
[70490.589782] xone-gip gip0: gip_parse_interfaces: guid=e71ff3b8-8673-e940-a9f8-2f21263acfb7
[70490.589946] input: Microsoft Xbox Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/gip0/gip0.0/input/input56
[70490.590022] xone-gip-gamepad gip0.0: gip_register_client: registered
[70490.596474] xone-gip-gamepad gip0.0: gip_led_mode_store: mode=2
[70490.596504] xone-gip-gamepad gip0.0: gip_led_brightness_set: brightness=5
[70490.646180] xone-gip gip0: gip_process_pkt_chunked: offset=0x0006, length=0x0000
[70490.670537] xone-gip gip0: gip_init_chunk_buffer: command=0x06, length=0x005a
[70490.670547] xone-gip gip0: gip_process_pkt_chunked: offset=0x0000, length=0x003a
[70490.686592] xone-gip gip0: gip_process_pkt_chunked: offset=0x003a, length=0x0020
[70490.702659] xone-gip gip0: gip_process_pkt_chunked: offset=0x005a, length=0x0000
[70490.807310] xone-gip gip0: gip_init_chunk_buffer: command=0x06, length=0x0339
[70490.807319] xone-gip gip0: gip_process_pkt_chunked: offset=0x0000, length=0x003a
[70490.823383] xone-gip gip0: gip_process_pkt_chunked: offset=0x003a, length=0x003a
[70490.831435] xone-gip gip0: gip_process_pkt_chunked: offset=0x0074, length=0x003a
[70490.839487] xone-gip gip0: gip_process_pkt_chunked: offset=0x00ae, length=0x003a
[70490.847542] xone-gip gip0: gip_process_pkt_chunked: offset=0x00e8, length=0x0035
[70490.879634] xone-gip gip0: gip_process_pkt_chunked: offset=0x011d, length=0x003a
[70490.887684] xone-gip gip0: gip_process_pkt_chunked: offset=0x0157, length=0x003a
[70490.895732] xone-gip gip0: gip_process_pkt_chunked: offset=0x0191, length=0x003a
[70490.903786] xone-gip gip0: gip_process_pkt_chunked: offset=0x01cb, length=0x003a
[70490.911838] xone-gip gip0: gip_process_pkt_chunked: offset=0x0205, length=0x0034
[70490.943933] xone-gip gip0: gip_process_pkt_chunked: offset=0x0239, length=0x003a
[70490.951983] xone-gip gip0: gip_process_pkt_chunked: offset=0x0273, length=0x003a
[70490.960073] xone-gip gip0: gip_process_pkt_chunked: offset=0x02ad, length=0x003a
[70490.968096] xone-gip gip0: gip_process_pkt_chunked: offset=0x02e7, length=0x003a
[70490.976136] xone-gip gip0: gip_process_pkt_chunked: offset=0x0321, length=0x0018
[70490.992180] xone-gip gip0: gip_process_pkt_chunked: offset=0x0339, length=0x0000
[70490.992323] xone-gip gip0: gip_init_chunk_buffer: command=0x06, length=0x0112
[70491.032659] xone-gip gip0: gip_handle_pkt_acknowledge: all chunks sent
[70491.714336] xone-gip gip0: gip_process_pkt_chunked: offset=0x0006, length=0x0000
[70491.867207] xone-gip gip0: gip_process_pkt_chunked: offset=0x0006, length=0x0000
[70492.019861] xone-gip gip0: gip_init_chunk_buffer: command=0x06, length=0x004a
[70492.019872] xone-gip gip0: gip_process_pkt_chunked: offset=0x0000, length=0x003a
[70492.035946] xone-gip gip0: gip_process_pkt_chunked: offset=0x003a, length=0x0010
[70492.052028] xone-gip gip0: gip_process_pkt_chunked: offset=0x004a, length=0x0000
[70492.052047] xone-gip-gamepad gip0.0: gip_auth_complete_handshake: key=xxxx
[70492.204462] xone-dongle 1-4:1.0: xone_dongle_enable_client_encryption: wcid=1, address=7e:ed:89:17:5e:a8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants