commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
I had a hard time in finding the correct settings to get reasonable output from a coin selector which sends its data over a serial line. In the end, minicom came to the rescue and pointed me on the right track.
So, if you need to do something similar, these settings may help you.
Replace ttyUSB0 with your device file, 9600 with your baud rate, 5 with your read timeout (10ths of a second), and 1 with the minimum numbers of characters you want to read.
You can then open the device file like you are used to do, example:
DATA="`xxd -ps -l 5 \"$DEV\"`"
There are 3 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.