Open Jaffacakelover opened 2 years ago
Awesome review! Thanks so much :rocket:
I'm trying to generate an autoconfig for a Bluetooth gamepad, but I cannot figure out how to get its PID or VID to save my life. 90 minutes of research yielded that PIDs and VIDs are a USB thing, and Linux just arbitrarily assigns Modalias: usb:v0000p0000d0001, which is pretty useless.
So what am I supposed to put for PID and VID?
If it makes any difference, I've connected my gamepad in udev mode.
You can get the values from usdev with lsusb
. It'll give you hex values which you can port to decimal.
You can get the values from usdev with
lsusb
. It'll give you hex values which you can port to decimal.
Unfortunately I cannot. This is a Bluetooth gamepad, so the only Bluetooth that shows up in lsusb
is my Bluetooth receiver, not the gamepad.
Use bluetoothctl
Use bluetoothctl
I tried that, too:
Device 30:31:7D:A0:67:91 (public)
Name: Lic2 Pro Controller
Alias: Lic2 Pro Controller
Class: 0x00000508 (1288)
Icon: input-gaming
Paired: yes
Bonded: yes
Trusted: yes
Blocked: no
Connected: yes
WakeAllowed: yes
LegacyPairing: no
UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: usb:v0000p0000d0001
Edit: There's a comment in the Bluetooth controllers reading
# Hex vid:pid and Decimal vid:pid is shown in the "log_verbosity" window, enable "log_verbosity" in retroarch.cfg and run RetroArch.
Cool, so I enable logging, follow the instructions, and get this:
[INFO] [Config]: Looking for config in: "/home/user/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.15.0 (Git b2ceb50)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSE4 SSE4.2 AES AVX
[INFO] Built: Sep 29 2023
[INFO] Version: 1.15.0
[INFO] Git: b2ceb50
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Set video size to: 960x720.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GL]: Found GL context: "x".
[INFO] [GL]: Detecting screen resolution: 1920x1080.
[INFO] [GLX]: X = 0, Y = 0, W = 960, H = 720.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GL]: Vendor: Intel, Renderer: Mesa Intel(R) HD Graphics 4000 (IVB GT2).
[INFO] [GL]: Version: 4.2 (Compatibility Profile) Mesa 23.2.1-1.
[INFO] [GL]: Using resolution 960x720.
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Setting up menu pipeline shaders for XMB ...
[INFO] [GLSL]: Compiling ribbon shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling simple ribbon shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling snow shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling modern snow shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling bokeh shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling snowflake shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [udev]: Pad #0 (/dev/input/event20) supports 0 force feedback effects.
[INFO] [Autoconf]: Lic2 Pro Controller (0/0) not configured.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [DBus]: Suspended screensaver via DBus.
[INFO] [Video]: Found display server: "x11".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Playlist]: Loading history file: "/home/user/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/user/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/user/.config/retroarch/content_video_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/user/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/home/user/.config/retroarch/content_favorites.lpl".
[INFO] [PulseAudio]: Pausing.
[INFO] [Config]: Saved new config to "/home/user/.config/retroarch/retroarch.cfg".
[INFO] [PulseAudio]: Unpausing.
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [XINERAMA]: Saved monitor #0.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
Which is ironic because I enabled "debug" in the configuration file. It appears that I'm not using the same software the developers are.
[Autoconf]: Lic2 Pro Controller (0/0) not configured
Interesting that it can't find the vid and pids. What do you get when it's plugged in with a wire? The logging across all the input drivers could improve.
It appears that I'm not using the same software the developers are.
Looks the same to me. The only difference I see from my logs are that I'm currently on RA 1.16.
Interesting that it can't find the vid and pids. What do you get when it's plugged in with a wire? The logging across all the input drivers could improve.
Unfortunately, this is pure Bluetooth. The only place to plug anything in is a space for two AA batteries. I'll try it in Windows and see if I have more luck.
Update: Tried it in Windows and got:
Device BTHENUM\{00001124-0000-1000-8000-00805f9b34fb}_VID&00020000_PID&0000\8&2e976ffb&0&30317DA06791_C00000000 was started.
Which, ironically, gives me a little more information than Linux does. It appears, like Linux, Windows is using the default Bluetooth HID drivers because PowerA specifically, and vehemently, doesn't support anything else. It also appears to be assigning a dummy VID and PID as the controller provides neither. I see why I got the barely used controller for less than half its price new. I would have said that it has no USB ID assigned, except that OEM Nintendo controllers seem to.
Agreed that logging and general documentation leaves a lot to be desired. Having to pick through the source to figure this out will turn away a lot of potential contributors. Fortunately, I have a high frustration tolerance.
I've been through all of the controller autoconfig files for a related task, and thought this list might prove useful to some who want to track down missing values.
The following autoconfigs have no vendor_id and no product_id:
From the sheer amount of Android autoconfigs that don't have VIDs or PIDs, I'm assuming that Android doesn't use them?
The following autoconfigs have the vendor_id and product_id, but both are commented out:
Several of the above files include the following message:
The following autoconfigs have the vendor_id and product_id, but the product_id is commented out: