SW_DevTerminal - fablab-wue/piTelex GitHub Wiki

SW_DevTerminal

Description

Allows to connect serial terminals (printers, displays,POS devices,...) with serial interface.

Requires more text here ---> JKde ????

Requirements / Limitations

Requires python module serial

Command line arguments

None

Config file parameters

Parameter Type/Range Default Comment
auto_CRLF pos. integer 0 auto-linebreak after # chars
baudrate pos. integer 300 must be within the range of supported values for the serial port
bytesize pos. integer 8 must be within the range of supported values for the serial port
dsrdtr boolean false select DSR/DSR hardware handshake
parity string "N" parity bit: "none", "mark", "space",...
portname string "/dev/ttyUSB0" serial port used
replace_char dictionary empty replace characters before output
replace_esc dictionary empty replace ESC-Commands before output
RS485 boolean false use RS485 protocol
rtscts boolean false select RTS/CTS hardware handshake
send_only boolean false device cannot send input (Display, printer)
show_BuZi boolean false same as in screen
show_capital boolean false same as in screen
show_ctrl boolean true same as in screen
show_info boolean false same as in screen
stopbits pos. integer 1 must be within the range of supported values for the serial port
xonxoff boolean false select XON/XOFF software handshake

Example config file entries

# Terminal FULL EXAMPLE
        # requirements: pyserial (apt install python3-serial)
        "Terminal FULL EXAMPLE": {
          "type": "terminal",
          "enable": false,
          "portname": "/dev/ttyS0",    # port name. On Windows e.g. COM3. On Lin
ux e.g. /dev/ttyUSB0 or /dev/ttyS0
          "baudrate": 300,
          "bytesize": 8,
          "stopbits": 1,
          "parity": "N",
          "dsrdtr": false,
          "rtscts": false,
          "xonxoff": false,
          "RS485": false,
          "show_BuZi": true,
          "show_ctrl": true,
          "show_info": false,
          "show_capital": false,
          "send_only": false,
          "auto_CRLF": 0,              # number of chars in a line before CR LF
          "init": "[0C][1B 5F 00][1B 12] -= piTelex VFD =-\r\n",   # clear displ
ay   cursor off   vert. scroll
          "replace_char": {
            "\r": "[AE]",              # WR
            "\n": "[F0]",              # ZL
            " ":  "_"                  # space
          },
          "replace_esc": {
            "ZZ": "[0C]"               # clear display on sleep mode
          }
        },

More configuration examples are provided in the telex.json example files in your piTelex' documentation subdirectory.