Skip to content

Instantly share code, notes, and snippets.

@djbr1
Last active January 22, 2023 10:51
Show Gist options
  • Save djbr1/1ae3f822c139cd039b2cc559a29b1c21 to your computer and use it in GitHub Desktop.
Save djbr1/1ae3f822c139cd039b2cc559a29b1c21 to your computer and use it in GitHub Desktop.
emulate ATU (antenna tunner) button press on X6100
# Prerequisite: armbian and evemu-tools
# It may be difficult to install evemu-tools package on stock buildroot OS due to probably missing dependencies
# record ATU/TUNE keypress:
root@x6100:~# evemu-record /dev/input/event0 tunebutt.txt
# replay short keypress (ATU toggle on-off)
root@x6100:~# evemu-play /dev/input/event0 < ATUbutt.txt
# replay long keypress (TUNE)
root@x6100:~# evemu-play /dev/input/event0 < TUNEbutt.txt
# record/replay file contains timestamps determining keypress duration
root@x6100:~# grep -v ^# TUNEbutt.txt
N: matrix_keypad@0
I: 0019 0000 0000 0000
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 ff ff ff 3f 00 00 00 00
B: 02 00 00 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
E: 0.000001 0004 0004 0021 # EV_MSC / MSC_SCAN 21
E: 0.000001 0001 02d1 0001 # EV_KEY / BTN_TRIGGER_HAPPY18 1
E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms
E: 2.939742 0004 0004 0021 # EV_MSC / MSC_SCAN 21
E: 2.939742 0001 02d1 0000 # EV_KEY / BTN_TRIGGER_HAPPY18 0
E: 2.939742 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +2939ms
root@x6100:~# grep -v ^# ATUbutt.txt
N: matrix_keypad@0
I: 0019 0000 0000 0000
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 ff ff ff 3f 00 00 00 00
B: 02 00 00 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
E: 0.000001 0004 0004 0021 # EV_MSC / MSC_SCAN 21
E: 0.000001 0001 02d1 0001 # EV_KEY / BTN_TRIGGER_HAPPY18 1
E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms
E: 0.119792 0004 0004 0021 # EV_MSC / MSC_SCAN 21
E: 0.119792 0001 02d1 0000 # EV_KEY / BTN_TRIGGER_HAPPY18 0
E: 0.119792 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +119ms
root@x6100:~#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment