I use a special USB to serial adapter to get data from legacy hardware. Under Windows i have to set some advanced settings in order to start sending data in a way the devices can "understand" and "talk" me back. Where in linux can I modify these settings? I'm using Ubuntu 14.04 LTS/Win 7 64-bit and I know this adapter is accessible in /dev/ttyUSB0 I can even read data coming from the device but I need to properly set those attributes so the communication can continue without problems.
2 Answers
Use minicom. Install it by typing sudo apt-get install minicom
. Then run minicom -s
and configure your serial port settings in the Serial Port menu. Then select Save setup as dfl. Exit, and then run minicom. If it gives you error that you don't have permissions, try sudo minicom
. Now it is the same as Windows.
The stty
command can be used to change the parameters of a serial port in Linux, such as baud rate, number of start, stop and parity bits, and flow control options, among others.
You can find some documentation on it in the Serial HOWTO on TLDP.