Using Miniterm to connect to the Vanguard Board

As an alternative to the Vanguard Tools, we can use miniterm directly to make the connection from our terminal emulator to the Vanguard board.

The commands below use the typical port names for each OS; COM3/dev/cu.wchusbserial630 and /dev/ttyUSB0

Please note although a command may not fit on one line in your browser, it must be typed all on one line for it to be understood.

Connecting from Windows

python -m serial.tools.miniterm --raw --eol CRLF --encoding ascii COM3 115200

(note unlike on other platforms, Windows python 3 is called just python)

Connecting from Mac OS

python3 -m serial.tools.miniterm --raw --eol CR --encoding ascii /dev/cu.wchusbserial630 115200

Connecting from Linux

python3 -m serial.tools.miniterm --raw --eol CR --encoding ascii /dev/ttyUSB0 115200

Note: Linux users must have permission to access the serial port.

If the commands above do not work, visit the troubleshooting page.

Discussion

Note the differences and common features between the miniterm commands run by Windows, Mac or Linux users;

  • Common features
    • we use python3 -m to treat the serial.tools.miniterm module as a script to be run in python
    • we ask miniterm to operate in raw mode just passing the bytes straight to our terminal console, otherwise special characters could be intercepted and treated as commands by miniterm itself
    • the connection uses ASCII encoding to turn our text into bytes to be sent as pulses over the serial wire, and to turn pulses back into text.
    • the same baud rate of 115200 bits per second, which determines how fast the bit-pulses are sent and received. This is the standard speed of a Vanguard board’s serial link.
  • Differences
    • Different OSes use particular end-of-line (eol) characters.  Both Mac and Linux are systems which use the Carriage Return (CR) character to indicate the end of a line. Windows uses two characters every time, Carriage Return & Line Feed (CRLF).
    • Different OSes have different port identifier names. Windows ones are like COMX  where X is a different number for each COM port. Mac ones are like /dev.cu.wchusbserialxxx where xxx is different between different CH340 devices. Linux ones are like /dev/ttyUSBX where X is first 0, and then 1, and then 2 for each device plugged in. Note that the port your device is assigned might be different from time to time (for example if you unplug and replug very quickly, the previous name hasn’t yet been released, so a new one is given to your device).