mirror of
https://github.com/HerrCraziDev/dotfiles.git
synced 2026-04-20 14:34:21 +02:00
Serial console via USB
This commit is contained in:
5
.aliases
5
.aliases
@@ -29,3 +29,8 @@ alias reload='source ~/.termrc'
|
|||||||
alias ssj="ssh -J pi@bst1.chenco.dev"
|
alias ssj="ssh -J pi@bst1.chenco.dev"
|
||||||
|
|
||||||
#alias mc-install-plugin='echo "Installing $2"; echo "Done !"'
|
#alias mc-install-plugin='echo "Installing $2"; echo "Done !"'
|
||||||
|
|
||||||
|
sm() {
|
||||||
|
tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
11
.termrc
11
.termrc
@@ -29,9 +29,18 @@ if [ -n "$WSLENV" ] ; then
|
|||||||
|
|
||||||
# Load SSH keychain
|
# Load SSH keychain
|
||||||
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
|
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
|
||||||
source $HOME/.keychain/$HOST-sh
|
source "$HOME/.keychain/$HOST-sh"
|
||||||
|
|
||||||
# Enable entr workaround for incomplete inotify support on WSL
|
# Enable entr workaround for incomplete inotify support on WSL
|
||||||
export ENTR_INOTIFY_WORKAROUND=1
|
export ENTR_INOTIFY_WORKAROUND=1
|
||||||
|
|
||||||
|
# Connect serial console port if found
|
||||||
|
if [ -z "$_SERIAL_INIT" ] ; then
|
||||||
|
source "$HOME/.usbipd"
|
||||||
|
echo "Connecting serial port... (device $USB_SERIAL_HWID)"
|
||||||
|
usbipd.exe wsl attach --hardware-id $USB_SERIAL_HWID
|
||||||
|
usbipd.exe wsl list
|
||||||
|
export _SERIAL_INIT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user