pvwradtke

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

Reply 0
barthollis

VirtualBox

Thanks for the effort and for posting the results here.  I just might try that system here. 

Bart Hollis

Reply 0
pvwradtke

Good luck

Hi Bart, good luck to you. Besides getting a Windows working copy (which may cost $$$), the process proved very easy and had no major hiccup. The Lokprogrammer is simply a serial device over USB, so it's not really hard for the VM to work properly. Let us know your results and the setup you used (which OS, Windows version, etc.).


Brazilian model railroading in Saint-Constant (Montreal area), Canada

HO scale and some N scale models - xTrkCad user

Reply 0
sdcruz

Hi  pvwradtke Thank you so

Hi   pvwradtke

Thank you so much for this solution!  

Do you need to buy a copy of windows or can i simply install virtual box and VB will pick up the Lokprogrammer.

Regards
Shelton

Reply 0
dapenguin

No joy on a Mac

Wine can not compile as 64 bit on the Mac due to an API conflict.  I could get it to run but then the error as you mentioned.  But if it can not be 64bit it is a lost cause anyway.

I had the same issues as you with VB but found no solutions.  Also VB will not run a MacOS guest and I need that when I upgrade to 10.15.  I have some old stuff

So I just gave up and spent $$ to upgrade my Parallels  Worked the first time in both Win7 and Win10.

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
dark2star

Silly question

Hi,

knowing nothing about the LokProgrammer, this is a very silly question... Can JMRI access the device? Would that work as a Linux/Mac solution?

Have fun!

Reply 0
dapenguin

i wish

LOK Programmer is a device to "reprogram" a decoder by installing a different program.  Either a new sound file or other upgrade.

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
barr_ceo

ESU

ESU has absolutely no interest in anything that’s not Windows..Their rep told me so to my face at an NMRA show some time ago when I inquired about Mac support. Therefore I have absolutely no interest in them..

Reply 0
dmitzel

Another Mac OS user with ESU decoders

I'll have to try the VirtualBox VM route myself - easier than trying to resuscitate an old PC. Might also fix my issue with ATCS as well.
D.M. Mitzel
Div. 8-NCR-NMRA
Oxford, Mich. USA
Visit my layout blog at  http://danmitzel.blogspot.com/
Reply 0
sdcruz

Confirm it works on Linux using VirtualBox

Yes, Lokprogrammer does work using Linux (Fedora 31) and Windows 10 Professional 64Bit in VirtualBox.

Remember to install the LokProgrammer, then the USB Driver from the Lokprogrammer website then connect the usb cable from the LokProgrammer - I had issues where I had the LokProgrammer connected before installing the driver.

Regards
Shelton

Reply 0
marcfo68

. . .

Never understood why people would go to such trouble.  I looked at used MAC's and found them to be an expensive solution to simply program decoders. I can get a working Windows System for a song and a smile and most of the top tier decoder manufacturers only  support Windows based software anyways: Digitrax, ESU, TCS, Zimo. 

Good luck finding a decoder manufacturer  who writes up and supports MAC's. Now if you have issues with the ESU software, they are going to request you run a PC and Windows. Apple will not support you and neither will  VirtualBox.

And since you must purchase a Windows license anyway ????

The whole process you describe reads as convoluted to just program sounds into an ESU decoder.

My view of the subject:  get a PC and be done with it.

- - - - -

" knowing nothing about the LokProgrammer, this is a very silly question... Can JMRI access the device? Would that work as a Linux/Mac solution?  "

The LokProgrammer is proprietary and JMRI can not be used with it.  If you go into JMRI Preferences and lookup ESU all JMRI supports is the ECOS system.  God bless proprietary.

Marc

Reply 0
barr_ceo

That "expensive" Mac looks a

That "expensive" Mac looks a lot cheaper when you spread the cost over the useful life of the computer. My desktop  27" iMac is a 2009 model. That's right....  It's 11 years old, and still going strong. it's rarely powered down...   last time was whan I moved into this retirement community in January. I'm using it right now. It's also running High Sierra. How many 11 year old Windows machines are running Windows 10?

This isn't the first Mac I've had that's lasted this long, either...  Our PowerPC machine ran for a decade, and even a used Mac SE (the "portable" one, before laptops....) ran for 5-6 years after we got it.

There's a lot of cross platform software available. JMRI, for one. XTrakCAD is another. I do all my 3d modelling on it to, as well as slicing for my printer in Cura, and audio editing in Audacity. If amateurs can do it, why can't ESU?  It's not that it can't be done, they just don't want to bother, and they were very rude and dismissive about saying so (See my prior post this thread).

I'm like Quigley at the end of the movie...  I've never said I can't use Windows, I've just got no use FOR Windows.

Reply 0
dmitzel

Might CrossOver be an option with ESU LokProgrammer?

Wondering if ESU's LokProgrammer might be an option for Mac users like myself, using Codeweaver's CrossOver software. Has anyone tried it? The price looks attractive, especially not requiring a Windows OS license.

D.M. Mitzel
Div. 8-NCR-NMRA
Oxford, Mich. USA
Visit my layout blog at  http://danmitzel.blogspot.com/
Reply 0
marcfo68

. . .

" That "expensive" Mac looks a lot cheaper when you spread the cost over the useful life of the computer. My desktop  27" iMac is a 2009 model. That's right....  It's 11 years old, and still going strong. it's rarely powered down...   last time was whan I moved into this retirement community in January. I'm using it right now. It's also running High Sierra. How many 11 year old Windows machines are running Windows 10?  "

- - - - - -

Well I have two (or three) right here in front of me that have been thru XP, Vista, Win7, Win8 and have been Win10 for a few years. They are 32bit and were discontinued/withdrawn  in 2005 and still do what I need from them to this day, including daily Email and web browsing.  Lenovo Thinkcenter and Lenovo Thinkpads.  They run JMRI 4.20  and the Digitrax software I use to load the SPJ files. 

Certainly not the quickest, but do I care ?  not at all. This is still plenty fast to handle the USB data stream between the computer and the PR3 and PR4 I use at 57600 baud.

I even loaded the ESU software on it at one time to see / compare.

But I can understand the thrill of getting Windows software to run on a MAC when there is no other option.

Marc 

 

 

Reply 0
AlexW

Parallels and VMs

At the point that you're running it in a VM, you're basically just running it on Windows, the only issue is USB devices. Parallels on the Mac has a much easier way to assign USB devices to the VM. Unfortunately these manufacturers are small, so they're not going to develop software for multiple platforms. I'd recommend just using a windows machine for your layout PC as I do, but if you really, really want a Mac or Linux as your layout PC, then you'll have to live with some sort of virtualization software for applications like this.

-----

Modeling the modern era freelanced G&W Connecticut Northern

Reply 0
sdcruz

Hi Marc I moved to running

Hi Marc

I moved to running linux 25 years ago when I just had enough with Window$ and all the viruses and blue screen of death and the greedy Bill Gates.

I moved on principal to Open Source - you will be suprised at the number of machines which are now running Linux - from the 737 Cockpits to microcontrollers.  All due to the foresight of Linus who was the founder of Linux and Open Source - Microsoft had to take out big ads in major newspapers as the threat of Open Source was so strong.

Its unfortunate ESU had coded their software to use .NET - they could have used Java as an example.

I love using Linux and have never had a virus or a crash in the last 25 years of using Linux - true freedom in computing - and by the way it cost me $0.00.

Thanks

Shelton

Reply 0
Pennsy_Nut

Just my opinion.

