Error while connecting to Bluetooth game controller on Linux: "Failed to connect: org.bluez.Error.Failed"

خرید بک لینک

I am trying to connect to a Bluetooth game controller (HID) from a Debian Linux machine. The game controller is only officially supported on Windows, but I am trying to connect from Linux to see if it supports a standard profile or whether I would need to read from it manually. When I attempt to connect via bluetoothctl, pairing works fine; but the connection fails consistently:

$ bluetoothctl
[NEW] Device C8:3F:26:2D:D7:56 Xbox Wireless Controller
[bluetooth]# pair C8:3F:26:2D:D7:56
Attempting to pair with C8:3F:26:2D:D7:56
[CHG] Device C8:3F:26:2D:D7:56 Connected: yes
[CHG] Device C8:3F:26:2D:D7:56 Paired: yes
Pairing successful
[CHG] Device C8:3F:26:2D:D7:56 Connected: no
[bluetooth]# connect C8:3F:26:2D:D7:56
Attempting to connect to C8:3F:26:2D:D7:56
[CHG] Device C8:3F:26:2D:D7:56 Connected: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device C8:3F:26:2D:D7:56 Connected: no
[CHG] Device C8:3F:26:2D:D7:56 RSSI: -43

While running those commands, I can get a log of the communications through hcidump:

HCI sniffer - Bluetooth packet analyzer ver 5.23
device: hci0 snap_len: 1500 filter: 0xffffffff
> HCI Event: Command Status (0x0f) plen 4
    Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Extended Inquiry Result (0x2f) plen 255
    bdaddr C8:3F:26:2D:D7:56 mode 1 clkoffset 0x1a00 class 0x000508 rssi -54
    Complete local name: 'Xbox Wireless Controller'
    Complete service classes: 0x1124
> HCI Event: Inquiry Complete (0x01) plen 1
    status 0x00
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Command Status (0x0f) plen 4
    Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 1 bdaddr C8:3F:26:2D:D7:56 type ACL encrypt 0x00
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 1
    Features: 0xbf 0x3e 0x8d 0xfe 0xdb 0xfd 0x7b 0x87
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 1 page 1 max 3
    Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr C8:3F:26:2D:D7:56 name 'Xbox Wireless Controller'
> HCI Event: Extended Inquiry Result (0x2f) plen 255
    bdaddr C8:3F:26:2D:D7:56 mode 1 clkoffset 0x1a00 class 0x000508 rssi -47
    Complete local name: 'Xbox Wireless Controller'
    Complete service classes: 0x1124
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 1 reason 0x16
    Reason: Connection Terminated by Local Host

The interesting part of that log (at least to me) is that it responds with the correct class and other expected metadata, but then fails with Connection Terminated by Local Host.

At one point, running info on the device even gave me the right UUID, but I can't replicate this any more:

UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)

What am I doing wrong to connect to this device? Do I need to install any extra software to handle the connection, or maybe is there another way I can get more info on what is happening?

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 356 تاريخ: شنبه 16 مرداد 1395 ساعت: 5:53

صفحه بندی