From d332a99154945cfebadbf01b56f6033467e1c5ef Mon Sep 17 00:00:00 2001 From: Brian Woods Date: Mon, 6 Feb 2023 19:50:14 -0500 Subject: init push Added: firejail - just scripts for firejail options l2w_snd - piping sound from linux to windows over the network misc_scripts - misc scripts.... proton_sieve - proton sieve file for mainbox sorting sys_ctrl - system control scripts --- sys_ctrl/xentest-power_short | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 sys_ctrl/xentest-power_short (limited to 'sys_ctrl/xentest-power_short') diff --git a/sys_ctrl/xentest-power_short b/sys_ctrl/xentest-power_short new file mode 100755 index 0000000..a05c352 --- /dev/null +++ b/sys_ctrl/xentest-power_short @@ -0,0 +1,21 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2023 Brian Woods +# SPDX-License-Identifier: GPL-2.0-or-later + +# Uses a "NOYITO 2-Channel Micro USB Relay" connected to a PC's power +# switch to remotely press the button. This is the short press. + +uart=$( find_uart ch341-uart ) + +# sets correct baud rate +stty 9600 -F "$uart" + +# enable +echo -en '\xa0\x01\x01\xa2' > "$uart" +echo -en '\xa0\x02\x01\xa3' > "$uart" + +sleep 1 + +# disable +echo -en '\xa0\x01\x00\xa1' > "$uart" +echo -en '\xa0\x02\x00\xa2' > "$uart" -- cgit v1.2.3