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

Lakka and Stadia Controller (Bluetooth Mode) do not work together #1824

Open
mtoensing opened this issue Jan 20, 2023 · 31 comments
Open

Lakka and Stadia Controller (Bluetooth Mode) do not work together #1824

mtoensing opened this issue Jan 20, 2023 · 31 comments

Comments

@mtoensing
Copy link

Please make Stadia Controllers compatible with Lakka.

  • Which version of Lakka are you using?
  • Latest release version
  • What system hardware are you using?
  • RP4
  • What did you do?
  • Try to pair Stadia Controller and use it in Lakka
  • What did you expect to happen?
  • Automatic configuration of the Stadia Controller
  • What happened instead?
  • Nothing. Did not work. Xbox 360 controllers with USB dongle work fine
@mtoensing mtoensing changed the title Lakka and Stadia Controller (Bluetooth Mode) does not work together Lakka and Stadia Controller (Bluetooth Mode) do not work together Jan 20, 2023
@Ntemis
Copy link
Collaborator

Ntemis commented Jan 20, 2023

I dont have a stadia controller unfortunately
You can send the config here and will be added to the next lakka version
https://github.com/libretro/retroarch-joypad-autoconfig

@mtoensing
Copy link
Author

Hi, what do you mean mit send? I can send you controller if you like.

@Ntemis
Copy link
Collaborator

Ntemis commented Jan 20, 2023

https://discord.gg/libretro-184109094070779904
come to #lakkatv and pm me same nick as here

@gouchi
Copy link
Member

gouchi commented Feb 4, 2023

It seems you need to update your controller to use Bluetooth ?

Source 1 2

@mtoensing
Copy link
Author

mtoensing commented Feb 4, 2023

@gouchi
My Stadia controller is updated to use Bluetooth and works wireless on macOS and Steam Deck without any configuration. I will send @Ntemis a controller if I get hold of enough controllers to have a spare one. Since he can't just buy one where he lives, this is still on my agenda since donating money is not accepted here.

@ToKe79
Copy link
Collaborator

ToKe79 commented Feb 4, 2023

@mtoensing were you able to pair the controller via bluetooth? Maybe pairing via RetroArch UI will not work, so please try using command line.
Guide - SSH access
Guide - bluetoothctl

After you pair the controller, you might need to manually map controls to actions.

@mtoensing
Copy link
Author

I know I could do that. But since there are now millions of Stadia controllers in the wild I would appreciate that this works automatically in Lakka.

@ToKe79
Copy link
Collaborator

ToKe79 commented Feb 4, 2023

That is the reason why I kindly ask you to pair it first - to know if there is support in the linux kernel already (meaning only the joypad mapping is necessary) or a kernel driver/module needs to be added.

@marevalo
Copy link

marevalo commented Feb 7, 2023

I got it to connect correctly:

[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:6A:B6:16 Discovering: yes
[NEW] Device 54:F8:2A:52:B7:33 54-F8-2A-52-B7-33
[NEW] Device 4E:78:8D:7C:DF:11 4E-78-8D-7C-DF-11
[NEW] Device 00:C3:F4:E8:28:5D 00-C3-F4-E8-28-5D
[NEW] Device F0:EB:0F:53:A5:4C LH719
[NEW] Device 60:35:73:E6:F0:2E MiTV-AESP0 5151
[NEW] Device E4:CF:33:D9:C6:94 StadiaHFW8-c694
[CHG] Device 00:C3:F4:E8:28:5D ManufacturerData Key: 0x0075
[CHG] Device 00:C3:F4:E8:28:5D ManufacturerData Value:
  42 04 01 20 76 19 0f 00 00 01 32 00 00 00 00 00  B.. v.....2.....
  00 00 00 00 00 00 00 00                          ........        
[bluetooth]# connect E4:CF:33:D9:C6:94
Attempting to connect to E4:CF:33:D9:C6:94
[CHG] Device E4:CF:33:D9:C6:94 Connected: yes
Connection successful
[NEW] Primary Service (Handle 0x4b20)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0001
	00001801-0000-1000-8000-00805f9b34fb
	Generic Attribute Profile
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0001/char0002
	00002a05-0000-1000-8000-00805f9b34fb
	Service Changed
[NEW] Descriptor (Handle 0x001c)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0001/char0002/desc0004
	00002902-0000-1000-8000-00805f9b34fb
	Client Characteristic Configuration
[NEW] Primary Service (Handle 0x60a8)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0028
	0000180a-0000-1000-8000-00805f9b34fb
	Device Information
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0028/char0029
	00002a29-0000-1000-8000-00805f9b34fb
	Manufacturer Name String
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0028/char002b
	00002a24-0000-1000-8000-00805f9b34fb
	Model Number String
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0028/char002d
	00002a26-0000-1000-8000-00805f9b34fb
	Firmware Revision String
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0028/char002f
	00002a28-0000-1000-8000-00805f9b34fb
	Software Revision String
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0028/char0031
	00002a50-0000-1000-8000-00805f9b34fb
	PnP ID
[NEW] Primary Service (Handle 0x80f0)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0038
	0000180f-0000-1000-8000-00805f9b34fb
	Battery Service
[NEW] Characteristic (Handle 0x0015)
	/org/bluez/hci0/dev_E4_CF_33_D9_C6_94/service0038/char0039
	00002a19-0000-1000-8000-00805f9b34fb
	Battery Level
[CHG] Device E4:CF:33:D9:C6:94 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device E4:CF:33:D9:C6:94 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device E4:CF:33:D9:C6:94 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device E4:CF:33:D9:C6:94 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device E4:CF:33:D9:C6:94 UUIDs: 00001812-0000-1000-8000-00805f9b34fb
[CHG] Device E4:CF:33:D9:C6:94 ServicesResolved: yes
[CHG] Device E4:CF:33:D9:C6:94 WakeAllowed: yes
[CHG] Device E4:CF:33:D9:C6:94 Modalias: usb:v18D1p9400d0100

After pairing this is the info I get:

Device E4:CF:33:D9:C6:94 (public)
	Name: StadiaHFW8-c694
	Alias: StadiaHFW8-c694
	Appearance: 0x03c4
	Icon: input-gaming
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	WakeAllowed: yes
	LegacyPairing: no
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
	UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
	UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v18D1p9400d0100
	RSSI: -40
	TxPower: -8

After that the controller sometimes appears on the bluetooth screen of RetroArch with a generic bluetooth icon, but it is not available on the input mapping screen options.

I'm running lakka stable (4.3) on raspberry pi 3.

On my Debian Stable box the controller is connected and setup with the graphical standard process without problem (well, mostly, some random disconnections).

@ToKe79
Copy link
Collaborator

ToKe79 commented Feb 7, 2023

Thanks, if the device is recognized correctly as gamepad/joystick, you should be able to test the inputs via command line, e.g. jstest /dev/input/js0. If not, you can still try to map actions to buttons/sticks in RetroArch (use other gamepad / keyboard to navigate the menus).

Now that it is paired with your RPi, it should connect after reboot without the need of the command line. Do you get a brief message that a gamepad was detected in RetroArch? For example something in the meaning that no valid configuration was found? It is possible that it is not recognized as gamepad, but other type HID device (keyboard/mouse/...) - in such case there will be no such message. Also can you paste kernel log (dmesg) with the messages when the gamepad gets connected?

@marevalo
Copy link

marevalo commented Feb 7, 2023

Hello.

I don't have any /dev/input/js0 (custom udev rules needed?). And so I cannot map actions as there is no device index available.

Yes, it reconnects (but with Paired: no); and no there is no message at the start or when switching off and on again the controller.

dmesg is rather cryptic:

[   19.636977] Bluetooth: Core ver 2.22
[   19.637084] NET: Registered protocol family 31
[   19.637091] Bluetooth: HCI device and connection manager initialized
[   19.637114] Bluetooth: HCI socket layer initialized
[   19.637126] Bluetooth: L2CAP socket layer initialized
[   19.637146] Bluetooth: SCO socket layer initialized
[   19.665205] Bluetooth: HCI UART driver ver 2.3
[   19.665220] Bluetooth: HCI UART protocol H4 registered
[   19.665301] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   19.665502] Bluetooth: HCI UART protocol Broadcom registered
[   20.548129] cryptd: max_cpu_qlen set to 1000
[   21.039794] Bluetooth: hci0: security requested but not available
[   33.758452] cam-dummy-reg: disabling
[   36.705382] Bluetooth: hci0: security requested but not available
[   70.491694] Bluetooth: hci0: security requested but not available
[  104.491927] Bluetooth: hci0: security requested but not available
[  110.965676] Bluetooth: hci0: security requested but not available
[  138.495823] Bluetooth: hci0: security requested but not available

BTMon output at controller switch on and connect:

Lakka:/var/log # btmon
Bluetooth monitor ver 5.56
= Note: Linux version 5.10.110 (armv7l)                                                                           0.368863
= Note: Bluetooth subsystem version 2.22                                                                          0.368877
= New Index: B8:27:EB:6A:B6:16 (Primary,UART,hci0)                                                         [hci0] 0.368881
= Open Index: B8:27:EB:6A:B6:16                                                                            [hci0] 0.368884
= Index Info: B8:27:EB:6A:B6:16 (Broadcom Corporation)                                                     [hci0] 0.368891
@ MGMT Open: bluetoothd (privileged) version 1.18                                                        {0x0001} 0.368896
> HCI Event: LE Meta Event (0x3e) plen 12                                                              #1 [hci0] 10.408903
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Connectable undirected - ADV_IND (0x00)
        Address type: Public (0x00)
        Address: E4:CF:33:D9:C6:94 (OUI E4-CF-33)
        Data length: 0
        RSSI: -41 dBm (0xd7)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2                                                 #2 [hci0] 10.409047
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                            #3 [hci0] 10.410990
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25                                              #4 [hci0] 10.411093
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Public (0x00)
        Peer address: E4:CF:33:D9:C6:94 (OUI E4-CF-33)
        Own address type: Public (0x00)
        Min connection interval: 7.50 msec (0x0006)
        Max connection interval: 10.00 msec (0x0008)
        Connection latency: 0 (0x0000)
        Supervision timeout: 4000 msec (0x0190)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                                                              #5 [hci0] 10.412004
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                                                              #6 [hci0] 10.439165
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 64
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: E4:CF:33:D9:C6:94 (OUI E4-CF-33)
        Connection interval: 7.50 msec (0x0006)
        Connection latency: 0 (0x0000)
        Supervision timeout: 4000 msec (0x0190)
        Master clock accuracy: 0x00
@ MGMT Event: Device Connected (0x000b) plen 13                                                  {0x0001} [hci0] 10.439320
        LE Address: E4:CF:33:D9:C6:94 (OUI E4-CF-33)
        Flags: 0x00000000
        Data length: 0
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2                                       #7 [hci0] 10.439625
        Handle: 64
> HCI Event: Command Status (0x0f) plen 4                                                              #8 [hci0] 10.442431
      LE Read Remote Used Features (0x08|0x0016) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 12                                                              #9 [hci0] 10.499253
      LE Read Remote Used Features (0x04)
        Status: Success (0x00)
        Handle: 64
        Features: 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          LE Encryption
          Connection Parameter Request Procedure
          Extended Reject Indication
          Slave-initiated Features Exchange
          LE Ping
= bluetoothd: src/service.c:service_accept() input-hog profile accept failed for E4:CF:33:D9:C6:94               10.500315
< ACL Data TX: Handle 64 flags 0x00 dlen 7                                                            #10 [hci0] 10.500535
      ATT: Exchange MTU Request (0x02) len 2
        Client RX MTU: 517
> ACL Data RX: Handle 64 flags 0x02 dlen 6                                                            #11 [hci0] 10.529045
      SMP: Security Request (0x0b) len 1
        Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
> ACL Data RX: Handle 64 flags 0x02 dlen 7                                                            #12 [hci0] 10.529837
      ATT: Exchange MTU Response (0x03) len 2
        Server RX MTU: 517
< ACL Data TX: Handle 64 flags 0x00 dlen 7                                                            #13 [hci0] 10.531430
      ATT: Read Request (0x0a) len 2
        Handle: 0x003a
> HCI Event: Number of Completed Packets (0x13) plen 5                                                #14 [hci0] 10.536739
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 6                                                            #15 [hci0] 10.566609
      ATT: Read Response (0x0b) len 1
        Value: 5f
< ACL Data TX: Handle 64 flags 0x00 dlen 7                                                            #16 [hci0] 10.567107
      ATT: Read Request (0x0a) len 2
        Handle: 0x0032
> ACL Data RX: Handle 64 flags 0x02 dlen 12                                                           #17 [hci0] 10.589187
      ATT: Read Response (0x0b) len 7
        Value: 02d11800940001
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #18 [hci0] 10.589757
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0001-0xffff
        Attribute type: Unknown (0x2b3a)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                #19 [hci0] 10.596710
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 9                                                            #20 [hci0] 10.604177
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0001
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #21 [hci0] 10.604671
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0001-0xffff
        Attribute group type: Primary Service (0x2800)
> ACL Data RX: Handle 64 flags 0x02 dlen 27                                                           #22 [hci0] 10.634393
> ACL Data RX: Handle 64 flags 0x01 dlen 9                                                            #23 [hci0] 10.635139
      ATT: Read By Group Type Response (0x11) len 31
        Attribute data length: 6
        Attribute group list: 5 entries
        Handle range: 0x0001-0x0005
        UUID: Generic Attribute Profile (0x1801)
        Handle range: 0x0014-0x001c
        UUID: Generic Access Profile (0x1800)
        Handle range: 0x0028-0x0037
        UUID: Device Information (0x180a)
        Handle range: 0x0038-0x003b
        UUID: Battery Service (0x180f)
        Handle range: 0x003c-0xffff
        UUID: Human Interface Device (0x1812)
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #24 [hci0] 10.635654
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0001-0xffff
        Attribute group type: Secondary Service (0x2801)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                #25 [hci0] 10.641715
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 9                                                            #26 [hci0] 10.649165
      ATT: Error Response (0x01) len 4
        Read By Group Type Request (0x10)
        Handle: 0x0001
        Error: Unsupported Group Type (0x10)
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #27 [hci0] 10.649726
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0006-0x001c
        Attribute type: Include (0x2802)
> ACL Data RX: Handle 64 flags 0x02 dlen 9                                                            #28 [hci0] 10.679169
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0006
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #29 [hci0] 10.679708
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0006-0x001c
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                #30 [hci0] 10.686727
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 27                                                           #31 [hci0] 10.701896
> ACL Data RX: Handle 64 flags 0x01 dlen 7                                                            #32 [hci0] 10.702661
      ATT: Read By Type Response (0x09) len 29
        Attribute data length: 7
        Attribute data list: 4 entries
        Handle: 0x0015
        Value: 021600002a
        Handle: 0x0017
        Value: 021800012a
        Handle: 0x0019
        Value: 021a00042a
        Handle: 0x001b
        Value: 021c00a62a
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #33 [hci0] 10.703455
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x001c-0x001c
        Attribute type: Characteristic (0x2803)
> ACL Data RX: Handle 64 flags 0x02 dlen 9                                                            #34 [hci0] 10.731660
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x001c
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                           #35 [hci0] 10.732378
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0000-0x0027
        Attribute type: Include (0x2802)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                #36 [hci0] 10.739211
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 9                                                            #37 [hci0] 10.746669
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0000
        Error: Invalid Handle (0x01)

@Fainought
Copy link

Hi, I have the same problem and came here to ask for the same thing. I can help too.

I noticed from this thread some errors or at least things that don't apply to my machine.

The stadia bluetooth enabled controller does connect to lakka via bluetooth both via ssh and gui.
The real problem is that it doesn't show up as a controller at all, no pop up and no controller in list.

Plus, the stadia controller works flawlessly on retroarch for windows. It even shows up the correct controller's name.

@gouchi
Copy link
Member

gouchi commented Feb 24, 2023

Is it also an issue using dev builds from Lakka 5.x branch ?

Thank you.

@Fainought
Copy link

No, it doesn't work even there. Same problem: gets connected but not recognized as a controller

@steigerdich
Copy link

steigerdich commented Jun 21, 2023

Do you still have that problem? I figured out, that it helps to restart bluetooth with a startup script. i added sleep 10, otherwise it won't work

@gouchi
Copy link
Member

gouchi commented Dec 19, 2023

Hi,

Is it still not working using latest dev builds ?

Thank you.

@nilo85
Copy link

nilo85 commented Jan 28, 2024

@gouchi I have the same issue, I just tried installing the latest dev build (Lakka-RPi4.aarch64-devbuild-v5.x-20240125-9297f90.img.gz) and same issue there.

Anything I can do to assist or provide more details?

EDIT: running btmon I do see live events but it does not show up in /dev/input
`

ACL Data RX: Handle 64 flags 0x02 dlen 17 #34 [hci0] 4.997549
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0040
Data: 08000880808080000000
ACL Data RX: Handle 64 flags 0x02 dlen 17 #35 [hci0] 5.057549
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0040
Data: 08002880808080000000
ACL Data RX: Handle 64 flags 0x02 dlen 17 #36 [hci0] 5.132560
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0040
Data: 08002080808080000000
ACL Data RX: Handle 64 flags 0x02 dlen 17 #37 [hci0] 5.312544
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0040
Data: 08006080808080000000
ACL Data RX: Handle 64 flags 0x02 dlen 17 #38 [hci0] 5.320058
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0040
Data: 08004080808080000000
ACL Data RX: Handle 64 flags 0x02 dlen 17 #39 [hci0] 5.463063
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0040
Data: 08000080808080000000
`

BTMON output when starting already paired stadia controller

What sticks out is "= bluetoothd: src/service.c:service_accept() input-hog profile accept failed for F6:8B:AB:35:A8:F3 11.695629"
`

HCI Event: LE Meta Event (0x3e) plen 12 #6 [hci0] 11.144438
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Public (0x00)
Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Data length: 0
RSSI: -53 dBm (0xcb)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #7 [hci0] 11.144573
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
HCI Event: Command Complete (0x0e) plen 4 #8 [hci0] 11.145880
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 #9 [hci0] 11.145999
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Filter policy: Accept list is not used (0x00)
Peer address type: Public (0x00)
Peer address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Own address type: Public (0x00)
Min connection interval: 7.50 msec (0x0006)
Max connection interval: 10.00 msec (0x0008)
Connection latency: 0 (0x0000)
Supervision timeout: 4000 msec (0x0190)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
HCI Event: Command Status (0x0f) plen 4 #10 [hci0] 11.146779
LE Create Connection (0x08|0x000d) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 19 #11 [hci0] 11.176551
LE Connection Complete (0x01)
Status: Success (0x00)
Handle: 64
Role: Central (0x00)
Peer address type: Public (0x00)
Peer address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Connection interval: 7.50 msec (0x0006)
Connection latency: 0 (0x0000)
Supervision timeout: 4000 msec (0x0190)
Central clock accuracy: 0x00
@ MGMT Event: Device Connected (0x000b) plen 13 {0x0001} [hci0] 11.176614
LE Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Flags: 0x00000008
Connection Locally Initiated
Data length: 0
@ RAW Open: btmon (privileged) version 2.22 {0x0002} 11.177534
@ RAW Close: btmon {0x0002} 11.177583
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 #12 [hci0] 11.195713
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
HCI Event: Command Status (0x0f) plen 4 #13 [hci0] 11.196054
LE Read Remote Used Features (0x08|0x0016) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 12 #14 [hci0] 11.225364
LE Read Remote Used Features (0x04)
Status: Connection Failed to be Established (0x3e)
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Features: 0x3f 0x00 0x00 0x08 0x00 0x00 0x00 0x00
LE Encryption
Connection Parameter Request Procedure
Extended Reject Indication
Peripheral-initiated Features Exchange
LE Ping
LE Data Packet Length Extension
Remote Public Key Validation
HCI Event: Disconnect Complete (0x05) plen 4 #15 [hci0] 11.226297
Status: Success (0x00)
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Reason: Connection Failed to be Established (0x3e)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 11.226339
LE Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Reason: Unspecified (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #16 [hci0] 11.242468
Type: Passive (0x00)
Interval: 60.000 msec (0x0060)
Window: 30.000 msec (0x0030)
Own address type: Public (0x00)
Filter policy: Ignore not in accept list (0x01)
HCI Event: Command Complete (0x0e) plen 4 #17 [hci0] 11.242841
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #18 [hci0] 11.242938
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
HCI Event: Command Complete (0x0e) plen 4 #19 [hci0] 11.243329
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 12 #20 [hci0] 11.273553
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Public (0x00)
Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Data length: 0
RSSI: -46 dBm (0xd2)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #21 [hci0] 11.273659
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
HCI Event: Command Complete (0x0e) plen 4 #22 [hci0] 11.275872
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 #23 [hci0] 11.275954
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Filter policy: Accept list is not used (0x00)
Peer address type: Public (0x00)
Peer address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Own address type: Public (0x00)
Min connection interval: 7.50 msec (0x0006)
Max connection interval: 10.00 msec (0x0008)
Connection latency: 0 (0x0000)
Supervision timeout: 4000 msec (0x0190)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
HCI Event: Command Status (0x0f) plen 4 #24 [hci0] 11.276479
LE Create Connection (0x08|0x000d) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 19 #25 [hci0] 11.309061
LE Connection Complete (0x01)
Status: Success (0x00)
Handle: 64
Role: Central (0x00)
Peer address type: Public (0x00)
Peer address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Connection interval: 7.50 msec (0x0006)
Connection latency: 0 (0x0000)
Supervision timeout: 4000 msec (0x0190)
Central clock accuracy: 0x00
@ MGMT Event: Device Connected (0x000b) plen 13 {0x0001} [hci0] 11.309120
LE Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Flags: 0x00000008
Connection Locally Initiated
Data length: 0
@ RAW Open: btmon (privileged) version 2.22 {0x0002} 11.310362
@ RAW Close: btmon {0x0002} 11.310392
HCI Event: LE Meta Event (0x3e) plen 11 #26 [hci0] 11.325536
LE Data Length Change (0x07)
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Max TX octets: 251
Max TX time: 2120
Max RX octets: 27
Max RX time: 328
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 #27 [hci0] 11.325738
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
HCI Event: Command Status (0x0f) plen 4 #28 [hci0] 11.326139
LE Read Remote Used Features (0x08|0x0016) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 12 #29 [hci0] 11.340564
LE Read Remote Used Features (0x04)
Status: Success (0x00)
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Features: 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
LE Encryption
Connection Parameter Request Procedure
Extended Reject Indication
Peripheral-initiated Features Exchange
LE Ping
LE Data Packet Length Extension
< ACL Data TX: Handle 64 flags 0x00 dlen 7 #30 [hci0] 11.341776
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 517
ACL Data RX: Handle 64 flags 0x02 dlen 6 #31 [hci0] 11.355402
SMP: Security Request (0x0b) len 1
Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
HCI Event: LE Meta Event (0x3e) plen 11 #32 [hci0] 11.385570
LE Data Length Change (0x07)
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Max TX octets: 251
Max TX time: 2120
Max RX octets: 251
Max RX time: 2120
ACL Data RX: Handle 64 flags 0x02 dlen 7 #33 [hci0] 11.400370
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 517
< ACL Data TX: Handle 64 flags 0x00 dlen 7 #34 [hci0] 11.401560
ATT: Read Request (0x0a) len 2
Handle: 0x0016 Type: Device Name (0x2a00)
HCI Event: Number of Completed Packets (0x13) plen 5 #35 [hci0] 11.408009
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 5 #36 [hci0] 11.430335
ATT: Read Response (0x0b) len 0
Value:
< ACL Data TX: Handle 64 flags 0x00 dlen 11 #37 [hci0] 11.430673
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Server Supported Features (0x2b3a)
ACL Data RX: Handle 64 flags 0x02 dlen 9 #38 [hci0] 11.460372
ATT: Error Response (0x01) len 4
Read By Type Request (0x08)
Handle: 0x0001
Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 11 #39 [hci0] 11.460809
ATT: Read By Group Type Request (0x10) len 6
Handle range: 0x0001-0xffff
Attribute group type: Primary Service (0x2800)
HCI Event: Number of Completed Packets (0x13) plen 5 #40 [hci0] 11.468047
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 36 #41 [hci0] 11.476014
ATT: Read By Group Type Response (0x11) len 31
Attribute data length: 6
Attribute group list: 5 entries
Handle range: 0x0001-0x0005
UUID: Generic Attribute Profile (0x1801)
Handle range: 0x0014-0x001c
UUID: Generic Access Profile (0x1800)
Handle range: 0x0028-0x0037
UUID: Device Information (0x180a)
Handle range: 0x0038-0x003b
UUID: Battery Service (0x180f)
Handle range: 0x003c-0xffff
UUID: Human Interface Device (0x1812)
< ACL Data TX: Handle 64 flags 0x00 dlen 11 #42 [hci0] 11.485926
ATT: Read By Group Type Request (0x10) len 6
Handle range: 0x0001-0xffff
Attribute group type: Secondary Service (0x2801)
ACL Data RX: Handle 64 flags 0x02 dlen 9 #43 [hci0] 11.512867
ATT: Error Response (0x01) len 4
Read By Group Type Request (0x10)
Handle: 0x0001
Error: Unsupported Group Type (0x10)
< ACL Data TX: Handle 64 flags 0x00 dlen 11 #44 [hci0] 11.513167
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0006-0xffff
Attribute type: Include (0x2802)
HCI Event: Number of Completed Packets (0x13) plen 5 #45 [hci0] 11.520559
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 9 #46 [hci0] 11.527852
ATT: Error Response (0x01) len 4
Read By Type Request (0x08)
Handle: 0x0006
Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 11 #47 [hci0] 11.528158
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0006-0xffff
Attribute type: Characteristic (0x2803)
ACL Data RX: Handle 64 flags 0x02 dlen 118 #48 [hci0] 11.559439
ATT: Read By Type Response (0x09) len 113
Attribute data length: 7
Attribute data list: 16 entries
Handle: 0x0015
Value: 021600002a
Properties: 0x02
Read (0x02)
Value Handle: 0x0016
Value UUID: Device Name (0x2a00)
Handle: 0x0017
Value: 021800012a
Properties: 0x02
Read (0x02)
Value Handle: 0x0018
Value UUID: Appearance (0x2a01)
Handle: 0x0019
Value: 021a00042a
Properties: 0x02
Read (0x02)
Value Handle: 0x001a
Value UUID: Peripheral Preferred Connection Parameters (0x2a04)
Handle: 0x001b
Value: 021c00a62a
Properties: 0x02
Read (0x02)
Value Handle: 0x001c
Value UUID: Central Address Resolution (0x2aa6)
Handle: 0x0029
Value: 022a00292a
Properties: 0x02
Read (0x02)
Value Handle: 0x002a
Value UUID: Manufacturer Name String (0x2a29)
Handle: 0x002b
Value: 022c00242a
Properties: 0x02
Read (0x02)
Value Handle: 0x002c
Value UUID: Model Number String (0x2a24)
Handle: 0x002d
Value: 022e00262a
Properties: 0x02
Read (0x02)
Value Handle: 0x002e
Value UUID: Firmware Revision String (0x2a26)
Handle: 0x002f
Value: 023000282a
Properties: 0x02
Read (0x02)
Value Handle: 0x0030
Value UUID: Software Revision String (0x2a28)
Handle: 0x0031
Value: 023200502a
Properties: 0x02
Read (0x02)
Value Handle: 0x0032
Value UUID: PnP ID (0x2a50)
Handle: 0x0039
Value: 023a00192a
Properties: 0x02
Read (0x02)
Value Handle: 0x003a
Value UUID: Battery Level (0x2a19)
Handle: 0x003d
Value: 0a3e004e2a
Properties: 0x0a
Read (0x02)
Write (0x08)
Value Handle: 0x003e
Value UUID: Protocol Mode (0x2a4e)
Handle: 0x003f
Value: 1240004d2a
Properties: 0x12
Read (0x02)
Notify (0x10)
Value Handle: 0x0040
Value UUID: Report (0x2a4d)
Handle: 0x0043
Value: 0a44004d2a
Properties: 0x0a
Read (0x02)
Write (0x08)
Value Handle: 0x0044
Value UUID: Report (0x2a4d)
Handle: 0x0047
Value: 0248004b2a
Properties: 0x02
Read (0x02)
Value Handle: 0x0048
Value UUID: Report Map (0x2a4b)
Handle: 0x0049
Value: 024a004a2a
Properties: 0x02
Read (0x02)
Value Handle: 0x004a
Value UUID: HID Information (0x2a4a)
Handle: 0x004b
Value: 084c004c2a
Properties: 0x08
Write (0x08)
Value Handle: 0x004c
Value UUID: HID Control Point (0x2a4c)
< ACL Data TX: Handle 64 flags 0x00 dlen 11 #49 [hci0] 11.559731
ATT: Read By Type Request (0x08) len 6
Handle range: 0x004c-0xffff
Attribute type: Characteristic (0x2803)
HCI Event: Number of Completed Packets (0x13) plen 5 #50 [hci0] 11.565567
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 9 #51 [hci0] 11.572858
ATT: Error Response (0x01) len 4
Read By Type Request (0x08)
Handle: 0x004c
Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 9 #52 [hci0] 11.573357
ATT: Find Information Request (0x04) len 4
Handle range: 0x0033-0x0037
ACL Data RX: Handle 64 flags 0x02 dlen 9 #53 [hci0] 11.602867
ATT: Error Response (0x01) len 4
Find Information Request (0x04)
Handle: 0x0033
Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 9 #54 [hci0] 11.603241
ATT: Find Information Request (0x04) len 4
Handle range: 0x003b-0x003b
HCI Event: Number of Completed Packets (0x13) plen 5 #55 [hci0] 11.610543
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 9 #56 [hci0] 11.617853
ATT: Error Response (0x01) len 4
Find Information Request (0x04)
Handle: 0x003b
Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 9 #57 [hci0] 11.618148
ATT: Find Information Request (0x04) len 4
Handle range: 0x0041-0x0042
ACL Data RX: Handle 64 flags 0x02 dlen 14 #58 [hci0] 11.647917
ATT: Find Information Response (0x05) len 9
Format: UUID-16 (0x01)
Handle: 0x0041
UUID: Client Characteristic Configuration (0x2902)
Handle: 0x0042
UUID: Report Reference (0x2908)
< ACL Data TX: Handle 64 flags 0x00 dlen 9 #59 [hci0] 11.648308
ATT: Find Information Request (0x04) len 4
Handle range: 0x0045-0x0046
HCI Event: Number of Completed Packets (0x13) plen 5 #60 [hci0] 11.655548
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 14 #61 [hci0] 11.662932
ATT: Find Information Response (0x05) len 9
Format: UUID-16 (0x01)
Handle: 0x0045
UUID: Client Characteristic Configuration (0x2902)
Handle: 0x0046
UUID: Report Reference (0x2908)
< ACL Data TX: Handle 64 flags 0x00 dlen 9 #62 [hci0] 11.663235
ATT: Find Information Request (0x04) len 4
Handle range: 0x004d-0xffff
ACL Data RX: Handle 64 flags 0x02 dlen 9 #63 [hci0] 11.692871
ATT: Error Response (0x01) len 4
Find Information Request (0x04)
Handle: 0x004d
Error: Attribute Not Found (0x0a)
= bluetoothd: src/service.c:service_accept() input-hog profile accept failed for F6:8B:AB:35:A8:F3 11.695629
< ACL Data TX: Handle 64 flags 0x00 dlen 9 #64 [hci0] 11.712216
ATT: Write Request (0x12) len 4
Handle: 0x0004 Type: Client Characteristic Configuration (0x2902)
Data: 0200
Indication (0x02)
HCI Event: Number of Completed Packets (0x13) plen 5 #65 [hci0] 11.715537
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 5 #66 [hci0] 11.737812
ATT: Write Response (0x13) len 0
< ACL Data TX: Handle 64 flags 0x00 dlen 7 #67 [hci0] 11.738385
ATT: Read Request (0x0a) len 2
Handle: 0x0016 Type: Device Name (0x2a00)
ACL Data RX: Handle 64 flags 0x02 dlen 5 #68 [hci0] 11.752809
ATT: Read Response (0x0b) len 0
Value:
Handle: 0x0000
Property: invalid size
< ACL Data TX: Handle 64 flags 0x00 dlen 7 #69 [hci0] 11.753378
ATT: Read Request (0x0a) len 2
Handle: 0x0032 Type: PnP ID (0x2a50)
HCI Event: Number of Completed Packets (0x13) plen 5 #70 [hci0] 11.760509
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 2
ACL Data RX: Handle 64 flags 0x02 dlen 12 #71 [hci0] 11.767885
ATT: Read Response (0x0b) len 7
Value: 02d11800940001
< ACL Data TX: Handle 64 flags 0x00 dlen 7 #72 [hci0] 11.768594
ATT: Read Request (0x0a) len 2
Handle: 0x003a Type: Battery Level (0x2a19)
ACL Data RX: Handle 64 flags 0x02 dlen 6 #73 [hci0] 11.805333
ATT: Read Response (0x0b) len 1
Value: 5e
HCI Event: Number of Completed Packets (0x13) plen 5 #74 [hci0] 12.016764
Num handles: 1
Handle: 64 Address: F6:8B:AB:35:A8:F3 (OUI F6-8B-AB)
Count: 1
`

@nilo85
Copy link

nilo85 commented Jan 28, 2024

I stumbled upon this https://codeberg.org/fabiscafe/game-devices-udev
Gave it a try but not knowing much of this ecosystem of sofware, I suspect it requires a kernel module called uinput, which is not available when i lsmod..

@gouchi
Copy link
Member

gouchi commented Feb 2, 2024

@nilo85 Can you try to copy the file in /storage/.config/udev.rules.d/ ?

Then reload udev rules udevadm control --reload-rules && udevadm trigger

@nilo85
Copy link

nilo85 commented Feb 2, 2024

Still did not work =/ When u run the control reload and trigger UI showed that my PS3 controller disconnected (but still works) so that seems to have done something.

Is there a command to debug what udev sees?

@nilo85
Copy link

nilo85 commented Feb 2, 2024

when enabling debug output as in https://superuser.com/questions/677106/how-can-i-check-if-a-udev-rule-fired (top response)

I get when boting paired device:

Feb 02 23:20:54 Lakka systemd-udevd[378]: Cleanup idle workers
Feb 02 23:20:56 Lakka systemd-udevd[378]: hci0:64: Device is queued (SEQNUM=1931, ACTION=add)
Feb 02 23:20:56 Lakka systemd-udevd[378]: hci0:64: Device ready for processing (SEQNUM=1931, ACTION=add)
Feb 02 23:20:56 Lakka systemd-udevd[378]: Successfully forked off '(udev-worker)' as PID 931.
Feb 02 23:20:56 Lakka systemd-udevd[378]: hci0:64: Worker [931] is forked for processing SEQNUM=1931.
Feb 02 23:20:56 Lakka (udev-worker)[931]: hci0:64: Processing device (SEQNUM=1931, ACTION=add)
Feb 02 23:20:56 Lakka (udev-worker)[931]: hci0:64: sd-device: Created db file '/run/udev/data/+bluetooth:hci0:64' for '/devices/platform/soc/fe201000.serial/serial0/serial0-0/bluetooth/hci0/hci0:64'
Feb 02 23:20:56 Lakka (udev-worker)[931]: hci0:64: Device processed (SEQNUM=1931, ACTION=add)
Feb 02 23:20:56 Lakka (udev-worker)[931]: hci0:64: sd-device-monitor(worker): Passed 394 byte to netlink monitor.
Feb 02 23:20:56 Lakka systemd-udevd[378]: No events are queued, removing /run/udev/queue.
Feb 02 23:20:56 Lakka bluetoothd[869]: src/service.c:service_accept() input-hog profile accept failed for F6:8B:AB:35:A8:F3
Feb 02 23:20:56 Lakka kernel: Bluetooth: hci0: security requested but not available
Feb 02 23:20:59 Lakka systemd-udevd[378]: Cleanup idle workers
Feb 02 23:20:59 Lakka (udev-worker)[931]: Unload kernel module index.
Feb 02 23:20:59 Lakka (udev-worker)[931]: Unloaded link configuration context.
Feb 02 23:20:59 Lakka systemd-udevd[378]: Worker [931] exited.

@gouchi
Copy link
Member

gouchi commented Feb 2, 2024

Is there a command to debug what udev sees?

you could try something like udevadm monitor --property --udev

@nilo85
Copy link

nilo85 commented Feb 3, 2024

This is what I get when booting the device (already paired) and when turning it off..

But from previous logs and some googling on simiar errors sonds like there might be an issue with bluez?
"Feb 02 23:20:56 Lakka bluetoothd[869]: src/service.c:service_accept() input-hog profile accept failed for F6:8B:AB:35:A8:F3"

It seems to me the device is connecting and disconnecting properly but something fails on my machine during this and its only partially setup?

UDEV  [3292.827558] add      /devices/platform/soc/fe201000.serial/serial0/serial0-0/bluetooth/hci0/hci0:64 (bluetooth)
ACTION=add
DEVPATH=/devices/platform/soc/fe201000.serial/serial0/serial0-0/bluetooth/hci0/hci0:64
SUBSYSTEM=bluetooth
DEVTYPE=link
SEQNUM=1977
USEC_INITIALIZED=3292826900
SYSTEMD_ALIAS=/sys/subsystem/bluetooth/devices/hci0:64
SYSTEMD_WANTS=bluetooth.target
SYSTEMD_USER_WANTS=bluetooth.target
TAGS=:systemd:
CURRENT_TAGS=:systemd:




UDEV  [3314.331092] remove   /devices/platform/soc/fe201000.serial/serial0/serial0-0/bluetooth/hci0/hci0:64 (bluetooth)
ACTION=remove
DEVPATH=/devices/platform/soc/fe201000.serial/serial0/serial0-0/bluetooth/hci0/hci0:64
SUBSYSTEM=bluetooth
DEVTYPE=link
SEQNUM=1978
USEC_INITIALIZED=3292826900
SYSTEMD_ALIAS=/sys/subsystem/bluetooth/devices/hci0:64
SYSTEMD_WANTS=bluetooth.target
SYSTEMD_USER_WANTS=bluetooth.target
TAGS=:systemd:
CURRENT_TAGS=:systemd:

@nilo85
Copy link

nilo85 commented Feb 3, 2024

Also I see all these

[ 3999.447873] Bluetooth: hci0: security requested but not available

https://www.linuxquestions.org/questions/slackware-14/logitech-bluetooth-mouse-not-available-after-pairing-as-input-device-on-slackware-current-4175712778/

Maybe we are supposed to show some dialog? (I remember my macbook did this everytime I connected wth it)

@nilo85
Copy link

nilo85 commented Feb 3, 2024

After I ran
hciconfig hci0 down
and sudo hciconfig hci0 up
it connected and works in UI

@nilo85
Copy link

nilo85 commented Feb 3, 2024

dmesg

[ 3858.651048] systemd-journald[320]: /run/log/journal/64a7bca1d41cd476466b1933642b3dfe/system.journal: Journal header limits reached or header out-of-date, rotating.
[ 3863.485806] Bluetooth: hci0: security requested but not available
[ 3897.452660] Bluetooth: hci0: security requested but not available
[ 3931.446277] Bluetooth: hci0: security requested but not available
[ 3934.509698] Bluetooth: hci0: security requested but not available
[ 3965.444477] Bluetooth: hci0: security requested but not available
[ 3971.780692] Bluetooth: hci0: security requested but not available
[ 3973.153151] Bluetooth: hci0: security requested but not available
[ 3999.447873] Bluetooth: hci0: security requested but not available
[ 4033.478659] Bluetooth: hci0: security requested but not available
[ 4067.488741] Bluetooth: hci0: security requested but not available
[ 4086.705658] systemd-journald[320]: Data hash table of /run/log/journal/64a7bca1d41cd476466b1933642b3dfe/system.journal has a fill level at 75.1 (1537 of 2047 items, 524288 file size, 341 bytes per hash table item), suggesting rotation.
[ 4086.705692] systemd-journald[320]: /run/log/journal/64a7bca1d41cd476466b1933642b3dfe/system.journal: Journal header limits reached or header out-of-date, rotating.
[ 4095.474177] Bluetooth: hci0: unexpected SMP command 0x0b from f6:8b:ab:35:a8:f3
[ 4096.048526] input: StadiaNFNZ-a8f3 as /devices/virtual/misc/uhid/0005:18D1:9400.0004/input/input5
[ 4096.049065] hid-generic 0005:18D1:9400.0004: input,hidraw0: BLUETOOTH HID v1.00 Gamepad [StadiaNFNZ-a8f3] on dc:a6:32:23:68:2d

@nilo85
Copy link

nilo85 commented Feb 3, 2024

I removed the udev rules, rebooted.

Device was paired but non functional, then I did hciconfig hci0 down and up, and controller connects again, so I suspect there is really some sort of dance we are supposed to do with it that does not work automatically

@nilo85
Copy link

nilo85 commented Feb 3, 2024

PS, none of the buttons seem to be mapped as hotkey menu button

@nilo85
Copy link

nilo85 commented Feb 3, 2024

Managed to figure out how to remap controller and get meny key working =)

However I guess we should figure out how to get that security request fixed properly.
I can try to figure out how to export a controller mapping tomorrow, auto worked good except for the menu button

@nilo85
Copy link

nilo85 commented Feb 3, 2024

Toggling bluetooth off and on via UI has the same effect.

So currently to get it working on Lakka you need to pair it, then Services > Bluetooth Off and then On again and it should tell you a Stadia controller was connected

I suspect it might be an issue with the current bluetooth agent, maybe its booted too early?

@nilo85
Copy link

nilo85 commented Feb 3, 2024

Regarding binding there seems to be one already https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/Google%20LLC%20Stadia%20Controller%20rev.%20A.cfg

But it gives a different name when connected over bluetooth maybe that is why it does not map it out of box ( had to rename it to whatever mine as called for Mupen64 on my mac...)

My generated config has these rows

input_driver = "udev"
input_device = "StadiaNFNZ-a8f3"

vs

input_driver = "udev"
input_device = "Google LLC Stadia Controller rev. A"

EDIT: Might also be they changed the device name when you flashed it to permanent BT mode and the existing bindings worked with pre-flashed controller over cable

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

No branches or pull requests

8 participants