Minicom is a text-based serial port communications program. It is used to talk to external RS-232 devices such as mobile phones, routers, and serial console ports. Install the program with: sudo apt-get install minicom. Alternatively, you can get Minicom via the Synaptic Package Manager. Using the program. Serial Port Monitor is a professional software application that allows reading and recording serial data going through your computer’s serial ports. The program is a big help for those who develop and debug software and hardware solutions that use COM ports for serial data transfer.
Sponsored By
AccessPort - RS232 Monitor / RS232 Terminal AccessPort is an advanced serial monitor, simulation and RS232 data analysis tool. Use to log, view, analyse or automate RS232 communication or simply use as an ASCII Terminal for basic serial port communication and RS232 device configuration. Connect it to another PC, with serial port (or with USB/Serial adapter), use Putty or Minicom with same settings 9600n8, then boot Follow installation through serial console. If want to make it permanently boot to serial console, follow instructions here.
I hope that this blog post is found and helps someone. I wasn't sure what to title it. Hope Google Juice got you here!
Read this whole post, there's a lot initially but there's really just two or three small pieces. It'll be worth it because you'll be able to have a nice one click menu and drop directly into a serial port terminal on Windows in the Windows Terminal
Often when you're doing embedded systems development you'll want to monitor or talk to the COM/Serial Port just like you SSH into remote system. Folks ask questions like 'How to connect to a serial port as simple as using SSH?'
On Linux you'll use things like 'screen /dev/ttyS0' for COM0. With Windows, however, the historical guidance has always been to use Putty. It'll work but it's somewhat old, quirky, and it doesn't integrate well with the Windows Terminal and a more modern workflow.
Say I have a small embedded microcontroller device that talks over a COM Port (usually via a USB->COM bridge) like an Arduino.
Let's assume this device talks to the COM port as if it were a terminal and it's outputting stuff I want to see. I'll use this great little CLI example app for Arduino from Mads Aasvik to simulate such a device.
Here's what it looks like under Arduino's Serial Monitor, for example. This is a Windows app doing serial communication with its own interface wrapping around it. I want to do this at a command line, and bonus points if it's in Windows Terminal.
Setup WSL1
If you have Windows 10 you can the Windows Subsystem for Linux quickly with this command at a Admin prompt:
Then go to the Windows Store and get any small Linux. Ubuntu or Kali will do for our purposes. Run it and set your user and password. (I tried Alpine but it still has issues with screen and /dev/null/utmp)
NOTE: If you are using WSL2 and have set it as default, run wsl --list -v and ensure that your new distro is using WSL1 as only WSL1 will let us talk to the COM Ports. You can change it to WSL1 with 'wsl --set-version DISTRONAME 1' from any command prompt.
To test this out now, run your new distro from any command line prompt like this. Add the 'screen' app with
sudo apt update
' and 'sudo app install screen
'.You can see here that my Arduino serial device is on COM4. On Linux that device is /dev/ttyS4
Ubuntu Serial Port Tool
That means that I should be able to talk it from any WSL1 Linux Distro on Windows like '
screen /dev/ttyS4 9600
' where 9600 is the speed/baud rate. Ubuntu Serial Port Monitor Calibration
Get Minicom on your WSL1 distro
Screen is somewhat persnickety for Serial Port work so try Minicom. Minicom is a nice little text com program. Install with apt install minicom and run for the first time with 'sudo minicom -s' to set your default. Note I've change the default port from /dev/modem to /dev/ttyS4 and the speed, in my case, to 9600.
Then I hit enter and save settings as the dft (default) in minicom. You can also turn on Local Echo with 'Ctrl-A E' and toggle it if needed. Now I can talk to my Arudino with minicom.
Ensure dialout permissions to talk to the COM port
NOTE: If you get 'cannon open /dev/ttyS4: Permission denied, you may need to add your user to the dialout group. This way we don't need to sudo and get no prompt when running minicom!
I can now run minicom on my configured COM port 4 (/dev/ttyS4) with
wsl -d DISTRONAME minicom without sudo
.Here I'm talking to that Arduino program. This embedded app doesn't need to me hit enter after I type, so remember your own embedded devices will vary.
Make a nice menu
Bonus points, now I'll add a menu item for Minicom by changing my Windows Terminal settings AND I'll get more points for adding a nice serial port icon!
I hit settings and add a new profile like this at the top under profiles in the 'list.' Again, your distro name will be different.
To review:
- Use a WSL1 distro
- Install minicom, run with minicom -s once to make settings
- Make sure you are using the right /dev/ttyS0 device for your situation
- Ensure your flow control, baud, etc are all correct in minicom
- Add your user to the dialout group so you don't have to sudo minicom
- Make a menu item in Windows Terminal
- or run minicom manually in your WSL1 instance whenever you like
Hope this helps!
Sponsor: Suffering from a lack of clarity around software bugs? Give your customers the experience they deserve and expect with error monitoring from Raygun.com. Installs in minutes, try it today!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
AboutNewsletter
If you’re looking for a free and solid application to use for your serial COM connections, try PuTTY. It’s free for commercial and private use, and takes up a mere 444KB of disk space.
The latest PuTTY version can be downloaded here:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Windows Vista and Windows 7 only support the private edition of HyperTerminal. Windows 7 does not even ship with HyperTerminal. The private edition is NOT FREE for commercial use. Its license requires you purchase the application if used commercially, with the cost of the application being US$59.99, as listed on Hilgraeve’s website.
To use PuTTY for your serial COM connections, follow these steps:
- Figure out the COM port you’ll be using.
- Run PuTTY.
- Switch the Connection Type to Serial.
- Edit the Serial Line to match the COM port you want to use.
- Edit the Speed to match the BAUD Rate you want to use.
- Select the Serial category from the menu on the left.
- Make sure all of the settings are correct (the settings in the screenshot are what I used for my session, yours could look different depending on what you’re connecting to).
- Select the Open button to start the session.
Your connection should now be fully functional.
If you find yourself using PuTTY quite extensively, you could save settings to different profiles for fast future usage. To create a profile for your settings:
- Make sure you have the settings you require.
- Enter a profile name under Saved Sessions.
- Click the Save button.
On your next PuTTY session, you can load your profile by selecting it from the list and clicking the Load button.
Logging is also a great feature that PuTTY provides. It lets you output your entire session to a log file. To enable logging, follow these steps before you open your connection:
- Select Logging from the category list on the left.
- Choose your desired logging method (All session output, printable output, etc…)
- Enter a file name.
- Select the file handling settings.
- Open your connection.
13 Comments on Using PuTTY for serial COM connections (HyperTerminal replacement)
13 Responses to “Using PuTTY for serial COM connections (HyperTerminal replacement)”
- bam says:July 30, 2013 at 4:24 pmHello,Your info is very helpful.Thanks.BamReply
- jan says:February 11, 2014 at 9:28 ammy serial putty configuration to an ubuntu system has wrong output: e.g. ýûþþüÌþüis as keyboardoutput. Is there anything to change to get readable output ?Reply
- juan says:February 18, 2014 at 4:55 pmTry differents baud rates.Reply
- juan says:February 18, 2014 at 4:55 pm
- Parya Myanka says:March 2, 2014 at 2:35 pmSimpleTerm Gold – Stater Liteis a free alternative and is much easier for COM port or RS232, TTL based development work.Reply
- Jimoh Mojisola says:April 16, 2014 at 9:33 amthanks for the infoI am trying to program a bluetooth adaptar using Putty, having done the configuration as above, i couldn’t get any response(after writing the command(using Attention (AT) command)Reply
- Muzz says:December 31, 2014 at 3:47 amThis is great stuff. Not quite putty in my hands tho’. I went to full screen but had no idea how to get out of it. I tried right click – nothing, esc – also nothingReply
- pandyanadiad says:August 24, 2015 at 5:58 pmThanks for such a useful information. I have putty software long back but i don’t know how to use thanks for information.Reply
- slim says:January 10, 2016 at 12:10 pmThx, it’s useful and you made it easy :)Reply
- Bill says:March 12, 2016 at 2:16 amDoesn’t allow me to type anything.The black window opens, green cursor flashes and that’s it.Doesn’t accept any keyboard input. (Yes, the keyboard works)Reply
- Sandy says:August 7, 2016 at 10:24 amHow do I edit text from serial SLABS CP2104 of Option Globesurfer 3.I need to reset to factory and I know how to but I cannot get the text editor to workReply
- Sandy says:August 7, 2016 at 10:24 am
- The year of our lord MMXVI says:April 20, 2016 at 9:59 pmThanks for the info! Wasn’t working at first but I was testing the wrong COM ports.Reply
- Manel Rabhi says:June 24, 2016 at 1:49 amthank you for the info , I am using Putty serial with a sipex SP3232ECP ,after connecting my cart via vpga , i open my putty connexion but i receive error messages .Reply
- RIDHA says:August 7, 2017 at 6:09 ammy serial monitor does not response to the keyboard , the cursor standstill with no any response to the key boardReply