Serial port work – linux

Comments Off
Posted by w0ep on May 5, 2012 at 7:52 pm

[Today’s run: 6.8 miles]

I recently picked up an old IBM notebook computer for use with my radio stuff.  I was able to load a version of Linux on it (the free unix-like operating system) and it seems to be working pretty well.

Today I worked on getting the serial port set up  to talk to my GPSDO.  The GPSDO writes out a message every 16 seconds.  I’d like to gather those into log files and then do some statistics work on them.

It has been quite a while since I have done much with serial ports from a linux box in a scripting environment (even longer for C programming).

I got the serial port figured out using  minicom, a terminal/modem program.  While that was working I ran ‘stty -g  < /dev/ttySx > saved.stty’ on another window (for the right ‘x’ to match my serial port). That saves the serial port settings in a file.

Then I got out of minicom.  I ran ‘stty `cat saved.stty` < /dev/ttySx’  which puts those settings back in place.  Then I could run ‘cat /dev/ttySx’ and see the logging lines showing up on the screen.  From there it was pretty easy to create a little script to write the logging to a file.  I took the opportunity to add timestamps in UTC to every log line.

I want to get the TRF logging program installed on this laptop, then I can use it for contest logging.  I don’t think it has the horsepower to use for digital modes, but time will tell.

 

 

Filed under Ham Radio
Both comments and pings are currently closed.
« Continental Divide Trail | Samson – 007 »
---------------------------------------------------

Older Posts

December 2019
S M T W T F S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031  

Archives

|