I certainly agree about Microsoft and greed. However, I must tell how I am doing with Windows 10. I bought a Lenovo desktop Nov 2017. It came with Windows 8. I immediately updated to 8i.? And when they offered 10, I updated to that. And ever since, have only updated as Microsoft issued them. Monthly on the second Tuesday. I have had minimum problems. The dreaded blue early on. But as best I remember, within the last 2 yrs, have had no problems related to Microsoft since. I do not play video games. I do download videos and YouTube's for MR purposes. Have reached the limit of storage on the desktop, so am now using flash drives to store pictures. Another for Pubs. Etc. And all this means is that I make sure I have duplicates. I also now have a laptop/also with Windows 10, updated monthly. And between the desktop, the laptop and several good flash drives, have duplicate files and such. The main point I make here is. If I can be happy with Windows 10, and don't need Mac, Linux, or any other. Why don't we all be nice and stop degrading any system. To me, the fact that ESU and others are doing things in such a proprietary way is a bad business decision. The best thing for MR is to make things as universal as possible. And for us MR to be able to get things to work. Decoder manufacturers have now become a disservice to us, creating a nightmare of "differences". K.I.S.S. has gone away.

Morgan Bilbo, DCS50, UR93, UT4D, SPROG IIv4, JMRI. PRR 1952.

Reply 0
joef

Why Windows?

Quote:

The best thing for MR is to make things as universal as possible.

Desktop/Laptop operating system statistics ...

Windows 87.76%
macOS 9.61%
Linux 2.06%
Other 0.57%

Okay, you're going to write an application and it needs to be native level so it can talk to some specialized hardware. Assume all OS versions take the same amount of effort and you only have the funds to target one OS and you want to reach the biggest number of model railroaders.

What, new business venture owner, will you do?

Joe Fugate​
Publisher, Model Railroad Hobbyist magazine

[siskiyouBtn]

Read my blog

Reply 0
edfhinton

Evolution of .Net

Quote:

Its unfortunate ESU had coded their software to use .NET - they could have used Java as an example.

If they follow the current trend in .Net development, at some point they will naturally adjust their use of ,Net to specifically target .Net Core, which is now open source and runs on WIndows, MacOS, and Linux.  No need to switch to Java to support multiple OS's.

 

 

----------------------------------------------------------------------

Proprietor - Northern New England Scenic (V3). N scale NH B&M Eastern and western coastal routes in the mid-1950s.

https://nnescenicmodelrr.com

 

Reply 0
barr_ceo

Desktop/Laptop operating

Quote:

Desktop/Laptop operating system statistics ...

Windows 87.76%
macOS 9.61%
Linux 2.06%
Other 0.57%

Okay, you're going to write an application and it needs to be native level so it can talk to some specialized hardware. Assume all OS versions take the same amount of effort and you only have the funds to target one OS and you want to reach the biggest number of model railroaders.

What, new business venture owner, will you do?

 

Java 100%

Exactly what JMRI did...

Reply 0
Ken Rice

Java and cross platform

Java does get you a lot closer to cross platform than using native code and frameworks.  But even if there are no platform specific gotchas (which seems unlikely for something interfacing with hardware) there is still the problem of supporting it on multiple platforms.  What happens when it doesn’t work on someone’s mac?  Still have to answer customer questions, except now you have to answer them for two platforms.  And there will inevitably be bugs that can only be reproduced on one platform, not both.

I wrote my first mac program in 1984 on a Lisa in pascal (“I know it’s here somewhere” from Hayden Software) back before there was any way to develop directly on a mac.  I’ve had macs ever since and especially since osx with unix under the hood I love them.  I’ve also written cross platform software professionally since the 90s.  It’s not rocket science, but every aspect of it does cost more and take more time than just targetting a single platform.  Even writing cross platform websites takes more time and money, because there are browser specific idiosynchrasies.

I’d much rather have loksound and the other companies from who I have purchased nifty little bits of electronics that go in my trains and airplanes put most of their effort into their products and only support a single platform - PCs - for their setup software.  It’s cheap to get a good enough windows emulator, or for not much more than that you can get a cheap windows laptop that will run anything you need to run to update decoders or whatever.

Reply 0
Reply