Contents
  1. 1. setup minicom
  2. 2. useful minicom wrapper
  3. 3. minicom sysrq

Set up minicom to look into the debug machine

setup minicom

  1. Entry root user

    1
    $ su -
  2. Set minicom

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # minicom -s
    minicom: WARNING: configuration file not found, using defaults
    Device /dev/modem access failed: No such file or directory.
    (it means need configuration file for minicom)
    ………………………………[configuration]……………………………………
    …………………… Filename and paths …………………………
    …………………… File transfer and protocols …………………………
    …………………… Serial port setup …………………………
    …………………… Modem and dialing …………………………
    …………………… Screen and keyboard …………………………
    …………………… Save setup as df1 …………………………
    …………………… Save setup as…… …………………………
    …………………… Exit …………………………
    …………………… Exit from minicom …………………………
    ……………………………………………………………………………………
  3. Modify serial port setup as follow:

    1
    2
    3
    4
    5
    6
    7
    8
    A —  Serial Device  :    /dev/ttyS0
    B — lockfile Location : /var/lock
    C — Calling Program :
    D — Callout Program:
    E — Bps/par/Bits : 115200 8N1
    F — Hardware Flow Control : NO
    G — Software Flow Control : NO
    Change with setting?
  4. Set Modem and dialing as follow:

    1
    2
    3
    delete A — initing string ……:
    B — Reset string ……:
    K — Hang-up string ……
  5. Select Save as df1, it will be saved as default configuration.

  6. Restart from minicom

  7. Notice:

    • sometime even the setting is right, you cannot open the minicom with error as follow:

      1
      Device /dev/ttys0 access failed : permission denied
    • Maybe it is reason that need to add your group(junwei-zhang) to the uucp group(CentOS root group name, other system ‘dialout’)

      1
      2
      3
      4
      $ sudo usermod -a -G uucp junwei-zhang
      -a --append append the user to the specify group with -G
      or
      $ sudo gpasswd -a junwei-zhang uucp
    • Maybe it also does not work, you can add junwei-zhang to tty device

      1
      2
      3
      4
      5
      6
      7
      $ gpasswd -a junwei-zhang tty
      or
      $ sudo usermod -a -G tty junwei-zhang
      or
      $ sudo vim /etc/group
      append junwei-zhang to tty, as follow:
      tty:x:5:junwei-zhang
    • /dev/ttyS0 permission denied

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      pax> ls -al /dev/ttyS0
      crw-rw---- 1 root dialout 4, 64 Mar 23 21:00 /dev/ttyS0
      ^^^^^^^
      pax> echo xyzzy >/dev/ttyS0
      bash: /dev/ttyS0: Permission denied

      pax> id -Gn
      pax cdrom floppy audio dip video plugdev netdev bluetooth scanner

      pax> sudo adduser pax dialout
      [sudo] password for pax:
      Adding user pax to group dialout
      Done.

      << Restart done here to ensure new group picked up >>

      pax> id -Gn
      pax dialout cdrom floppy audio dip video plugdev netdev bluetooth scanner

useful minicom wrapper

  • useful minicom wrapper for store minicom log automatically.
    • refer to repo/minicom_wrapper.sh
    • set below in ~/.bashrc
      1
      alias minicom='/usr/local/bin/minicom_wrapper.sh'

minicom sysrq

  • 在minicom中,触发SysRq有时候可以帮助我们进行调试.

  • 查看当前所有线程栈使用情况

    1
    ctrl+a f t
  • 查看帮助

    1
    ctrl+a f h
Contents
  1. 1. setup minicom
  2. 2. useful minicom wrapper
  3. 3. minicom sysrq