Com port data to file
HELP! I need a program (or a way) to read the com-port output of a meter, normaly it conncts to a small printer and takes ages to print out the data, which i need to copy to a spreadsheet again, this is labourious to say the least.. I am urgently looking for a way to do this directly.. Any suggestions, tips etc are welcome..
THANX! |
You are talking about a serial port such as /dev/ttyS0 (COM1 in Microsoft speak)?
It really depends on what your needs are. If you just want to log incoming data to a file, for example, your solution might be as simple as the shell command (which can be in a script): Code:
cat /dev/ttyS0 > filename Code:
cat /dev/ttyS0 The other thing to think about is configuring the port. Check the man page of stty for about a kazillion settings for the port. You, of course, need to get baud rate right. You should also be careful on your echo settings or you might get an infinite loop going with each device echoing to the other. If you want to interact with the device you might find minicom useful. If neither of these suggestions does what you want, perhaps you can flesh out your problem a little more. |
Thx!
Thanx for the tip, i'll try that this week and give you an update!....
|
All times are GMT -5. The time now is 09:20 AM. |