Emulator Exit button GPIO
-
@supernature2k Hi,
I'm replying to this old topic because I'm currently working on a project that needs such a feature. I tried your last script, I just removed GPIO code at for now to test, so here is my code:
import os import time import socket import sys # addressing information of target IPADDR = "127.0.0.1" PORTNUM = 55355 # enter the data content of the UDP packet PACKETDATA = "RESET" # initialize a socket, think of it as a cable # SOCK_DGRAM specifies that this is UDP try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) except socket.error: print 'Failed to create socket' sys.exit() #s.connect((IPADDR, PORTNUM)) # connect the socket, think of it as connecting the cable to the address location data = bytes(PACKETDATA) print("exitEmulator") print(IPADDR) print(PORTNUM) print(PACKETDATA) s.sendto(PACKETDATA, (IPADDR, PORTNUM))
So to try it, I start a retroarch game then I launch the script:
# python rpi-exit-emulator.py exitEmulator 127.0.0.1 55355 RESET
But in fact it does nothing, I'm still in the game (with no reset). Any idea ?
-
@oyyodams it's RESET, not exit
-
@substring yes that's it's supposed to do... but no reset by the way...
-
@oyyodams check on command line if you can connect to the port some netcat commands should do it
-
@substring Well I found a great doc on the wiki. But...
- I can't use netcast: nc is not include in this buildroot build (and I can't rebuild by now)
- It seems retroarch doesn't respond to any command. I tried to edit
retroarch.cfg
to addnetwork_cmd_enable = "true"
, nothing better (even after reboot)
I will not let go;)
-
@oyyodams hold the door !!!
-
Don't worry I keep up the good work, things begin to be better, news soon
-
Ok solution:
network_cmd_enable = "true"
has to be added in/recalbox/share/system/configs/retroarch/retroarchcustom.cfg
-
@oyyodams sorry I'm late...
Does it work now? -
@supernature2k yes, see my post above Thanks a lot for your scripts!