Freeplaytech Forum

Full Version: l2/r2 analog stick board
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
(08-07-2021, 08:40 AM)OnlyCatapults Wrote: [ -> ]
(07-27-2021, 03:01 PM)OnlyCatapults Wrote: [ -> ]Okay, we're making progress, everything is working now except my L2/R2.  Analog, face buttons.  Everything else is great!

Interestingly, it seems I'm able to assign the L2/R2 buttons in the actual make config, but after I run `gpio readall` post setup, they're not showing as being pressed at all.

I've attached 3 files now:
  • The readout before L2/R2 was pressed.
  • The same readout after both have been pressed and held in.
  • The contents of `/mk_arcade_joystick.conf`

Thanks again so much for your help with this.

Hey, bumping.  Still haven't quite figured this issue out, if anybody is willing to help me.
I didn't notice this before. It's good that you bumped. Check your mk_arcade_joystick.conf file and look at the gpio=4,17,6,5,19,26,16,18,23,24,15,14,-20,-43,-42,-1,-1,-1,-1,-1,-1 piece.

The -20 is okay.  That's normal, as the power button is wired differently than all the others.
The -43 and -42 aren't good if you're using our hardware.
Try changing the whole thing to this:
gpio=4,17,6,5,19,26,16,18,23,24,15,14,-20,43,42,-1,-1,-1,-1,-1,-1
I hope that'll fix L2/R2. 

Try that and post about what is still left to fix.
All seems to be working!

Flavor, I really can't thank you enough. I appreciate your patience and guidance, sincerely.
Running into this error when building from image `Freeplay_CM3_20051201`



Creating symlink /var/lib/dkms/mk_arcade_joystick_rpi/0.1.6.3/source ->
                 /usr/src/mk_arcade_joystick_rpi-0.1.6.3

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
mk_arcade_joystick_rpi already present in /etc/modules
You may need to edit /etc/modules by hand

/etc/modprobe.d/mk_arcade_joystick.conf exists and contains options for mk_arcade_joystick_rpi
Already contain lines for v0.1.5.10+ of the driver

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.98-v7+/modules.dep.bin'
modprobe: FATAL: Module mk_arcade_joystick_rpi not found in directory /lib/modules/4.14.98-v7+
It is recommended that you run 'sudo nano /etc/modprobe.d/mk_arcade_joystick.conf' to set up desired parameters.
0


After reboot none of the controller inputs are registered (i.e. can't navigate EmulationStation, for example) and WiFi doesn't connect so can't SSH in.

Any ideas/thoughts on this?
(01-21-2022, 10:18 AM)abd333 Wrote: [ -> ]Running into this error when building from image `Freeplay_CM3_20051201`



Creating symlink /var/lib/dkms/mk_arcade_joystick_rpi/0.1.6.3/source ->
                 /usr/src/mk_arcade_joystick_rpi-0.1.6.3

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
mk_arcade_joystick_rpi already present in /etc/modules
You may need to edit /etc/modules by hand

/etc/modprobe.d/mk_arcade_joystick.conf exists and contains options for mk_arcade_joystick_rpi
Already contain lines for v0.1.5.10+ of the driver

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.98-v7+/modules.dep.bin'
modprobe: FATAL: Module mk_arcade_joystick_rpi not found in directory /lib/modules/4.14.98-v7+
It is recommended that you run 'sudo nano /etc/modprobe.d/mk_arcade_joystick.conf' to set up desired parameters.
0


After reboot none of the controller inputs are registered (i.e. can't navigate EmulationStation, for example) and WiFi doesn't connect so can't SSH in.

Any ideas/thoughts on this?

Hey abd333,

Would you take a look at this thread, and see if you think it's likely the same issue?  I think it seems like the same.  If so, this may be some new issue.  Please reply there.

https://forum.freeplaytech.com/showthread.php?tid=5292

I'd be curious to know what steps lead you to this.  I think there is something happening here where the kernel and the kernel source code headers get out of sync.  Then, you can't build the mk_arcade driver.  

Thanks,
Ed
(01-22-2022, 06:39 AM)Flavor Wrote: [ -> ]
(01-21-2022, 10:18 AM)abd333 Wrote: [ -> ]Running into this error when building from image `Freeplay_CM3_20051201`



Creating symlink /var/lib/dkms/mk_arcade_joystick_rpi/0.1.6.3/source ->
                 /usr/src/mk_arcade_joystick_rpi-0.1.6.3

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
mk_arcade_joystick_rpi already present in /etc/modules
You may need to edit /etc/modules by hand

/etc/modprobe.d/mk_arcade_joystick.conf exists and contains options for mk_arcade_joystick_rpi
Already contain lines for v0.1.5.10+ of the driver

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.98-v7+/modules.dep.bin'
modprobe: FATAL: Module mk_arcade_joystick_rpi not found in directory /lib/modules/4.14.98-v7+
It is recommended that you run 'sudo nano /etc/modprobe.d/mk_arcade_joystick.conf' to set up desired parameters.
0


After reboot none of the controller inputs are registered (i.e. can't navigate EmulationStation, for example) and WiFi doesn't connect so can't SSH in.

Any ideas/thoughts on this?

Hey abd333,

Would you take a look at this thread, and see if you think it's likely the same issue?  I think it seems like the same.  If so, this may be some new issue.  Please reply there.

https://forum.freeplaytech.com/showthread.php?tid=5292

I'd be curious to know what steps lead you to this.  I think there is something happening here where the kernel and the kernel source code headers get out of sync.  Then, you can't build the mk_arcade driver.  

Thanks,
Ed

Hey Ed, thanks for linking that thread! You were correct, this was indeed the root issue. Here are the exact steps that gave me a working solution:

1. Fresh install of IMAGE=Freeplay_CM3_20051201

2. SSH and do: `cd ~/Freeplay/mk_arcade_joystick_rpi/; make config`. This SUCCEEDS -- device recognizes all buttons including L2+R2. Here is relevant stdout snippet:

[L2] button bind on pin 43
, reversed logic
[R2] button bind on pin 42
, reversed logic
After system reboots, L2+R2 buttons are not recognized in EmulationStation controller config or Retroarch input config -- after reading snippet it occured to me this is to be expected due to "reverse logic". 

3. There was mention of this issue a few pages back in this thread so i edited `/etc/modprobe.d/mk_arcade_joystick.conf` to flip signs: -43 -> 43 , -42 -> 42  to give me a file like:

options mk_arcade_joystick_rpi map=4 hkmode=1 gpio=4,17,6,5,19,26,16,18,23,24,15,14,-20,43,42,-1,-1,-1,-1,-1,-1

4. After a reboot, L2+R2 buttons are recognized in ES controller config (interestingly, they weren't recognized in Retroarch until i performed another reboot after setting controller config in ES)

5. Success! L2+R2 buttons now correctly configured Smile
Pages: 1 2 3 4 5 6 7