The N1MM+ contest logging program is among the most popular, if not the most popular, loggers in use by contesters up and down the spectrum. It supports a wide variety of contests and works well with features supporting the largest multi/multi and the smallest “little pistol” alike. It’s constantly under development by a team of volunteer programmers, is frequently updated and is well supported. Best of all, it’s free for the download.
Unfortunately for those of us who choose either the open-source computing life (or are Macintosh users), N1MM+ is only available for the Microsoft Windows operating platform. We have ways, though, to run many MS-Windows programs via an application layer and library suite called wine. It allows MS-Windows programs to run in the world of Unix-type OSes not by emulating a Windows environment but by acting as a wrapper, translating win32 and win64 functions into native Linux and Xwindow system calls. (Visit the wine website for more info.)
Getting wine running and configured for specific applications can be a tricky task, and I found that to be the case when trying to install N1MM+. Knowing of my quest, Gerry K8GT pointed me to fellow MSU and W8SH alumnus Mike (W2NRL)’s website, where he had posted a quick step-by-step to running the N1MM logger on Linux.
Based on Mike’s information and my general knowledge of how things work in Linux, here are the steps I took to get N1MM+ operational on my Linux box:
- Install the latest wine and winedevelopment packages from the repository for your distribution (the winedevelopment package may also be named wine-development or wine-devel depending on your distro)
- Download and install winetricks (which may also be in your distro’s repo; try installing it that way first, because it will take care of dependencies).
- Download the latest N1MM full installer and update
- Note that the N1MM website was recently reorganized. These are the new links to the installer and updates. If you had the old links bookmarked, they won’t work any more.
- Use winetricks to set wine to Windows 7 emulation in a win32 environment. (Why win32 and not win64? That’s because wine still runs best in win32.)
- This is best done in a terminal by first setting the WINEARCH environment variable:
$ export WINEARCH=win32
Then, run everything else in the same terminal session.
- After starting winetricks, select the default wineprefix (~/.wine), then click Change settings, then scroll down to win7 and click OK
- This is best done in a terminal by first setting the WINEARCH environment variable:
- Use winetricks to install dotnet46 using Install a Windows DLL or component. This will take a few minutes; winetricks will download Microsoft’s dotnet code and install it. (Updated from original procedure to install dotnet40; version 4.6 or above is now needed to retrieve N1MM+ program updates, as their server now uses https.)
- In the same terminal session, run the N1MM full installer:
$ wine /path/to/N1MM\ Logger+\ FullInstaller\ 1.0.7711.exe
(The installer version was correct when this article was written; future full installers may have a different name.) The backslashes escape the following character as a literal and not a metacharacter, of course; feel free to use the tab key for autocompletion. You could also enclose the entire path and filename in quotes as in the next example. You may also find that you’ll need to set the executable mode on the installer and updater:
$ chmod a+x "/path/to/N1MM Logger+ FullInstaller 1.0.7711.exe"
- Likewise, run the N1MM updater.
- In order to access the serial and USB ports, make sure the user you are running N1MM under is in the dialout group (grep dialout /etc/group); if not, add the user to dialout.
- Set up the serial port emulation in ~/.wine/dosdevices – I used COM33 for /dev/ttyUSB0 (rig control) and COM2 for /dev/ttyS0 (hardware serial port for CW keying), but in practice you could use any of the available COM ports for these. When I connect a USB keying device (Winkeyer initially, but currently using Mortty), they appear as a ttyUSB device as well.
- Note the . (dot) before the wine subdirectory under the user’s home directory; it indicates a “hidden” directory.
- Note that Linux’s udev system allows you to “static map” serial devices to specific device names in /dev so they always pick up the same tty* assignment (a discussion of this is beyond the scope of this document, but search udev static and see what you come up with.
- Note that recent versions of wine support automatically mapping serial devices so this step may not be necessary. With your devices connected, look in ~/.wine/dosdevices to see how the /dev/ttyUSB* devices were mapped.
- Run N1MM (the installer should have put an icon on your desktop) and test functionality.
- I have found, in some installations and on occasion, that N1MM+ fails to start properly and crashes. Upon retrying several times, the program should eventually start. I haven’t gotten to the bottom of what’s going on, but wine should pop up a debugging window when this happens.
- Once N1MM is running, connect your transceiver via serial or USB and configure it as you normally would.
This process installs N1MM+ and the various components in the default wineprefix. You might want to consider installing it in its own wineprefix, as Mike’s instructions indicate. What’s a wineprefix? Think of it as a “bottle” that your Windows environment lives in, within your Linux machine. You can have as many wineprefixes as you want and you can run them all concurrently. It’s like having multiple virtual Windows machines.
(My shack computer is a Dell Precision T1650 workstation with a 3.0GHz i7 CPU, 8 GB memory and a 256GB SSD. I interface the Kenwood TS-590SG for rig control via USB; the computer also has a hardware serial port for CW keying via a homebrew interface.)
For convenience, you might also want to set up symlinks somewhere else in your home directory for the important subdirectories in your wine installation’s My Documents folder, which can be hard to find if you don’t know where to look. Here are a couple suggestions:
- N1MM will write exported logs (e.g. Cabrillo files for log submission) in the ExportFiles directory, so link it to somewhere in your home directory that’s more convenient: (substitute your Linux username for ‘frank’)
$ ln -s /home/frank/.wine/drive_c/users/frank/My\ Documents/N1MM\ Logger+/ExportFiles /home/frank/ExportFiles
- Exported ADIF files usually go directly in the “My Documents” folder, so link that one also. I prefer putting ADIFs in their own subdirectory under My Documents:
$ ln -s /home/frank/.wine/drive_c/users/frank/My\ Documents/adif_exports /home/frank/ADIF_Exports
- One other handy directory to make available is the Call History folder. While N1MM has the ability to import these from the web directly, you might need to get to it if the contest you’re running doesn’t have one in N1MM’s file gallery:
$ ln -s /home/frank/.wine/drive_c/users/frank/My\ Documents/N1MM\ Logger+/CallHistoryFiles /home/frank/CallHistoryFiles
If you’re a Linux/Unix user, you are probably aware of the reason for the backslashes (\) in the above examples – it’s to indicate that the following character is to be taken literally and not as a metacharacter. Windows has the annoying trait of being ambivalent about embedded spaces in filenames (and upper/lower case) whereas Linux is far more strict, hence the need to say what you mean and not count on the operating system to try to figure it out for you.
Tom, N1MM, is the mastermind of the project, is quite an interesting fellow, and is one of 2018’s inductees into the CQ Magazine Contesting Hall of Fame. I shared my Linux success with Tom when I saw him at the Dayton Hamvention®, and he informed me that “for people like you, the software is not free!” But he quickly explained that our “payment” as Linux users is to share our methods and findings with the community and be a resource for those who are trying to do the same. Tom said the biggest stumbling block is getting the COM ports working properly in wine, but was also curious as to how some of the more advanced functions perform, such as multi-station communication, rig and rotor control and reporting to the on-line contest logger systems and Logbook of the World. I can confirm that reporting to contestonlinescore.com works just fine, and I use it for nearly every contest.
Indeed, one of the bugaboos I have run into has to do with serial port mapping. N1MM gets upset when you shut the rig off while it’s running, thus suspending serial communications with the rig. USB devices can have an unpredictable way of appearing and disappearing, since they’re hot-pluggable by design; the operating system will detect a new device and assign it a port, creating and destroying entries in /dev on the fly. On occasion, when I’ve turned the radio off while leaving N1MM up (to perhaps take a break and come back to the contest later), the device handler deletes the /dev entry for the rig’s USB port and the symbolic link in dosdevices is broken. N1MM then fails to see the COM port and throws an error. Other than shutting everything down and rebooting, the fix seems to be to find where the computer has remapped the rig’s USB port (look in /dev/ttyUSB* to see what’s new), delete the symlink in dosdevices, and create it with the new USB device. (Another workaround would be to symlink multiple /dev/ttyUSBn entries as different COM ports in dosdevices, and switch them in N1MM’s serial configuration section.) This works until you restart or reboot, when everything should get assigned freshly and you’ll have to change the symlink in dosdevices again. A safer way around this is to exit N1MM before shutting off the radio (don’t worry, N1MM will pick up where it left off when you restart it – you don’t have to save and reload the entire contest). And as mentioned earlier, udev can static map USB devices so they always appear at the same /dev/ttyUSBn entry.
I’ve had other problems of a minor annoying nature, such as erratic behavior when clicking on the menus – they tend to vanish before you can click on a drop-down option; using the arrow keys and Alt- key combinations is more reliable. I also ran into a problem with callsign entry throwing an error when trying to log the IARU contest. This turned out to be an actual bug, which the development team acknowledged and is working on. Why it wasn’t a widespread issue isn’t known, however. Maybe Windows would just “swallow the bug” and carry on, while wine might be more particular – who knows.
Another issue I’ve run into is a lag in serial port response that develops after operating for a while. The symptom shows up as odd behavior when in search & pounce mode. When tuning around, hearing a station and entering their call, the call will sometimes vanish from the call entry field during the QSO. This is because N1MM is getting delayed rig data over serial/USB and “thinks” you’ve tuned away a few seconds after you did. (When tuning after entering a call, N1MM assumes you’ve moved on, so it clears the call field and enters the call in the bandmap so you can find it later.) Sure, you could disable that function in N1MM, but it’s a useful feature if you want to populate the bandmap. In talking with Dave, NE4RD, host of the Linux in the Hamshack podcast, at Hamvention this year, he noted that there’s some issue, such as a cache overflow or a memory leak, with the serial code that the wine development team has yet to address because “who uses serial anymore?”, so evidently fixing it in wine is a low priority. The problem goes away when you shut down the wine session and restart it, an annoying fix but about the only workaround available for now. I’ve noted it on two different installations. On my workstation-class machine in the shack, it appears after an hour or so of operating, but on my jalopy-class laptop, it only takes about ten minutes. [This paragraph was added on 20 May 2019.]
If you run into trouble configuring your rig in N1MM, check a few things:
- If your rig uses a RS232 interface, make sure the pinouts are correct. The Kenwood TS590SG, for instance, uses a DB9 male connector but it is wired as a DCE (like a modem) which means you will need a cable with female DB9 connectors at each end, wired pin for pin (not as a null-modem cable). The simplest way to do this is with a DB9 extension cable and a female-female gender changer. Check your user manual for details on your rig’s serial pinouts.
- Make sure your data rate is set correctly. Your rig may have a setting for bit rate, data bits and stop bits. Set N1MM to match your rig’s settings. if your rig’s serial rate is configurable, use the fastest rate available. Many older rigs talk at 4800 bps or slower; newer ones can go as fast as 115,200 bps.
- The hamlib package contains many utilities useful for communicating with amateur radio gear. The rigctl command can be used to query and set your rig’s parameters. If rigctl can read and write to your rig, then N1MM should also be able to. Install hamlib and do man rigctl to find out how to use it.
If you are using N1MM+ under wine, or would like to, and have a comment, question or observation, drop me an e-mail and we’ll try to figure it out together. After all, Linux is a community, and we’re here for each other.
Update – April 2021
A recent thread on the N1MMLoggerPlus groups.io group discussed difficulties in getting N1MM to run in Linux. One group member, Mark Earnest, posted the steps he took to get it working on his Manjaro Linux installation. I tried his steps under Fedora 33 in a fresh wineprefix and the installation worked, although with a huge dump of console error messages at each step.
Ok, I finally got this working. I'm running Manjaro Linux with wine 1.6 and winetricks 20210206 WINEPREFIX=~/.n1mm WINEARCH=win32 wineboot --init WINEPREFIX=~/.n1mm winetricks --force dotnet40 corefonts WINEPREFIX=~/.n1mm winetricks win7 wget 'https://download.microsoft.com/download/C/3/A/C3A5200B-D33C-47E9-9D70-2F7C65DAAD94/NDP46-KB3045557-x86-x64-AllOS-ENU.exe' WINEPREFIX=~/.n1mm wine ~/NDP46-KB3045557-x86-x64-AllOS-ENU.exe /q WINEPREFIX=~/.n1mm WINEARCH=win32 wine Downloads/N1MM-Logger-FullInstaller-1.0.8954.exe WINEPREFIX=~/.n1mm WINEARCH=win32 wine Downloads/N1MM-Logger-Update-1.0.8973.exe
Mark notes that you’ll get a big error message as the program starts, and a message about an AutoHotKey error, but the program runs after clearing those out of the way.
So if you are having difficulties, try a fresh install using Mark’s steps. Before you begin, grab the latest full installer and update, and park them in your ~/Downloads directory (if you put them somewhere else, adjust the last two lines). As of this writing, 1.0.8954 is the current full installer, but be sure to use the very latest update (as of this writing it’s 1.0.9088), so substitute the version that you downloaded.