Wednesday, April 16, 2008

Logging Serial Port Data in Linux

Serial port is usually used to log embedded device's report. This is very important to diagnose your problem.

If you're using Linux/Solaris/BSD, you can use script from this site to make serial port log with timestamp, like this:

2007-09-21,11:54:54: E0SamplingTimer fired
2007-09-21,11:54:56: E6Logged data :E67F000000FFFFFFFF0D016B00C0FF0000CC4E
2007-09-21,11:54:56: E0Data logged
2007-09-21,11:55:06: E3Packet received
2007-09-21,11:55:06: E2Download packet received
2007-09-21,11:55:06: E6Dump dataflash from time1 to time2
2007-09-21,11:55:06: E6Read data :E61F000000FFFFFFFFF9005D00C0FF0000CB4F
2007-09-21,11:55:06: E2Dump data :E20B1C7B0F5C040A1F000000FFFFFFFFF9005D00C0FF0000CB4F
2007-09-21,11:55:06: E2Sent data :E2220400000000001F000000FFFFFFFFF9005D00C0FF0000CB4F
2007-09-21,11:55:06: E2Send download protocol reply
2007-09-21,11:55:06: E2Send download protocol done

Check the details of its usage in here.

No comments: