SM8550: Set gamepad as fake xbox for AYANEO devices

This commit is contained in:
tiopex
2025-09-18 14:19:07 +02:00
parent 57cf10c23e
commit 24d044b948
4 changed files with 8 additions and 9 deletions

View File

@@ -7,12 +7,9 @@
SERIAL_DEVICE="/dev/ttyHS0"
# Open serial device
exec 20<>$SERIAL_DEVICE
stty -F $SERIAL_DEVICE 115200 -opost -isig -icanon -echo
stty -F $SERIAL_DEVICE 115200 -clocal -opost -isig -icanon -echo
# Send frame to switch gampead to fake xbox 360 controller
printf "\xe7\x55\x05\x01\x00\x00\x00\x00\x00\x5b\xed" > /dev/ttyHS0
printf "\x35\x35\x30\x35\x30\x31\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" > /dev/ttyHS0
# Close serial device
exec 20>&-
printf "\xe7\x55\x05\x01\x00\x00\x00\x00\x00\x5b\xed" >$SERIAL_DEVICE
sleep 0.1
printf "\x35\x35\x30\x35\x30\x31\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" >$SERIAL_DEVICE

View File

@@ -0,0 +1 @@
../AYANEO Pocket ACE/020-set-xbox-gamepad

View File

@@ -0,0 +1 @@
../AYANEO Pocket ACE/020-set-xbox-gamepad

View File

@@ -8,8 +8,8 @@ SERIAL_DEVICE="/dev/ttyHS0"
# Display usage if wrong parameters
if [ $# -lt 4 ]; then
echo "Usage: $0 <mask_hex> <R> <G> <B>"
echo "Example: $0 0F 255 0 0"
echo "Usage: $0 <BRIGHTNESS> <R> <G> <B>"
echo "Example: $0 255 255 0 0"
exit 1
fi