Pages: [1]   Go Down
Author Topic: Mac Serial Applications  (Read 608 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Most places seem to recommend ZTerm for use with the Arduino when on OS X (I'm running 10.5) but it seems like ZTerm has been kinda stale for some time, and rather not fork over $ for A) a dead product and B) for working on OS hardware smiley

I was wondering if anyone used anything else. I am not fearful of running any X11 apps or even console apps... I just want something good and open source!

Ray
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6373
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I used "minicom", one of the standard open source unix things.  I think it's a standard part of the developer tool or maybe the X11 install?  Mine lives in /sw/bin, and I don't recall having to install it manually.
It works fine.


Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think /sw is the root of the fink installation tree.  It's not on my mac, and I have the developer stuff loaded.

I'm a dinosaur - I still use kermit.  It was good enough for the Commodore 64...

-j

Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6373
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could be; I do have some fink stuff installed.  It was part of the "work" linux distribution that I had used recently, so it seemed natural to use it on macos as well..

Kermit brings back memories;    Did you find macos-ready kermit, or did you have to modify/build it?

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I do have minicom installed, so I'll give that a whirl... good call smiley as for kermit.. wow that brings back memories, not all fond smiley-wink but I'll spark that one up too and see which one I like better.

I found a python serial modual which gives me all sorts of scripting capabilities that I didn't think of before, I'll report back if I have any success.

(ps, my arduino is shipping right now)

Ray
Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Did you find macos-ready kermit, or did you have to modify/build it?
Got a standalone binary from somewhere, but it's been so long I don't recall where.

-j

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Its available via macports and probably fink as well.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use screen.  

screen /dev/tty.<whatever> <baud rate>

ctrl-a k to quit.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I found a python serial modual which gives me all sorts of scripting capabilities that I didn't think of before, I'll report back if I have any success.

You can also easily do serial I/O from perl on the Mac. I have been logging some data from my Arduino with the code below. I based it heavily on a snippet I Googled...

Code:
#!/usr/bin/perl
use Device::SerialPort 0.12;

$LOGDIR    = "/Users/peterl/Projects";              # path to data file
$LOGFILE   = "plant.log";            # file name to output to
$PORT      = "/dev/tty.usbserial-A20e1evB";          # port to watch

# Serial Settings#
$ob = Device::SerialPort->new ($PORT) || die "Can't Open $PORT: $!";
$ob->baudrate(9600)   || die "failed setting baudrate";
$ob->parity("none")    || die "failed setting parity";
$ob->databits(8)       || die "failed setting databits";
$ob->handshake("none") || die "failed setting handshake";
$ob->write_settings    || die "no settings";

# Send a string to the port
$pass=$ob->write("AT");
sleep 1;

# open the logfile, and Port

open(LOG,">>${LOGDIR}/${LOGFILE}")
    ||die "can't open smdr file $LOGDIR/$LOGFILE for append: $SUB $!\n";

open(DEV, "<$PORT")
    || die "Cannot open $PORT: $_";

select(LOG), $| = 1;      # set nonbufferd mode

# Loop forver, logging data to the log file
while($_ = <DEV>){        # print input device to file
      $theTime = `date`;
      chomp($theTime);
    print LOG $theTime . " - " . $_;
}

undef $ob;
Logged

Pages: [1]   Go Up
Jump to: