GRS Star Wars flight yoke issues

Installing ARpiCADE for the first time? Having issues? Check here first for solutions and tips on installing.

Moderator: dee2eR

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

GRS Star Wars flight yoke issues

Post by cool_factor » Wed Apr 19, 2023 5:52 pm

OK, I need some help as I cant figure this out. When the GRS SW FY is plugged into a USB port it is seen as JOY1 (js0?), this causes the joysticks to be bumped from JOY1 to Joy 3 and Joy2 to Joy4 and it breaks the way ArPiCade hotkeys are supposed to work, the GRS SW FY acts as JOY1 (js0?) and lets you select games, etc. but no buttons work, cant credit up a game, cant select thru games using joysticks, nothing. If you unplug the GRS SW FY then ArPiCAde reverts back to the original JOY1 and Joy2 and everything works great using the JOY1 joystick as intended. Is there a way to force the GRS SW FY out of the way? Make it be seen as JOY3 or JOY4? I have no clue how to achieve this.. Please can anyone help?

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: GRS Star Wars flight yoke issues

Post by cool_factor » Sun Apr 23, 2023 3:30 pm

Heres whats happening with the GRS Star Wars flight yoke:

It pushes joy1 to joy 3, joy 2 to joy4 and breaks the hotkeys, if I unplug the GRS everything reverts back to normal.

This A.M. I managed to figure out device IDs:

Joystick: Start initialization Input: Adding joystick #0: BaolianindustryCo.,Ltd.BLflightyoke#1 (device id: 03000000be3200000214000011010000) Joystick: Baolian industry Co., Ltd. BL flight yoke #1 [GUID 03000000be3200000214000011010000] Joystick: ... 2 axes, 15 buttons 0 hats 0 balls Joystick: ... Physical id 0 mapped to logical id 1 Joystick: ... Does not have haptic capability

Input: Adding joystick #1: XboxGamepad(userspacedriver) (device id: 0000000058626f782047616d65706100) Joystick: Xbox Gamepad (userspace driver) [GUID 0000000058626f782047616d65706100] Joystick: ... 4 axes, 15 buttons 0 hats 0 balls Joystick: ... Physical id 1 mapped to logical id 2 Joystick: ... Does not have haptic capability

Input: Adding joystick #2: GPIOController1 (device id: 15000000010000000100000000010000) Joystick: GPIO Controller 1 [GUID 15000000010000000100000000010000] Joystick: ... 2 axes, 9 buttons 0 hats 0 balls Joystick: ... Physical id 2 mapped to logical id 3 Joystick: ... Does not have haptic capability

Input: Adding joystick #3: GPIOController2 (device id: 15000000010000000200000000010000) Joystick: GPIO Controller 2 [GUID 15000000010000000200000000010000] Joystick: ... 2 axes, 9 buttons 0 hats 0 balls Joystick: ... Physical id 3 mapped to logical id 4 Joystick: ... Does not have haptic capability Joystick: End initialization


BEYOND frustrated trying to figure this out..

dee2eR
Inventor
Inventor
Posts: 1860
Joined: Tue Aug 22, 2017 2:07 pm

Re: GRS Star Wars flight yoke issues

Post by dee2eR » Mon Apr 24, 2023 12:52 am

This is probably a dumb suggestion but what happens if you plug the yoke in after the rest has powered up? It's not really a solution but maybe a workaround... In theory if there's already js0 (GPIO player 1) through js2 (hotkeys xboxdrv) the yoke should become js3.

It's also possible having it plugged into a different USB port on the Pi could make a difference, although with the other inputs being on GPIO it shouldn't... for multiple USB devices this will effect the order.

Weird that what should be js0 is ending up js2 and the hotkeys are js1 with the yoke attached. By the time the hotkeys are started up the GPIO controllers should already be js[whatever] and the hotkeys should be the last js[number].

I got a USB footswitch recently that shows up as a keyboard, mouse and joystick simultaeously (the ad said it was keyboard and mouse but didn't mention the joystick part... annoyingly), I'll check its behaviour with ARpiCADE/GPIO controls and see if it leads me anywhere that may help you further with this. I think it should be possible to fix with UDEV rules or similar but I'm not sure.

dee2eR
Inventor
Inventor
Posts: 1860
Joined: Tue Aug 22, 2017 2:07 pm

Re: GRS Star Wars flight yoke issues

Post by dee2eR » Mon Apr 24, 2023 9:37 am

What program was that output from? The ordering makes no sense at all as the hotkeys (xboxdrv) start up after the other joysticks, it definately shouldn't be js1 (ever).

Is the order of /dev/input/js0 through js3 changing too? ie GPIO player 1 inputs become js2 at the Linux kernel level? If the order of /dev/input/js[whatever] is changing with the use of the yoke it may be possible to write a script to re-order the joysticks by renaming them if the yoke is detected at startup... I just renamed js0 to js5 as a test and it seems to work, although I don't know if it will actually work in practice.

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: GRS Star Wars flight yoke issues

Post by cool_factor » Mon Apr 24, 2023 12:47 pm

dee2eR wrote:
Mon Apr 24, 2023 9:37 am
What program was that output from?

>./mamearcade -v >joy.txt

The ordering makes no sense at all as the hotkeys (xboxdrv) start up after the other joysticks, it definately shouldn't be js1 (ever).

Is the order of /dev/input/js0 through js3 changing too?

I dont know how/where to check, Im assuming jtest? If so see below

ie GPIO player 1 inputs become js2 at the Linux kernel level? If the order of /dev/input/js[whatever] is changing with the use of the yoke it may be possible to write a script to re-order the joysticks by renaming them if the yoke is detected at startup... I just renamed js0 to js5 as a test and it seems to work, although I don't know if it will actually work in practice.
I then found this:

https://ubuntuforums.org/showthread.php?t=1595666

and made this rule called "99-starwars.rules"

KERNEL=="js?", ENV{ID_VENDOR}=="Baolian_industry_Co._Ltd.", ENV{ID_MODEL}=="BL_flight_yoke_#1", NAME="input/js4"

and put it here:
\etc\udev\rules.d

Rebooted and I tried it and it doesnt work :(

I also used lsusb to get ID numbers

Bus002 Device 001: ID1d6b:0003 Linux Foundation 3.0 root hub
Bus001 Device 006: IDd209:15a1 Ultimarc
Bus001 Device 005: IDd209:15a2 Ultimarc
Bus001 Device 004: ID32be:1402 (Im pretty sure this is the flight yoke)
Bus001 Device 003: IDc0f4:02b0 (Im pretty sure this is the USB wired keyboard)
Bus001 Device 002: ID2103:3431 VIA Labs, Inc. Hub (assuming either pi or your board)
Bus001 Device 001: ID1d6b:0002 Linux Foundation 2.0 root hub

Also ran jstest /dev/input/js0 and so forth:

tested and got these results below:

js0
joystick (Baolian Industry Co. Ltd. BL Flight yoke#1) 2 axis x, y 15 buttons

js0 does react to movements of the flight yoke and buttons

js1
joystick (Baolian Industry Co. Ltd. BL Flight yoke#1) 2 axis x, y 3 buttons

js1 no reactions at all (maybe when in mouse mode, I didnt try)

js2
joystick (GPIO Controller1) 2 axis x,y 9 buttons

js2 does react to movements to jamma joystick and buttons on left of control panel

js3
joystick (GPIO Controller2) 2 axis x,y 9 buttons

js3 does react to movements to jamma joystick and buttons on right of control panel


js4
joystick (xbox Gamepad (userspace driver)) 4 axis x, y, gas, brake 15 buttons

js4 no reactions at all

nothing above js5

Now that I read all this again the above rule wont work because js4 is already assigned Im assuming... So I removed it for now.

on another forum I was told try this (numbers are from lsusb results) and I havent done anything with it yet because they didnt say how or where to use:

ATTRS{idVendor}=="32be", ATTRS{idProduct}=="1402", MODE="0666"
Last edited by cool_factor on Mon Apr 24, 2023 1:46 pm, edited 3 times in total.

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: GRS Star Wars flight yoke issues

Post by cool_factor » Mon Apr 24, 2023 1:24 pm

Forgot to add that when in different MAME versions and hit tab and just for testing purposes is how I found out that without the flight stick installed joy1 (left js) does show as joy1 if i change an input, same with joy2 (right js) it shows joy2 inputs. Of course these bump when the flight stick is installed to joy 3 and joy 4. Not sure if this additional info is useful to you or not. Its definitely weird.

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: GRS Star Wars flight yoke issues

Post by cool_factor » Mon Apr 24, 2023 1:26 pm

dee2eR wrote:
Mon Apr 24, 2023 12:52 am
This is probably a dumb suggestion but what happens if you plug the yoke in after the rest has powered up? It's not really a solution but maybe a workaround... In theory if there's already js0 (GPIO player 1) through js2 (hotkeys xboxdrv) the yoke should become js3.

It's also possible having it plugged into a different USB port on the Pi could make a difference, although with the other inputs being on GPIO it shouldn't... for multiple USB devices this will effect the order.

Weird that what should be js0 is ending up js2 and the hotkeys are js1 with the yoke attached. By the time the hotkeys are started up the GPIO controllers should already be js[whatever] and the hotkeys should be the last js[number].

I got a USB footswitch recently that shows up as a keyboard, mouse and joystick simultaeously (the ad said it was keyboard and mouse but didn't mention the joystick part... annoyingly), I'll check its behaviour with ARpiCADE/GPIO controls and see if it leads me anywhere that may help you further with this. I think it should be possible to fix with UDEV rules or similar but I'm not sure.

I havent tried first suggestion because isnt that considered hotswapping the usb and potentially harmful? I havent tried other USB ports but can in a couple hours when I get home?

dee2eR
Inventor
Inventor
Posts: 1860
Joined: Tue Aug 22, 2017 2:07 pm

Re: GRS Star Wars flight yoke issues

Post by dee2eR » Tue Apr 25, 2023 11:50 am

USB *should* be hotswappable but early Pis had some odd behaviour doing so, as far as I know it should be OK on the current Pis. That said based on my testing it won't help as MAME is assigning joystick IDs based on something other the /dev/input/js[number]

Unfortunately my idea of moving the js numbers around didn't work out (except in jstest).

You can explicicitly tell MAME which joystick is joystick 1, 2 etc in the mame.ini file and it will respect that - but that only fixes MAME, not the hotkeys (or any other emulators, or the menu). If you're only using MAME and the other stuff is less important this could be worth a look.

Now that I have tried the footswitch it breaks the joystick order too, so at least I have something to test with. Although it's probable booting with any USB controller plugged in will reproduce it...

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: GRS Star Wars flight yoke issues

Post by cool_factor » Tue Apr 25, 2023 12:51 pm

I did some testing the A.M. as well with jtest:

unplug the GRS usb start cab and everything is normal

js0 gpio1
js1 gpio2
js2 xbox game pad

plugged in usb while powered on and above stays the same but:

js3 becomes what I think is mouse mode on GRS because it shows 2 axis 3 buttons and doesnt react
JS4 becomes GRS and reacts to inputs.

did sudo reboot while all was plugged in:

js0 gpio1
js1 gpio2
js2 changes to GRS and reacts to inputs
js3 xbox gamepad
js4 mouse mode of GRS

Now the fun part, the GRS has a hidden power button (on/off) I turned it off and did sudo reboot and everything returns to normal. While machine is powered up I run jstest and everything is normal, run js3 and nothing shows up, ctrlc to exit to prompt, turn on GRS, run jstest again and js3 shows as GRS, js0-2 show as what they should be. So it works. Would love to make it work without doing it this way but for now I think I'm going to add a small LED to that power button to show and I'll have a visual if its on or off. Hopefully this helps in figuring out a permanent solution.

User avatar
cool_factor
Legendary Contributor
Legendary Contributor
Posts: 332
Joined: Tue Sep 26, 2017 10:55 am
Location: Fort Worth TX

Re: GRS Star Wars flight yoke issues

Post by cool_factor » Wed Apr 26, 2023 10:26 am

Not sure if this is useful or not:

https://retropie.org.uk/forum/topic/271 ... 6838005772

https://retropie.org.uk/forum/topic/286 ... lang=en-US

They briefly mention the u360. Wondering why. May be worth the read...

Post Reply