[Xastir] Good serial port comm program for linux
Dale Seaburg
kg5lt at verizon.net
Fri Mar 20 23:01:11 EDT 2009
On Mar 19, 2009, at 11:43 PM, Dale Seaburg wrote:
> OK guys, I'm getting thoroughly frustrated with minicom. It's not
> minicom's fault, but the stupid security on the serial ports. My
> lack of linux experience is showing through. I need to be able to
> talk to my tnc until I get things ironed out and working like I
> want. I don't want to reboot into windows just to run Hyperterm
> (which works EVERY time) to help configure the tnc. I'd like to
> stay in linux. I have used minicom in years gone by, but I can't
> seem to find the right combo to get it to talk to COM1 (tty0?). If
> I don't run with sudo, I get security errors accessing just about
> any serial port I try.
>
> Help!
>
> frustrated-73's - Dale. KG5LT
>
>
A great thanks of appreciation to all who answered by cry for help.
I did get minicom to finally do what I wanted with regards to /dev/
ttyS0. As suggested, I made myself a member of the dialout group. I
also made an attempt to do something similar to the kiss-off.pl
script (called it kiss-on.pl). But, the results were inconsistent.
I would bring up xastir (to establish the port's baudrate), STOP the /
dev/ttyS0 device, execute the kiss-on.pl script in a terminal window,
then START the /dev/ttyS0 device in xastir. About half the time it
would work.
If minicom had a means of executing a script upon being started, then
I might have shortened my time to a solution. I did try using the
modem init strings in minicom, but there's no way to have it wait for
the 'cmd:' string before issuing the 'kiss on' command. Perhaps
there is, but it wasn't obvious to me. I probably just don't know
how to properly use minicom.
Then, I said, phooey, I'll do something in C myself. A quick google
search brought up "A Linux serial port test program". I slimmed it
down to just what I needed - all hard-coded for now (9600, 8N1 and /
dev/ttyS0). That did the trick! It works consistently. One caveat
though, is to run that program very shortly after turning on the
PK232. Because of the dead SRAM battery, the tnc thinks this is the
first time and it goes into a search mode after about 5 or less
seconds. If you can do the baud-rate sync during that short time,
all is OK. Once it syncs, then put it into kiss mode. The program I
modified does the baud-rate sync, wait for the cmd: prompt and put
the tnc into kiss mode.
I really didn't want to have to write/modify the C program. It's
not my favorite language. But, at least it did the job. I gotta get
a battery for this tnc!
Thanks again, guys!
Happy-73's - Dale. KG5LT
More information about the Xastir
mailing list