Re: RS-232 Digital thermometer - interface and driver

From: Frank da Cruz (fdc_at_columbia.edu)
Date: 05/14/04


Date: 14 May 2004 16:04:38 GMT

On 2004-05-13, Keith <keith_rhodes@yahoo.com> wrote:
:...
: Thanks for the ideas. I'll have a look at what I've got available. I
: think that at least minicom and gkermit should be there.
:
Not G-Kermit; the one you need C-Kermit:

  http://www.columbia.edu/kermit/ckermit.html

G-Kermit does not make connections, does not have a scripting language, etc.

C-Kermit should be included with every Linux distribution, but sometimes
it can be hard to find. For example, with Red Hat 9, you have to choose
Custom Install and then include the Applications/Communications group.

Minicom, last time I looked, does not include any automation or application-
building features; it's strictly interactive.

:> Once you get that working, all you need to do is write a simple
:> C program to send commands and display results... ;-)
:
: Or a simple C program that can be invoked as a command, so that I can
: use it in a bash script :-)
:
Or the entire application can be written as a Kermit script, without having
to coordinate with Bash, Expect, Perl, or anything else, and you don't
have to write any C code.

Btw, the disadvantage of programming applications like this yourself in C is
not just that you have to learn all the nutty APIs for accessing serial ports,
but that they are different for every operating system, including every
variation of Unix (Linux, BSD, AIX, Solaris, HP-UX, etc), so your application
won't be portable at all, should it need to be moved or shared with others.
Also, it won't be transport independent, in case your device is moved from a
serial port to, say, a Telnet-accessible reverse terminal server.

Kermit handles all the I/O for you in a transparent manner, and lets you
concentrate on the specifics of the problem at hand -- the commands and
responses of the device. The Kermit script you write to control the device
can move from Linux to BSD to Solaris to VMS to Windows to OS/2, etc, and
the only change required would be the device name. It can be moved from
a serial port to a network device and again, only minimal changes are needed.

I might have mentioned earlier that we keep a big library of Kermit scripts
for people to look at as examples:

  http://www.columbia.edu/kermit/ckscripts.html

If you write your thermometer application in Kermit language, you might
want to contribute it to the library.

- Frank



Relevant Pages

  • Re: RS-232 Digital thermometer - interface and driver
    ... think that at least minicom and gkermit should be there. ... > C-Kermit should be included with every Linux distribution, ... > serial port to, say, a Telnet-accessible reverse terminal server. ... The Kermit script you write to control the device ...
    (comp.os.linux.misc)
  • Re: [SLE] Terminal Commands
    ... > terminal program to talk to a router I have hooked up on my serial port ... What commands do I use to connect to a Comm port? ... Try to use "minicom" for the first time, ...
    (SuSE)
  • Re: How to make minicom read AT commands from a file
    ... RK> I cannot find this in the minicom man page. ... RK> AT commands from a file to a serial port device. ... http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows ...
    (comp.os.linux.misc)
  • Re: How to make minicom read AT commands from a file
    ... RK> I cannot find this in the minicom man page. ... RK> AT commands from a file to a serial port device. ... Besides 'kermit', which has already being suggested (and is what I use ...
    (comp.os.linux.misc)
  • Re: monitoring users.....
    ... then a tail -f on $FILE, and grep on commands I donīt want them to use, ... >>>make their login shell a kermit script. ... >> and you can even intercept commands to prevent such problems. ...
    (comp.os.linux.security)