Hello,
I bought a "VR Case 2nd" Bluetooth wireless controller for my Raspberry Pi 3 and want to use it with LibreELEC.
The BT controller is recognized as gamepad so far, but the key setting configuration is still messed up and LibreElec is setting up the device only as some sort of volume control controller. At the moment i can set only the volume but not navigate in the menu.
[ 9.440651] Bluetooth: Core ver 2.22
[ 9.440701] NET: Registered protocol family 31
[ 9.440703] Bluetooth: HCI device and connection manager initialized
[ 9.440716] Bluetooth: HCI socket layer initialized
[ 9.440721] Bluetooth: L2CAP socket layer initialized
[ 9.440737] Bluetooth: SCO socket layer initialized
[ 9.446607] Bluetooth: HCI UART driver ver 2.3
[ 9.446616] Bluetooth: HCI UART protocol H4 registered
[ 9.446618] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 9.446724] Bluetooth: HCI UART protocol Broadcom registered
[ 6026.738560] input: VR CASE 2nd as /devices/virtual/misc/uhid/0005:248A:8266.0004/input/input4
[ 6026.740591] hid-generic 0005:248A:8266.0004: input,hidraw3: BLUETOOTH HID v36.34 Gamepad [VR CASE 2nd ] on B8:27:EB:XX:XX:XX
Display More
Vendor ID seems to be 248A.
Product ID 8266.
I don't know why the Version ID differs. It shows up two times, one as 3634 and the other as 0004.
/proc/bus/input/devices
I: Bus=0005 Vendor=248a Product=8266 Version=3634
N: Name="VR CASE 2nd "
P: Phys=B8:27:EB:XX:XX:XX
S: Sysfs=/devices/virtual/misc/uhid/0005:248A:8266.0004/input/input4
U: Uniq=FF:FF:60:XX:XX:XX
H: Handlers=sysrq kbd leds mouse2 js0 event4
B: PROP=0
B: EV=12001f
B: KEY=fff0000 70000 10000 7 ff9f307a c14057ff febeffdf ffefffff ffffffff fffffffe
B: REL=103
B: ABS=3
B: MSC=10
B: LED=1f
Display More
bluetoothctl gave me the following info:
[bluetooth] info FF:FF:60:XX:XX:XX
Device FF:FF:60:XX:XX:XX
Name: VR CASE 2nd
Alias: VR CASE 2nd
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
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: HuMMan Interface Device (00001812-0000-1000-8000-00805f9b34fb)
Modalias: usb:v248Ap8266d3634
Display More
Offtopic: BTW, the forum doesn't allow the word h u m a n. Thus i changed h u m a n Interface Device to HuMMan.
hciconfig hci0
hci0: Type: Primary Bus: UART
BD Address: B8:27:EB:XX:XX:XX ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:6170 acl:299 sco:0 events:183 errors:0
TX bytes:3848 acl:58 sco:0 commands:74 errors:0
bluez-hcidump
-sh: bluez-hcidump: not found
As far as i know i have to set up an udev file in ~/.config/udev.rules.d/ but could need some guidance for a proper rule configuration.
I want to use the analog stick to navigate in the LibreElec GUI and in the fullscreen player mode i want to use it as analog control to step forward or backward in the video. The more i push the analog stick to the right the faster the player should jump forward in the video and if i push the stick to the left it should navigate backwards in the video.
The buttons should be used for entering or leaving a menu, volume control and things like that.
But there also seems some problem with the scancodes. The evtest command wasn't available on LibreELEC so i did enable debug logging to take a look at ~/.kodi/temp/kodi.log for the scancodes but it seems to be, that the "button C" is linked to pressing the "joystick down" and the "button D" to "joystick up".
The scancodes are at least the same. I don't know if this is a hardware issue, but if not, i would like to sort that out and use all uniquely.
Here's what the logs revealed about the scancodes of the buttons and the analog stick:
Scancodes:
'@' Button:
no Function
'Off' Button:
no function
'A' Button:
scancode 0xa4, sym: 0x00b3, unicode: 0x0000, modifier: 0x0000
OnKey: play_pause (0xf0bd) pressed, action is PlayPause
'B' Button:
no function
'C' Button:
scancode 0x72, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
------ Window Init (DialogVolumeBar.xml) ------
'D' Button:
scancode 0x73, sym: 0x00af, unicode: 0x0000, modifier: 0x0
OnKey: volume_up (0xf0b9) pressed, action is VolumeUp
CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
------ Window Init (DialogVolumeBar.xml) ------
'Lower front' Button:
CLinuxInputDevice::KeyEvent: TranslateKey returned XBMCK_UNKNOWN from code(305)
'Upper front' Button:
CLinuxInputDevice::KeyEvent: TranslateKey returned XBMCK_UNKNOWN from code(304)
Joystick up:
scancode: 0x73, sym: 0x00af, unicode: 0x0000, modifier: 0x0
OnKey: long-volume_up (0x100f0b9) pressed, action is VolumeUp
CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
Joystick down:
scancode: 0x72, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
------ Window Init (DialogVolumeBar.xml) ------
CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
Joystick left:
scancode: 0xa5, sym: 0x00b1, unicode: 0x0000, modifier: 0x0
OnKey: prev_track (0xf0bb) pressed, action is SkipPrevious
Joystick right:
scancode: 0xa3, sym: 0x00b0, unicode: 0x0000, modifier: 0x0
OnKey: next_track (0xf0ba) pressed, action is SkipNext
Joystick pressed (the stick is like the ones from a modern gamepad it has a noticable pressure point if pressed and this is usually used as a button):
no function
Display More
Thanks in advance for any help you can give me.