Author Topic: Super-cheap Computer for JMRI Can Handle It  (Read 403 times)

0 Members and 1 Guest are viewing this topic.

C855B

  • Crew
  • *
  • Posts: 9485
  • Respect: +1646
Super-cheap Computer for JMRI Can Handle It
« on: February 19, 2021, 10:02:35 PM »
0
Just like UP did in the early '70s! :D

The lousy weather had us cooped-up in the house the past two weeks, so power failures notwithstanding I used the opportunity to convert my current JMRI/Raspberry Pi system to the latest model:

https://www.raspberrypi.org/products/raspberry-pi-400/

I wanted to try it out especially since the 400's CPU clock rate is 20% faster than the Pi 4 and see for myself if this change honestly made a difference. I also liked the computer-in-a-keyboard idea possibly reducing the clutter on the DS desk.

Adding insult to injury ;) , I was also interested in seeing how a "real" OS like Ubuntu would run on this relative toy. So I sprung $100 for the full kit - computer/keyboard, wall-wart, 32GB microSD chip with NOOBS (the OS installer) and Raspberry-branded mouse. The bare 400 was $70, so the kit seemed like a reasonable path to gather the parts.

Exec summary: it works, and works surprisingly well. Noticeably faster than on the regular Pi 4. Getting JMRI working was not straightforward, but not difficult.

I loaded Ubuntu 20.10 on microSD chip on my (Mac) desktop machine with the new Raspberry Pi OS downloader app. Piece of cake. Chip booted right up on the 400, I set OS preferences, then off to the races. One thing I noticed right away about Ubuntu desktop was it was much smoother than Raspbian (now Raspberry Pi OS). Coming from a longtime Apple user perspective, that's saying quite a bit.

Loaded the Open Java development package from the Ubuntu library, downloaded JMRI from jmri.org, and transferred my layout's configuration files. It came alive right away until I went to edit a JMRI config table... [gronk!]... crash. It was looking for a Java lib. But the lib - libgluegen-nt.co - was already on the system in JMRI's Java support areas. After much wringing of hands and web searches, I learned that this Ubuntu version was totally 64-bit, and the ARM libs that come with JMRI were 32-bit.

It took a lot of connecting dots, but with a bit of help from the groups.io JMRI forum I was able to triangulate into the correct lib here. After unpacking, the libgluegen was buried, but I found it, and copied it to the main JMRI folder.

Up and running. Ran trains on the layout last night with the new rig and everything worked as expected.

It's much faster running JMRI. I don't know if it's Ubuntu or the 400, or both, but the most telling improvement is in the startup that appears to take half the time. The speed-up could be a mix of stuff. The Pi 4 was already 64-bit, but Raspbian still had a lot of 32-bit underpinnings. The CPU speedup is from overclocking the existing ARM8 in the Pi 4; if I didn't know this going in I could tell from the uncharacteristic heat coming from the USB ports.

There are a couple of downsides. Loading up all the cable ports - 3 USB, 1 Ethernet, 2 micro HDMI and 1 power - make for a really bulky bundle sticking out the back. Then there is the classic RPi problem of zero power glitch ride-through, which has made it somewhat notorious for scrambling the file directory and rendering the main "drive" (microSD card) unreadable. It needs a UPS for anything serious.

I think the Pi 400 is a pretty good cheap, compact and surprisingly powerful solution for a dedicated JMRI machine, especially since I have abandoned the idea of recycling retired towers and laptops for JMRI since support is getting harder and harder for old iron.

John

  • Administrator
  • Crew
  • *****
  • Posts: 11554
  • Gender: Male
  • Respect: +997
Re: Super-cheap Computer for JMRI Can Handle It
« Reply #1 on: February 20, 2021, 06:05:05 AM »
0
I use an older RPI to run my CATS/JMRI CTC with the default OS .. works like a champ with the USB Locobuffer interface .. I do use a dedicated monitor, but VNC also is pretty responsive ..

railnerd

  • Crew
  • *
  • Posts: 738
  • Gender: Male
  • Respect: +224
Re: Super-cheap Computer for JMRI Can Handle It
« Reply #2 on: February 23, 2021, 07:13:24 PM »
0
Bought myself a Pi-400 for Christmas this year— it was well worth it.

-Dave