The MP3car.com Store The MP3car.com Blog    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > GPS

Reply
 
LinkBack Thread Tools Display Modes
Old 09-22-2005, 09:11 PM   #1
Raw Wave
 
tj!2k4's Avatar
 
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..
tj!2k4 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 09-23-2005, 02:02 AM   #2
MySQL Error
 
MatrixPC's Avatar
 
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.
__________________
2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
89 Supra Turbo P3 600E@750/Abit BE6 II, Alpine M-BUS Car2PC.
Y2K Accord Dell GX150
RoadRunner is the best FE PERIOD
EmoRebellion is a SCAMMER
MatrixPC is offline   Reply With Quote
Old 09-23-2005, 02:11 AM   #3
RoadRunner Mastermind
 
guino's Avatar
 
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."
guino is offline   Reply With Quote
Old 09-23-2005, 08:32 AM   #4
Raw Wave
 
tj!2k4's Avatar
 
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..
tj!2k4 is offline   Reply With Quote
Old 09-23-2005, 08:59 AM   #5
Confusion Master
 
Enforcer's Avatar
 
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
Enforcer is offline   Reply With Quote
Old 09-23-2005, 09:02 AM   #6
FLAC
 
PURDooM's Avatar
 
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?
__________________
Current projects: iGmod reloaded (Latest release) (put on hiatus indefinatly)

Unlimited Internet and gps tracking for $6 a month with boost mobile!

Carputer 2: www.lmaocar.com
PURDooM is offline   Reply With Quote
Old 09-23-2005, 09:20 AM   #7
Raw Wave
 
tj!2k4's Avatar
 
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"
tj!2k4 is offline   Reply With Quote
Old 09-23-2005, 09:58 AM   #8
Confusion Master
 
Enforcer's Avatar
 
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
Enforcer is offline   Reply With Quote
Old 09-23-2005, 10:07 AM   #9
Confusion Master
 
Enforcer's Avatar
 
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
Enforcer is offline   Reply With Quote
Old 09-23-2005, 11:38 AM   #10
Raw Wave
 
tj!2k4's Avatar
 
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.
tj!2k4 is offline   Reply With Quote
Old 09-23-2005, 11:53 AM   #11
Raw Wave
 
tj!2k4's Avatar
 
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.
tj!2k4 is offline   Reply With Quote
Old 09-23-2005, 11:56 AM   #12
FLAC
 
PURDooM's Avatar
 
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)
__________________
Current projects: iGmod reloaded (Latest release) (put on hiatus indefinatly)

Unlimited Internet and gps tracking for $6 a month with boost mobile!

Carputer 2: www.lmaocar.com
PURDooM is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
serial port to game port adapter wiring asif General Hardware Discussion 5 08-17-2006 05:47 PM
USB Serial Port Adapter Troubles bLindmOnkey General MP3Car Discussion 0 10-14-2004 12:29 AM
Via Mini-ITX Epia 5000 serial port not working vash General Hardware Discussion 2 08-13-2002 09:48 PM
how can I use my printer port as a serial port on win Xp babas151 General Hardware Discussion 3 04-09-2002 06:23 PM
1 serial port, 2 devices Meatballman General Hardware Discussion 7 04-16-2000 11:50 PM


All times are GMT -5. The time now is 02:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics