Adventures with JMRI

Well that was an interesting three hours…

My Sprog IIv3 DCC controller arrived last week, and today I decided that, busy though I am, I absolutely had to see my new locos moving before Christmas. Here is a gratuitous shot of the locos again, simply because they’re such beautiful models.

New readers should be aware that I’m coming back to N Gauge model railways after 35 years away from the hobby, and my decision to use DCC has effectively turned me into a total newbie.

So I wired up some straight track to the Sprog, connected its power supply, connected it to my MacBook via USB, and launched the JMRI software. After some initial pseudo-random clicking around the application, I worked out that I should remove its settings folder (I had fired it up once before without the Sprog connected), and let it run its “first run” wizard so I could tell it to recognise the Sprog.

That’s where things got interesting. There were two possible entries for the Sprog in JMRI’s list of devices, one just called “SPROG” and another called “SPROG Command Station”. (Much later on I worked out what the difference was but I’ll get to that in a bit.) There were also a number of options for which port it should use, including 2 with the letters “usb” in them, also with no hint as to which was the right one.

I decided that it was time to RTFM (read the flippin’ manual) and found the Sprog and JMRI documentation online. Neither gave me exactly what I wanted though I gleaned a few hints.

In the end I picked some options and continued, encouraged by the fact that the Sprog’s power light was blinking, which meant the track had power.

I worked out that I had to add a loco to the roster, and that was the next hurdle. Trying this with my Minitrix SBB Re460, I found that JMRI was reading the decoder ID as 15227, which is ridiculous considering (as I was told) decoder IDs only go up to 9999. It also would not automatically detect the decoder model, so I had to set it manually to the correct Minitrix one.

To cut a long story short, I spent quite some time adding, removing, and re-adding the loco, trying to write a new decoder ID to it, and getting my throttle window in a mess… I got repeated errors saying “address out of range or throttle in use by another loco”, before I at last managed to set the loco to have a short decoder ID of 3.

That’s not a very scientific description of the process I followed, but I wasn’t doing things very scientifically at this point – I was getting thoroughly befuddled and my scientific method goes out of the window when that happens.

But this last action worked. A little clicking in the throttle window and my loco was crawling satisfyingly along the test track, until of course it hit a dodgy track joint and stopped. But that’s a different problem, solved by solder and wires not software.

One down, one to go…

Having conquered the world of DCC software programming (or so I thought), it was time to get my other loco – the Fleischmann SBB Ae6/6 – running.

This time nothing worked. As with the Minitrix loco, JMRI wouldn’t detect the loco’s decoder, and so I had to try the available Fleischmann decoder entries one by one. But I also couldn’t get JMRI to write a decoder ID. It would read one – in fact it read it as 3 (clashing with my Minitrix loco!) but I couldn’t change it. The program window kept saying “Java null pointer exception” which, since I’m a computer geek, I knew was a serious software error.

If all else fails try another computer

Well. I couldn’t try another loco because this was the only one left to try. I couldn’t try another Sprog because I only have one. So I switched the only thing I could switch – I decided to try with a Windows notebook instead of the Mac.

So after installing the Sprog USB driver and JMRI on my girlfriend’s old Asus ultrabook, I went through the JMRI setup wizard, selected “SPROG” as the controller, the software found the right port automatically, and pretty soon the Minitrix loco was edging down the track once more. At this point I should say that I found a setup guide on an American Sprog website that I hadn’t found before, which was very helpful.

Encouraged by the absence of null pointer exceptions, I put the Fleischmann loco on the track instead of the Minitrix, and added it to the roster. This time, although for some reason I couldn’t get it to accept a short decoder ID of “4”, I did manage to get it to accept a long decoder ID of “150” (picked randomly) which I could then read back.

And sure enough, when I opened the throttle, there was a quiet satisfying hum and the Ae6/6 started moving. I even managed to find and click the stop button before it went off the end of the track.

And this is when I worked out the difference between “SPROG” and “SPROG Command Station” on the device list in JMRI. It turns out that “SPROG” optimises the software for programming decoders (and only allows the use of one throttle at a time), whereas “SPROG Command Station” optimises the software for operations, not programming, and lets you have several throttles in use at the same time.

Back to the Mac?

So, I have a Windows notebook running JMRI with two throttles open, I have a Sprog IIv3 linking the computer to the track, and I have two locos that move happily up and down the track. I’m really impressed by their ability to crawl at almost indetectable speeds by the way – I guess this is a benefit of DCC as opposed to old-fashioned DC.

But do I go back to the Mac, or do I leave well enough alone? In the end I’ve decided that I (eventually) succeeded in fulfilling today’s aim, which was to make sure my new locos worked by getting them moving, and that’s enough for one day.

I’m going to write down all the settings from the copy of JMRI that’s running on the Windows notebook, and then when Christmas is out of the way I’ll then try and configure the Mac JMRI correctly, now that I know both locos will run, and what their decoder IDs are. That way I won’t be stealing the girlfriend’s notebook every time I want to work on the railway.

Share Button

Leave a Reply

Your e-mail address will not be published. Required fields are marked *