Created
January 21, 2026 12:09
-
-
Save uyjulian/ad41f2954a5144dc295ff6c6e4d99fa1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Setting up a MCE (Media Center Edition)/eHome/RC6 remote | |
| # receiver/tranceiver/IR blaster on Linux for PS2 power/reset control | |
| # Instructions tested on Ubuntu 24.04.3 LTS | |
| # Known working devices: | |
| # Sony PCVA-IR6U | |
| # Sony PCVA-IR8U | |
| # Other devices (untested): | |
| # HP 5188-1667 | |
| # HP 5187-4593 | |
| # HP 5070-2584 | |
| # Microsoft 1040 | |
| # Ortek VRC-1100 | |
| # Rosewill IR605 | |
| # If the device has mono plugs on the back (most likely two of them), | |
| # make sure you plug in a IR transmitter/IR blaster into one of them. | |
| sudo apt-get install lirc ir-keytable lirc-compat-remotes lirc-drv-irman | |
| sudo sed -i -e 's/devinput/default/' /etc/lirc/lirc_options.conf | |
| sudo cat > /etc/lirc/lircd.conf.d/ps2rm.lircd.conf <<EOF | |
| begin remote | |
| name PS2 | |
| bits 20 | |
| flags SPACE_ENC|CONST_LENGTH | |
| eps 30 | |
| aeps 100 | |
| header 2432 581 | |
| one 1212 581 | |
| zero 614 581 | |
| gap 44853 | |
| min_repeat 2 | |
| toggle_bit 0 | |
| begin codes | |
| RM_PS2_EJECT 0x00068B5B | |
| RM_PS2_RESET 0x000E8B5B | |
| RM_PS2_POWERON 0x00074B5B | |
| RM_PS2_POWEROFF 0x000F4B5B | |
| RM_PS2_NOLIGHT 0x000AEB5B | |
| end codes | |
| end remote | |
| EOF | |
| sudo systemctl stop lircd.socket lircd.service | |
| sudo systemctl start lircd.socket lircd.service | |
| # At this point root should no longer be needed | |
| mode2 --list-devices | |
| # Make sure transceiver is listed | |
| ir-keytable -p sony | |
| irsend SEND_START PS2 RM_PS2_NOLIGHT | |
| # check if power LED on PS2 turns off | |
| irsend SEND_STOP PS2 RM_PS2_NOLIGHT | |
| # power LED on PS2 should turn back on | |
| irsend SEND_ONCE PS2 RM_PS2_NOLIGHT | |
| # power LED on PS2 should blink briefly | |
| irsend SEND_ONCE PS2 RM_PS2_POWERON | |
| # PS2 should turn on | |
| irsend SEND_ONCE PS2 RM_PS2_RESET | |
| # PS2 should reset | |
| irsend SEND_ONCE PS2 RM_PS2_POWEROFF | |
| # PS2 should turn off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment