Teraterm Script Serial Port

13.10.2020by

Miniterm¶

  1. Aug 26, 2014  Quick demo on running a TeraTerm Script. Quick demo on running a TeraTerm Script. Brocade STP vs Port Loop Detection. Kris Occhipinti 153,293 views.
  2. I am using a Tera Term over a serial port to do some testing on a board. Recently I found out I can do some scripting in Tera Term so I have been doing research to help automate and make testing a little easier.

That'll open up the port. TeraTerm defaults to setting the baud rate at 9600 bps (8-N-1). If you need to adjust the serial settings, go up to Setup Serial Port. You'll see a window pop up with a lot of familiar looking serial port settings. Adjust what you need to and hit 'OK'. Tera term supports: citation needed Serial port connections over UART. TCP/IP (telnet, SSH1, SSH2) connections. Log replaying. Named pipe connection. IPv6 communication. VT100 emulation and selected VT200/VT300 emulation. TEK4010 emulation. File transfer protocols (Kermit, XMODEM, YMODEM, ZMODEM, B-PLUS and Quick-VAN). Scripts using the 'Tera.

Miniterm is now available as module instead of example.see serial.tools.miniterm for details.

miniterm.py
The miniterm program.
setup-miniterm-py2exe.py
This is a py2exe setup script for Windows. It can be used to create astandalone miniterm.exe.

TCP/IP - serial bridge¶

This program opens a TCP/IP port. When a connection is made to that port (e.g.with telnet) it forwards all data to the serial port and vice versa.

Teraterm Serial Greyed Out

This example only exports a raw socket connection. The next examplebelow gives the client much more control over the remote serial port.

  • The serial port settings are set on the command line when starting theprogram.
  • There is no possibility to change settings from remote.
  • All data is passed through as-is.
tcp_serial_redirect.py
Main program.

Single-port TCP/IP - serial bridge (RFC 2217)¶

Simple cross platform RFC 2217 serial port server. It uses threads and isportable (runs on POSIX, Windows, etc).

  • The port settings and control lines (RTS/DTR) can be changed at any timeusing RFC 2217 requests. The status lines (DSR/CTS/RI/CD) are polled everysecond and notifications are sent to the client.
  • Telnet character IAC (0xff) needs to be doubled in data stream. IAC followedby another value is interpreted as Telnet command sequence.
  • Telnet negotiation commands are sent when connecting to the server.
  • RTS/DTR are activated on client connect and deactivated on disconnect.
  • Default port settings are set again when client disconnects.

New in version 2.5.

rfc2217_server.py
Main program.
setup-rfc2217_server-py2exe.py
This is a py2exe setup script for Windows. It can be used to create astandalone rfc2217_server.exe.

Multi-port TCP/IP - serial bridge (RFC 2217)¶

This example implements a TCP/IP to serial port service that works withmultiple ports at once. It uses select, no threads, for the serial ports andthe network sockets and therefore runs on POSIX systems only.

  • Full control over the serial port with RFC 2217.
  • Check existence of /tty/USB0..8. This is done every 5 seconds usingos.path.exists.
  • Send zeroconf announcements when port appears or disappears (usespython-avahi and dbus). Service name: _serial_port._tcp.
  • Each serial port becomes available as one TCP/IP server. e.g./dev/ttyUSB0 is reachable at <host>:7000.
  • Single process for all ports and sockets (not per port).
  • The script can be started as daemon.
  • Logging to stdout or when run as daemon to syslog.
  • Default port settings are set again when client disconnects.
  • modem status lines (CTS/DSR/RI/CD) are not polled periodically and the servertherefore does not send NOTIFY_MODEMSTATE on its own. However it responds torequest from the client (i.e. use the poll_modem option in the URL whenusing a pySerial client.)

Requirements:

  • Python (>= 2.4)
  • python-avahi
  • python-dbus
  • python-serial (>= 2.5)

Installation as daemon:

  • Copy the script port_publisher.py to /usr/local/bin.
  • Copy the script port_publisher.sh to /etc/init.d.
  • Add links to the runlevels using update-rc.dport_publisher.shdefaults99
  • That’s it :-) the service will be started on next reboot. Alternatively runinvoke-rc.dport_publisher.shstart as root.

New in version 2.5: new example

port_publisher.py
Multi-port TCP/IP-serial converter (RFC 2217) for POSIX environments.
port_publisher.sh
Example init.d script.

wxPython examples¶

A simple terminal application for wxPython and a flexible serial portconfiguration dialog are shown here.

wxTerminal.py
A simple terminal application. Note that the length of the buffer islimited by wx and it may suddenly stop displaying new input.
wxTerminal.wxg
A wxGlade design file for the terminal application.
wxSerialConfigDialog.py
A flexible serial port configuration dialog.
wxSerialConfigDialog.wxg
The wxGlade design file for the configuration dialog.
setup-wxTerminal-py2exe.py
A py2exe setup script to package the terminal application.

Unit tests¶

The project uses a number of unit test to verify the functionality. They allneed a loop back connector. The scripts itself contain more information. Alltest scripts are contained in the directory test.

The unit tests are performed on port loop:// unless a different devicename or URL is given on the command line (sys.argv[1]). e.g. to run thetest on an attached USB-serial converter hwgrep://USB could be used orthe actual name such as /dev/ttyUSB0 or COM1 (depending on platform).

Artists, musicians, and audio professionals used it to make the sound much better than usual. Pro tool system raises your sound to the high standard. Pro Tools Torrent retain your production from fleeing. Pro tools for mac free download. It makes possible your efficiency to create music, movie recording for photos, on your studio to make sure your admiration for good work.

run_all_tests.py
Collect all tests from all test* files and run them. By default, theloop:// device is used.
test.py
Basic tests (binary capabilities, timeout, control lines).
test_advanced.py
Test more advanced features (properties).
test_high_load.py
Tests involving sending a lot of data.
test_readline.py
Tests involving readline.
test_iolib.py
Tests involving the io library. Only available for Python 2.6 andnewer.
test_url.py
Tests involving the URL feature.
Tera Term
Original author(s)T. Teranishi
Developer(s)Tera Term Project
Initial release1994; 26 years ago
Stable release
Repository
Written inC and C++ (originally Pascal)
Operating systemMicrosoft Windows
TypeTerminal emulator
LicenseBSD license
Websitettssh2.osdn.jp

Tera Term (alternatively TeraTerm) is an open-source, free, software implemented, terminal emulator (communications) program. It emulates different types of computer terminals, from DEC VT100 to DEC VT382. It supports telnet, SSH 1 & 2 and serial port connections. It also has a built-in macroscripting language (supporting Onigurumaregular expressions) and a few other useful plugins.

History[edit]

The first versions of Tera Term were created by T. Teranishi from Japan. At the time, it was the only freely available terminal emulator to effectively support the Japanese language. Original development of Tera Term stopped in the late 1990s at version 2.3, but other organizations have created variations.

In October 2002, Ayera Technologies released TeraTerm Pro 3.1.3 supporting SSH2 and added multiple other features like a built-in web server for API integration with external systems, recurring 'keep-alive' commands, and ODBC database support via the TT Macro Scripting Language. Ayera Technologies did not make their source open, but does provide limited technical support.

In 2004, Yutaka Hirata, a software designer from Japan, restarted development of the open source version of Tera Term. He added his own implementation of SSH2 and many new features on top of what was part of version 2.3.[1]

To avoid confusion with version numbers and to indicate that Tera Term developed by Yutaka was more recent than version 3.1.3 from Ayera Technologies, it was decided to give this branch of Tera Term Professional version numbers starting 4.xx.

In January 2005, Boris Maisuradze, together with Yutaka Hirata, started the TeraTerm Support forum where they answered questions from Tera Term users. Posting in this forum was the best way to suggest new features for Tera Term or propose new commands for the Tera Term Macro language. For more than 10 years the forum was hosted on LogMeTT.com website maintained by Boris Maisuradze. Boris also developed several freeware tools that became part of TeraTerm package. Later Boris decided to retire from this project. LogMeTT.com website was shut down and support forums moved to TeraTerm Project site.

Since 2007, Tera Term has been maintained by Tera Term Project (Japanese Developer team) as open source software.

Features[edit]

Tera term supports:[citation needed]

  • Serial port connections over UART.
  • TCP/IP (telnet, SSH1, SSH2) connections.
  • Log replaying.
  • Named pipe connection.
  • IPv6 communication.
  • VT100 emulation and selected VT200/VT300 emulation.
  • TEK4010 emulation.
  • File transfer protocols (Kermit, XMODEM, YMODEM, ZMODEM, B-PLUS and Quick-VAN).
  • Scripts using the 'Tera Term Language'.

Common versions[edit]

Teraterm Script Serial Port
  • 1.4 Last version supporting Win16; source available in Pascal
  • 2.3 Last version released by T. Teranishi
  • 3.1.3 Last version released by Ayera. Has issues with scroll window boundaries. Title bar identifies it as version 3.1
  • 4.xx Latest OSDN release

Teraterm Script Example

Sample images[edit]

See also[edit]

  • Telix - MSDOS era terminal

References[edit]

External links[edit]

Retrieved from 'https://en.wikipedia.org/w/index.php?title=Tera_Term&oldid=964530610'
Comments are closed.