MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

Terminal over Serial

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Revision as of 04:34, 6 December 2022 by Barberd (talk | contribs)
Jump to navigation Jump to search

Using a CoCo as a terminal

The Color Computer can act as a terminal device either out through the bitbanger serial port or using add-on hardware such as the Deluxe RS232 Pak. In the early days, it was common to connect via a modem to communicate with remote systems, but nowadays its more common to use a null modem cable to connect to a nearby modern PC.

One will need to use terminal software. There are a variety:

RSDOS

* These packages support the RS-232 pak
** This package expects the 6551 ACIA chip to be at $FF6C instead of the standard RS-232 Pak IO base of $FF68

OS9

  • SuperComm
  • xcom9
  • osterm
  • Others (search the Archive for 'comm' and 'term')

Connecting to a Linux shell over null modem

Once one has their terminal software on the CoCo working, one will need to configure agetty to listen on the Linux machine to provide a login prompt and start a shell. One can test this with:

   sudo getty ttyUSB0

This will provide a single session and doesn't pass some control codes but is good for testing. Once its working, configure it to run getty directly by initd or the system daemon. This will vary by distribution but most modern distributions will normally support something like:

   systemctl enable serial-getty@ttyUSB0.service

followed by

   systemctl start serial-getty@ttyUSB0.service

Modify ttyUSB0 to the appropriate device for the system, such as ttyS0 or ttyUSB1.

TERM setting in Linux

Linux will generally default to a vt100 or similar terminal. Depending upon the terminal software used, this should be modified to something more appropriate:

  • dumb will work with most coco terminal software, but will not allow any manipulation of cursor positioning or screen clearing, meaning software that uses the ncurses library will not work, like vi, nano, top, etc. Technically, dumb expects an 80 column display, so even this mode may give some trouble for some terminal software.
  • pcansi will (mostly) work for Twilight terminal and other packages that sought compatibility with 90s era PC BBSs.
  • coco3 will work for many OS9-based communication packages. This termcap entry uses control codes described on page 689 of the OS-9 L2 Manual

One can adjust the terminal once in the shell with:

   export TERM=pcansi

Advanced termcap/terminfo

If one of the default termcap entries aren't working for one's chosen terminal software, one will need to find the control codes for their terminal software of choice and build an appropriate entry. This may require looking through the terminal software's documentation or contacting the creator. Use 'infocmp' to dump an existing termcap file and 'tic' to compile a new one. 'man terminfo' to get a list of the fields and their syntax.

Videotex and its descendants (Deluxe RS232 Pak and Direct Connect Modem Pak) had many control codes available; see page 7 of the Videotex manual.

Similarly, Vidtex (Compuserv's software) also had many control codes available; see page 44/Chapter 7 of the Vidtex manual

File transfers in Linux

One logged into a Linux shell, one may want to transfer files. Many terminal software packages support the XModem protocol. Use the 'rx' and 'sx' commands in the Linux CLI to transfer files via XModem.

Using a terminal (or terminal emulator software) to connect to an OS9 or NitrOS9 shell on a CoCo

Standard serial devices are:

  • /T1 the bitbanger port
  • /T2 An RS-232 Pak in the first MPI slot
  • /T3 An RS-232 Pak in the another MPI slot
  • /M1 A direct connect modem pak (or another RS232 pack modified for base IO address $FF6C) in the first MPI slot
  • /M2 A direct connect modem pak (or another RS232 pack modified for base IO address $FF6C) in another MPI slot

Depending upon the OS9/NOS9 build, this may involve loading additional modules (such as scf/sc6551.dr and scf/t2_sc6551.dd).

Configure the serial device on OS9 or NitrOS9 using the 'tuneport' and/or 'xmode' commands. One will need to match the baud rate on both sides of the connection.

Once the port is configured, start a shell on the OS9 side with:

   shell i=/T2&

Replace /T2 with whatever is appropriate for the system's configuration. This will start a shell one can access from a PC's terminal software, such as Teraterm on Windows or Miniterm/Minicom/screen on Linux.