First, let's figure out the path to our serial device. Ubuntu typically places these devices at /dev/ttyUSB#. Use the following command to determine the appropriate number of your device.
[code gutter="0"]$ ls /dev/ttyUSB*[/code]
Now we'll install Minicom to get started.
[code gutter="0"]$ sudo apt-get install minicom[/code]
Once that's complete, we'll need to configure Minicom so that it's using the correct port. To do this, run the command below.
[code gutter="0"]$ minicom -s[/code]
You'll be prompted with a configuration menu. Arrow down to "Serial port setup" and press enter.
[code gutter="0"]+--------------------------------------------------------+
| A - Serial Device : /dev/ttyUSB0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : Yes |
| G - Software Flow Control : No |
| |
| Change which setting? |
+--------------------------------------------------------+[/code]
| A - Serial Device : /dev/ttyUSB0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : Yes |
| G - Software Flow Control : No |
| |
| Change which setting? |
+--------------------------------------------------------+[/code]
The first line will give you the path to the serial port Minicom is going to talk to. If this doesn't match the /dev/ttyUSB# path you found above, hit "A" on your keyboard and enter in the correct path and press enter. Now double check your Bps/Par/Bits settings. The default 9600 8N1 is pretty standard, but you may need to hit "E" and provide a different Speed setting depending on the device you're talking to. In my case, OpenLog is running at 115200bps, so I went through and made the appropriate changes. Hit enter again to exit the serial port settings menu. The other settings can usually be left to their default values, so arrow down to "Save setup as dfl" to save this configuration as default. This way you don't have to configure Minicom every time you use it. Now arrow down to "Exit" and hit enter. Minicom will now start up using the settings you specified. If all goes well, you should now be connected to your device and ready to send/receive. From now on, you can start minicom without the -s switch.
[code gutter="0"]$ minicom[/code]
Got a better HyperTerminal replacement that you use in Linux? Let me know about it in the comments.
I jump between minicom and GNU screen often. They are both slightly different takes on the same problem.
ReplyDeleteI use it to communicate with my Bus Pirate. Handy little tool, that.