displayvasup.blogg.se

Linux serial terminal program
Linux serial terminal program










It seem Ruby's thread handling is superior to Python's.

#Linux serial terminal program serial

I wrote a serial terminal program before this one in Ruby and it used threads.

linux serial terminal program

In particular I wanted to see if I could transfer text data without errors at 115,200 baud - this repeated test helped the design.įirst and most important, a program like this really should be run on multiple threads. With the above script running on one machine and a null-modem cable between two USB-to-serial converters, I was able to figure out what my program's weaknesses were and correct them. Only make this change if the script fails. Original: /sbin/agetty -hL $baud $port $termĬhange: /usr/bin/setsid /sbin/agetty -hL $baud $port $term UPDATE: Because of changes in how "agetty" is managed, resulting from increased concerns about security, some recent Linux distributions won't run the above script any more. sbin/fuser -k /dev/ $port echo -e "\n ` date ` : Closed serial session." done While true do echo -n " ` date ` : Hosting $baud baud $term serial process on $port. Here is the Bash script for the server side: #!/bin/sh port= "ttyUSB0" & port=$1 trap "" EXIT To acquire a copy of the session text, use the program's logging feature.ĭuring testing I would set up one computer as a serial port server and another as a client, running SerialTerminal. In practical terms, this means you can't use Ctrl+C to copy text from the display. At 50 baud you can almost tell what's being sent by listening to the line noise.īecause this is a terminal program, the keyboard's output is captured and dedicated to the I/O stream, and is therefore unavailable for typical program uses. But because of the possible legacy applications for a terminal program, it also offers the slowest possible baud rate (50 baud). This terminal program offers the usual kinds of serial setup options like baud rate and port, and it is reasonably fast - I have successfully transferred text files at the highest practical speed (115,200 baud) with no data loss.

linux serial terminal program

In its most recent version the program supports ANSI cursor control, command history, line editing and display colors. Like many of my recent programs, this one uses the WxWidgets toolkit, and I designed its GUI with WxGlade. This Python program is by far the best - it has more features and is more robust in the face of unexpected circumstances. Since then I've written any number of serial terminal programs, most not very good.

linux serial terminal program

But some years ago I decided to virtualize it, intending that any handy computer could stand in for a serial terminal. Years ago I simply kept a real serial terminal around - glass screen, heavy, unreliable. I have always needed a serial terminal for one reason or another, some having to do with owning a boat, or being a radio amateur, or wanting to communicate with a shipboard satellite dish. And most real terminals (not virtual ones) communicate with a serial interface. Most people who use serial interfaces on small computers must rely on USB-to-serial adaptors, since the old-style serial connectors have vanished and few find a use for serial interfaces any more - they are slow, relatively unsophisticated, and a bit tricky to set up.īut there are a few niche applications - anything involving GPS will likely need a serial communications channel at some point.

linux serial terminal program

Figure 2: Old-style RS232 serial circuit tester Discussion










Linux serial terminal program