Decided to post my progress on using ESU's Lokprogrammer on my Linux box, without resorting to dual booting (we're a family of 4 who switch accounts and don't log out them, so it's not really an option), or using a second computer/laptop running Windows. I had a friend coming over yesterday, Marlus, another model railroader in the Montreal area, who was kind enough to bring his Lokprogrammer to do some tests and see if we could get it working. And we had good success!
Experiment 1: using Wine - Not OK
Wine can do a decent job to emulate many Windows programs on Linux, including games. However, it's also well known for failing more than often to support programs, especially if they're using Microsoft's .Net framework. When trying to install the Lokprogrammer 4.5.1 version, it failed when trying to download the .Net framework. Not exactly surprising, but disappointing nevertheless.
Wine also has a Mono extension, which helps to run some .Net based applications, especially older ones. I gave it a try as well and, whereas it completed installation successfully, running the software yielded an exception. Bummer.
Maybe there's a way to use the Wine Tricks package to make it run. However, I wasn't in the mood (or had the time) to try that hard yesterday. I was looking to make it work first, and explore better options later.
Experiment 2: Using a VirtualBox Windows 7 VM - Success!
Next step was to get out the big guns. I installed VirtualBox (free and available through the official repository of most Linux distros, and for Mac OS X as well), and made a new virtual machine running Windows 7 inside. For those scratching your heads, VirtualBox is a software that simulates a full computer and runs a guest operating system and all of it's applications on top of your current OS (virtualization) - or at least the software that doesn't require advanced hardware features like direct access to the GPU (e.g.: games). If this got you interested, check this guide.
After installing Windows 7 (you'll need an official key, of course, from a new box, or from a computer that died), I proceeded to update Windows (important!), install the Lokprogrammer 4.5.1 software, the .Net framework and the sound packages (optional at this point, but I did it anyway). Once I made sure all was up and running, I connected the Lokprogrammer device to the UBS port on my desktop. However, there was nothing going on. Another bummer? Not yet.
I did lsusb on the command line and I could see the Lokprogrammer listed among the other USB device. Not all was lost. I persisted and installed the specific USB driver for Windows 7, then restarted the virtual machine, and, again, nothing. But I'm stubborn, so I kept pushing .
The actual issue was that the USB device was not visible to the guest Windows 7 running on VirtualBox. When I tried to add an USB device to Virtualbox (either through the machine settings or the small USB icon below the window), there was no device to add. Hmm, now we were getting somewhere. A quick Google check pointed me to a Stack Overflow post that revealed the problem was that my user didn't belong to the vboxusers user group. As I'm using a Debian based Distro (Mint, same as Ubuntu and others), all I had to do was issue a simple command at the terminal (the post suggests other distros may be different, can't vouch for that):
sudo adduser $USER vboxuser
I had to logout my user to propagate the change to my desktop, but once I did it, I could select the Lokprogrammer serial device and Windows recognized it in the virtual machine immediately. Running the Lokprogrammer software I was able to read my engine's CVs and sound information. I did update CV values and could do other changes as well, and then wrote the settings back to the decoder. All worked as expected, sweet!
Conclusion
While it's a shame that ESU didn't use a platform neutral solution (there are many Mac users left in the cold as well), running it in a VirtualBox virtual machine was not very difficult. Maybe the biggest issue for many is having a licensed Windows to install on it. But if you have an old computer that you don't use anymore (broke or too old), you're entitled to install it if you didn't use it in another machine (not sure about OEM versions, fair word of warning).
Not as inexpensive as I'd like it to be, but with programmer itself running at around $130+shipping and a Loksound decoder starting at $80 (Select models), not a bad choice at all. For Mac users who can't make it run using regular emulators, the virtual machine may be a good solution. Though, a fair heads up for Mac users: if the USB devices are not visible to the virtual machine, you may need to find a slightly different solution, as Mac OS's user groups may be used differently.
Brazilian model railroading in Saint-Constant (Montreal area), Canada
HO scale and some N scale models - xTrkCad user