|
 |
09-22-2005, 09:11 PM
|
#1
|
|
Raw Wave
Join Date: Oct 2004
Posts: 3,453
|
Command-line serial port logger..??
I'm looking for a strictly command-line based app to log (nmea string) data from a specified serial port to a file, but can't seem to find a freeware app that'll do this.
Everything is either GUI-driven, or costs $100. wtf. Is it really that involved??
If I had any programming skills I'd write it myself..
Does anyone have any suggestions? Thanks..
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
09-23-2005, 02:02 AM
|
#2
|
|
MySQL Error
Join Date: Sep 2003
Location: Beach City, Socal
Posts: 4,035
|
Why don't you try xport?
it may not be command line but free.
|
|
|
09-23-2005, 02:11 AM
|
#3
|
|
RoadRunner Mastermind
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 8,063
|
I've used Hyperterminal to log NMEA data so I could use it later for testing GPS navigation in RR.. if you use xport with it you can log and use the GPS at the same time.. it will be hard to find strictly command-line based software for that (although relatively easy to make one)...
__________________
Road Runner,RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
|
|
|
09-23-2005, 08:32 AM
|
#4
|
|
Raw Wave
Join Date: Oct 2004
Posts: 3,453
|
I'm using already using xport3 to split the serial port.
The reason I'm looking for a command line app is so i can run it as an automated event, where no user interaction is required, and runs more or less transparently..
|
|
|
09-23-2005, 08:59 AM
|
#5
|
|
Confusion Master
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Posts: 10,509
|
try this in a batch file
Code:
MODE COM1: baud=4800 parity=N data=8 stop=1
TYPE command > COM1
COPY COM1 text.txt
Only problem you might have is stopping it as it will continue till it receives an end of file code CTRL-Z
|
|
|
09-23-2005, 09:02 AM
|
#6
|
|
FLAC
Join Date: Jun 2005
Location: Anoka County, MN
Posts: 1,020
|
Quote: Originally Posted by Enforcer
try this in a batch file
Code:
MODE COM1: baud=4800 parity=N data=8 stop=1
TYPE command > COM1
COPY COM1 text.txt
Only problem you might have is stopping it as it will continue till it receives an end of file code CTRL-Z
The line TYPE command > COM1 looks wrong to me... thats going to try to pipe the contents of file command (if the file even exsists) into com1. Are you sure you didnt want the command echo?
|
|
|
09-23-2005, 09:20 AM
|
#7
|
|
Raw Wave
Join Date: Oct 2004
Posts: 3,453
|
hmm, an interesting approach..
here's what happens when i try to run it as a batch..
Quote:
C:\>MODE COM1: baud=4800 parity=N data=8 stop=1
Status for device COM1:
-----------------------
Baud: 4800
Parity: None
Data Bits: 8
Stop Bits: 1
Timeout: ON
XON/XOFF: OFF
CTS handshaking: OFF
DSR handshaking: OFF
DSR sensitivity: OFF
DTR circuit: ON
RTS circuit: ON
C:\>TYPE command 1>COM1
The system cannot find the file specified.
C:\>COPY COM1 text.txt
1 file(s) copied.
Another thing about the second line, is that when run in the .bat, it automatically inserts a "1" after "type command"
|
|
|
09-23-2005, 09:58 AM
|
#8
|
|
Confusion Master
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Posts: 10,509
|
actually I'm not sure what the second line is doing there.
Sorry
|
|
|
09-23-2005, 10:07 AM
|
#9
|
|
Confusion Master
Join Date: Sep 2003
Location: If you go down to the woods today, You're sure of
Posts: 10,509
|
OK option 2
get yourself a copy of QBASIC (preferably the version that let's you make an EXE (this was given away free with a lot of the earlier versions of DOS)
Code:
OPEN "com1:9600,n,8,1,CD0,CS0,DS0,RS" FOR INPUT AS #1
OPEN "textfile.txt" for output as #2
WHILE INKEY$ <> " "
INPUT #1, a$
PRINT #2, a$
WEND
CLOSE #2
CLOSE #1
END
Press <space> for it to end
|
|
|
09-23-2005, 11:38 AM
|
#10
|
|
Raw Wave
Join Date: Oct 2004
Posts: 3,453
|
Thanks for the suggestions, enforcer. I'll give that a shot when I get back home.
If that doesn't do what I need it to, I'll investigate if I can do this in Perl. I'm not 100% certain whether Perl can interface with serial ports or not, but I'm fairly certain that it's possible.
|
|
|
09-23-2005, 11:53 AM
|
#11
|
|
Raw Wave
Join Date: Oct 2004
Posts: 3,453
|
To answer my own question, it is possible to do this with Perl. That's why I love Perl. lol
Although, this specific script is tailored for logging from a serial port on a Unix box, the author states that it can be ported to Win32: http://aplawrence.com/Unix/logger.html
Once I get this done I should be able to create .exe version of it.
|
|
|
09-23-2005, 11:56 AM
|
#12
|
|
FLAC
Join Date: Jun 2005
Location: Anoka County, MN
Posts: 1,020
|
Qbasic is going to be a processor hog on any windows NT based systems. (2000, XP)
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:32 AM.
| |