PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:network:home-cheap-serial-console-server:home-cheap-serial-console-server

This is an old revision of the document!


Home Cheap Serial Console Server

  1. Many Ports USB Hub
  2. Many USB Serial Console Cable RJ45
  3. Cheap laptop

Usage

con R1

to quit screen: C-t :quit

Files

.screenrc
# Escape key is C-t, literal is a
escape ^Ta
.tmux.conf
# change prefix Ctrl+<Backslash>
set -g prefix 'C-\'
 
# Unbind default key prefix
unbind C-b
 
# Decrease Key Stroke Delay
set -sg escape-time 1
 
bind | split-window -h \; select-layout even-horizontal
bind - split-window -v \; select-layout even-vertical
bind h select-layout even-horizontal
bind v select-layout even-vertical
bind e setw synchronize-panes on
bind E setw synchronize-panes off
 
unbind %
bind-key % split-window -h -c "#{pane_current_path}"
unbind '"'
bind-key '"' split-window -v -c "#{pane_current_path}"
 
# split pane vertically.
bind v split-window -h -c "#{pane_current_path}"
 
# split pane horizontally.
bind s split-window -v -c "#{pane_current_path}"
 
# preserve current directory
bind c new-window -c "#{pane_current_path}"
 
# Plugins
set -g @plugin 'tmux-plugins/tpm'
 
# Initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
 
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
 
#===================================
# Auto start tmux and restore
#===================================
 
# auto start terminal
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
 
# auto restore tmux
set -g @continuum-restore 'on'
/usr/local/bin/con
#!/bin/bash
 
case $1 in
  "R1")
    # R1
    devname=tty.usbserial-AI0388SG
          ;;
  "R2")
    # R2
    devname=tty.usbserial-AI038TTH
          ;;
  "R5")
    # R5
    devname=tty.usbserial-A504CVAJ
          ;;
  "DSW1")
    # DSW1
    devname=tty.usbserial-AL00LMJ1
          ;;
  "DSW2")
    # DSW2
    devname=tty.usbserial-A504APRK
          ;;
  "ASW1")
    # ASW1
    devname=tty.usbserial-AI038TTZ
          ;;
  "ASW2")
    # ASW2
    devname=tty.usbserial-A504CU6I
          ;;
  "ASW3")
    # ASW3
    devname=tty.usbserial-FTGNW2EB
          ;;
  "ASW101")
    # ASW101
    devname=tty.usbserial-A103NTFZ
          ;;
  "ASW201")
    # ASW201
    devname=tty.usbserial-A504AOKI
          ;;
  "ASW202")
    # ASW202
    devname=tty.usbserial-A504AQ7R
          ;;
  *)
    :
          ;;
esac
 
screen /dev/${devname}
tech/network/home-cheap-serial-console-server/home-cheap-serial-console-server.1520129303.txt.gz · Last modified: 2018/03/04 11:08 by wnoguchi