For those of you who are looking for Minicom for cygwin, look no further! A co-worker and I have managed to get it to build and run correctly under Cygwin, and are now making the binaries available to you. I’m not a programmer, and not an all knowing Linux guru. The usual legal mumbojumbo applies. I’m not responsible for this blowing your machine to kingdom come.
Through all the email’s I’ve received, by far the most common question seems to be if I can divulge the secret of how to compile Minicom in Cygwin. I have not been able to figure out how I made it work though the parts listed below may give you some hint.
FIRST:
Extract the files. This can be done in one of two ways. You can either:
Download the Minicom source files to an existing Linux machine (not a cygwin machine). If you don’t have a Linux machine, consider looking at Knoppix, which will let you run Linux on your desktop without having to install a thing. Extract the files, and then get into the Minicom directory and change the name of the aux directory to auxiliary (aux is a windows reserved word and will break all sorts of things if you leave it). Repackage them or somehow transfer them to your windows machine to your home directory under Cygwin.
— or —
Use a windows file tool like WinRAR or 7-zip to extract the tarball. You will get errors about the aux dir. Get into the extracted Minicom directory and create a dir called auxiliary. Extract the files in the aux dir of the tarball into the auxiliary directory.
SECOND:
You will need to edit several files to update the references to aux so that they point to auxiliary. There are 3 references in Makefile.in. There is 1 reference in configure.in. There are 1 or 2 references in configure. In Makefile.am there is 1 reference. In /man, there are some references in Makefile.in and Makefile. In /src also lookin Makefile and Makefile.in.
THIRD:
Make sure you have the following packages installed in Cygwin before procceding with this step:
autoconf automake1.4 gcc make libncurses-devel <--(very important!)
Run the following command:
./configure --enable-lock-dir=/var/tmp
FOURTH:
Proceed with running make, and make install. If you have problems with errors such as “undefined reference to _LINES” and “undefined reference to _COLS”, then you may need to edit your src/Makefile and find the line that says:
LIBS = -ltermcap
and replace it with
LIBS = -lncurses
FIFTH:
You will want to create a minirc.dfl file in /usr/local/etc/ that looks something like this.
# $Id: minirc.dfl,v 1.1.1.1 2003/03/30 18:55:39 al-guest Exp $ # Machine-generated file - use "minicom -s" to change parameters. pr port /dev/com1 pu baudrate 9600 pu bits 8 pu parity N pu stopbits 1 pu minit pu mreset pu mconnect pu rtscts No
That should be it!
DOWNLOAD:
If you’re just looking for the file, without further ado, here it is.
Hi
I am running cygwin on windows xp. running as admin.
The error message i get is “Cannot open /dev/com1”
The command i run is “./minicom.exe -s -o”
I think the application is trying to access /dev/com1, even if i gave -o in options.
please help.
Administrator@LPT-IN-shyju /cygdrive/d/WORK/minicom
$ find ./
./
./bin
./bin/ascii-xfr.exe
./bin/minicom.exe
./bin/runscript.exe
./bin/xminicom
./etc
./etc/minirc.dfl
./man
./man/man1
./man/man1/ascii-xfr.1
./man/man1/minicom.1
./man/man1/runscript.1
./man/man1/xminicom.1
Administrator@LPT-IN-shyju /cygdrive/d/WORK/minicom
$
Administrator@LPT-IN-shyju /cygdrive/d/WORK/minicom
$ ls -lah /dev/
total 5.0K
drwxrwxrwx+ 1 Administrator None 0 Dec 19 12:38 .
drwxr-xr-x+ 1 Administrator root 0 Dec 13 2012 ..
-rw-r–r– 1 Administrator None 6 Dec 19 12:47 com54
lrwxrwxrwx 1 Administrator None 13 Oct 13 2011 fd -> /proc/self/fd
drwxrwxrwt+ 1 Administrator None 0 Oct 13 2011 mqueue
-rw-r–r– 1 Administrator None 0 Oct 24 2012 null?
drwxrwxrwt+ 1 Administrator None 0 Oct 13 2011 shm
lrwxrwxrwx 1 Administrator None 15 Oct 13 2011 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 Administrator None 15 Oct 13 2011 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 Administrator None 15 Oct 13 2011 stdout -> /proc/self/fd/1
Administrator@LPT-IN-shyju /cygdrive/d/WORK/minicom
$ cd bin
Administrator@LPT-IN-shyju /cygdrive/d/WORK/minicom/bin
$ ./minicom.exe -s -o
I wish I can help but I wrote this article nearly a decade ago. The best I can hope for is discussion on the subject here and that maybe someone else can help.
Over a decade ago? The post date looks like February 1st, 2014. That was less than three weeks ago.
Anyway, I wasn’t able to get minicom working via current version of cygwin. Got some errors about .dll files not located and similar issues. For now, I think best way to use serial cable within cygwin is probably “screen /dev/ttyS2”.
Thanks for posting though.
Sorry if it was misleading. I closed down the ancient website I created and had the article posted on and figured I’d move it here to preserve it. Didn’t realize it would show as being a “new” post… Sorry it didn’t help!
I was able to use the ./configure | make | make install routine that is pretty common to linux type source builds to get a working minicom in Cygwin. “AUX” doesn’t seem to be a reserved word in Windows 7. I will say my build is a little “twitchy” it will dump core if I try -A Z to try and configure minicom. The command “minicom -D /dev/ttyS8 -b 9600 -l -8 -c on” was enough to get me connected to a firewall. If you use a usb to serial adapter, do “ls /dev/ttyS*” before and after plugging in your serial port to find its number.
Of note on the compile side, I added the following libraries cygwin32-ncurses, cygwin32-libiconv, and Mingw64-x86_64-windows-default-manifest to whatever I already had installed to get the program to build
Thanks for posting this, it was a big help.
Cary, thanks for leaving a comment! I had no idea if this information was even relevant or useful anymore, so great that it was of some benefit. Thanks for adding to it for the sake of the community.
It looks like it’s even easier to build it now.
Using the cygwin installer, install gcc, autoconf, automake1.4, libncurses-devel, libiconv-devel
It looks like they removed the nasty ‘aux’ files from the tarball so that step is no longer necessary.
Just download, untar, ./configure, make, make install and done!
That’s awesome. Thanks for sharing with everyone so they can avoid the headache.
Following the steps from Shannon worked for me.
I put together a more complete guide:
http://cookaytech.uk/?p=42
Thanks for keeping this up here, it was helpful and I appreciate it. I wonder if anyone else found that the control keys don’t work for minicom? The application works, but CTRL-A/Z doesn’t respond, and the only way to get out of the app is to kill the cygwin window it’s running it.
Thanks Dan. Happy to know it’s still helpful after all these years.
I know this is a very old post but I had a requirement to compile minicom for cygwin and since I found this article helpful as a starting point I just wanted to post my solution for getting the current version of minicon to compile and run in Cygwin.
Download latest source from:
https://fossies.org/linux/misc/minicom-2.8.tar.bz2
Extract the source files to minicom-2.8
From the cygwin console make sure you have the build tools gcc, make, autoconf and automake1.16 installed
Minicon also needs the following dependencies installing:
libncurses-devel, libiconv-devel, gettext, gettext-devel
I use apt-cyg to install and remove packages from the cygwin console.
Enter the minicom-2.8 source directory and run:
./autogen.sh
./configure
NOTE 1: If you get output like “.//config.rpath: line 27: $’\r’: command not found” re-save the files using Unux EOL format
Notepad++ is useful for this.
NOTE 2: You have to edit the /Src/Makefile and add a definition for UWIN2P0 to stop the linker complaining about unresolved LINES, COLS.
Change the DEFS line in the Makefile from DEFS = -DHAVE_CONFIG_H to DEFS = -DHAVE_CONFIG_H -D_UWIN2P0
Run:
make
make install
This should build the minicom application for cygwin in /usr/local/bin.
Awesome, thank you for taking the time to share what you’ve learned so this can keep helping others with minicom. Much appreciated!
Hope it will be useful for someone 🙂
Also the Cntrl key still doesn’t seem to work in the cygwin version of minicom but if you change the command key to ALT in the “Screen and Keyboard” settings menu (minicom -s) it works fine.
And if you anyone doesn’t know using ls /dev/tty* also works in cygwin to see what com ports are available and to check which comport is been used by a USB to serial convertor.