N1MM+ on Linux

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
  • Download and install winetricks
  • Use winecfg to set wine to Windows 7 emulation
  • Use winetricks to install dotnet40
  • Download the latest N1MM full installer and update
  • Run the N1MM full installer
  • Run the N1MM updater
  • 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 (and note the . before the wine subdirectory under the user’s home directory; it indicates a “hidden” directory)
  • Run N1MM (the installer should have put an icon on your desktop) and test functionality

(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 this year’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.

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).

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.

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.