Recipe for MCP Digi Serial Server

  • VM in proxmox: 20 GB root, 4 CPU, 2048 MB RAM (in pve)
  • base netinst install of stretch - deselect everything from tasksel
    • hostname digitest – domain mcp.lcl
    • root: 20 GB, noatime+discard
    • swap: remainder (1.5 GB)
    • opt out of popcon, deselect everything from tasksel
  • > /etc/motd
  • apt-get --no-install-recommends install aptitude
  • aptitude --without-recommends install ssh libpam-systemd ncurses-term && aptitude markauto libpam-systemd ncurses-term # this avoids krb5-locales, tcpd, xauth (this will pull in dbus, but that's okay)
  • aptitude install net-tools man-db less fbset screen rsync psmisc file patch ethtool strace tcpdump vim bzip2 xz-utils netcat
  • aptitude --without-recommends install nmap
  • aptitude --without-recommends install dnsutils
  • adduser tdobes adm
  • adduser tdobes systemd-journal
  • aptitude install dbus # this is pulled in by ssh, but leave it here just-in-case
  • mkdir -p /etc/systemd/system/getty\@tty1.service.d
    echo '[Service]' > /etc/systemd/system/getty\@tty1.service.d/noclear.conf
    echo 'TTYVTDisallocate=no' >> /etc/systemd/system/getty\@tty1.service.d/noclear.conf
  • sed -i -e 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet panic=5"/g' /etc/default/grub && update-grub
  • aptitude --without-recommends install sshfs
  • aptitude install lsof sysstat
  • aptitude install build-essential
  • aptitude --without-recommends install dkms linux-headers-amd64 && aptitude markauto linux-headers-amd64
  • aptitude install libssl1.0-dev libncurses-dev
  • Figure out if EL160 is running FAS or RealPort firmware. (We want RealPort, as that's what has a modern-ish driver available.) Run nmap to determine the ports on which the EL160 is listening: nmap -T4 -v (FAS listens on ports 513 and 10001)
  • Boot console configuration (if needed):
  • Look for appropriate driver/firmware download URL's on the Digi site: or (use with wget and substitute in appropriate version numbers below)
  • wget # this translates to driver 1.9-38
    wget # this translates to firmware 1.6
    tar -xzf 81000137_Y.tgz -C /usr/src/
    sed -i.orig -e 's/^CFLAGS/EXTRA_CFLAGS/' /usr/src/dgrp-1.9/
    cd /usr/src/dgrp-1.9
    # putting EOF in single quotes below avoids variable substitution
    ( cat <<'EOF'
    MAKE[0]="LINUX_KERNEL_VERSION=$kernelver make"
    ) > /usr/src/dgrp-1.9/dkms.conf
    cd -
    dkms add -m dgrp -v 1.9
    dkms build -m dgrp -v 1.9 # this results in "bad exit status: 2" for every "cleaning build area" attempt -- haven't investigated why
    dkms install -m dgrp -v 1.9
  • modprobe dgrp
    sed -i.fullpackage -e 's/FULLPACKAGE = FULLPACKAGE/#FULLPACKAGE = FULLPACKAGE/g' /usr/src/dgrp-1.9/Makefile
    cd /usr/src/dgrp-1.9
    make install
    # they want you do to make postinstall, but we'll do that stuff manually so it's less messy
    cd -
    update-rc.d dgrp_daemon defaults
    update-rc.d dgrp_ditty defaults
    mv /tmp/dgrp/10-dgrp.rules /etc/udev/rules.d/10-dgrp.rules
    ln -s /usr/bin/dgrp/config/dgrp_cfg_node /usr/local/bin/dgrp_cfg_node
    ln -s /usr/bin/dgrp/config/dgrp_gui /usr/local/bin/dgrp_gui
    ln -s /usr/bin/ditty-rp /usr/local/bin/ditty
    ln -s /usr/bin/dinc.dgrp /usr/local/bin/dinc
    # it's unbelievably stupid that I have to do this, but putting this here will at least make stuff discoverable
    mkdir -p /etc/dgrp
    ln -s /usr/bin/dgrp/config/file_locations /etc/dgrp/
    ln -s /etc/ /etc/dgrp/
    ln -s /usr/bin/dgrp/config/ditty.commands /etc/dgrp/
    # setting up a static IP on the EL160:
    dgipserv 00-a0-e7-11-22-33
    # maybe this is the firmware upgrade syntax?  apparently you can't do this without also setting a static IP:
    dgipserv -firmware ~/80007013_E.bin 00-a0-e7-11-22-33
    # (then power-cycle the EL160 - yes, really)
    ### add commands here to set up with dgrp_cfg_node
    # ID -> "A RealPort ID consists of one or two alphanumeric characters. The underscore character may be used in the ID."
    # be very verbose, init (set up config file, start device, start daemon), ID=c1, IP is pulled from DNS (only at time of command execution - use static IP's), 16 ports
    dgrp_cfg_node -v -v init c1 `host -4 digi-el160-1.mcp.lcl | cut -d ' ' -f 4` 16
    # with encryption:
    dgrp_cfg_node -v -v init c1 `host -4 digi-el160-1.mcp.lcl | cut -d ' ' -f 4` 16 -e always
    # on a different port:
    dgrp_cfg_node -v -v init c1 `host -4 digi-el160-1.mcp.lcl | cut -d ' ' -f 4` 16 -p 1234
    # on a different port and encrypted port:
    dgrp_cfg_node -v -v init c1 `host -4 digi-el160-1.mcp.lcl | cut -d ' ' -f 4` 16 -p 1234 -e always -q 12345
    # delete node
    dgrp_cfg_node -v -v uninit c1
    # checking status:
    cat /proc/dgrp/nodeinfo
    cat /proc/dgrp/config
    /etc/init.d/dgrp_daemon start
    /etc/init.d/dgrp_ditty start
  • for upgrades (before re-running stuff above):
    dkms remove -m dgrp -v 1.9 --all
    rm -r /usr/src/dgrp-1.9

See also:

The Arch Linux PKGBUILD for this does a cleaner install: (maybe can borrow some of the process from there to clean this up a bit since the Digi-provided make install is just a mess)

Redirecting serial ports via. RFC 2217

  • aptitude install sredird # (there's also ser2net and an implementation in the python-serial module)
  • aptitude install cyclades-serial-client # this is the opposite – turns RFC 2217 into a PTY

Console server

  • aptitude install conman # I'll try this one first, I guess
  • aptitude install freeipmi-tools # to do other IPMI stuff - not sure if needed yet

Options include:

Digi EL160 wiring diagrams

computer/mcp_digi_serial_server.txt · Last modified: 2018/06/28 17:20 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS