Author Topic: Raspberry Pi 3 in the House... and Running JMRI!  (Read 17221 times)

0 Members and 2 Guests are viewing this topic.

mighalpern

  • Crew
  • *
  • Posts: 273
  • Respect: +142
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #30 on: July 09, 2016, 08:01:10 PM »
0
ok I have been following this as best as i can, ( seriously not a computer guy at all )  and I also ordered a starter set.  So I am guessing that i don't need the wifi dongle ??
I would love to eliminate my laptop out of the loop and throw in the Pi3,  so the set by step video or what ever would be awesome.
And as John C. was asking, where's Steve. and the file??
Many thanks
Miguel

reinhardtjh

  • Crew
  • *
  • Posts: 3006
  • Respect: +365
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #31 on: July 10, 2016, 12:20:39 AM »
0
Still, where can I find Steve???
dJohn C.

And as John C. was asking, where's Steve. and the file??
Many thanks
Miguel


Steve is Steve Todd of Android Engine Driver fame. He's a member of Piedmont N Southern club.  He has a slightly less out of date page about the Pi and JMRI here --> http://www.piedmontnsouthern.org/content/jmri-raspberrypi-as-access-point  where is said to get access to the boot image you need to email him (mstevetodd @ gmail.com).  He also goes on to say how he modified his copy of Raspbian Jessie to get the image.

One thing to note is that his image is set up to run headless.  You use a VNC viewer on another computer (OS X, Linux, Windows) to manage JMRI.  The image is built such that JMRI starts when the system boots and once you open up the VNC connection you can start tailoring JMRI to your needs - such as setting up the command station connection, etc.

It's still not a turnkey system, but it's getting closer.


« Last Edit: July 10, 2016, 10:17:12 AM by reinhardtjh »
John H. Reinhardt
PRRT&HS #8909
C&O HS #11530
N-Trak #7566

John

  • Administrator
  • Crew
  • *****
  • Posts: 13404
  • Respect: +3262
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #32 on: July 10, 2016, 05:52:16 AM »
0
Slightly dated. The Pi3 has WiFi and Bluetooth on-board.

I know .. but its a good overview with pictures for people who aren't techies ..

jdcolombo

  • Crew
  • *
  • Posts: 2265
  • Respect: +973
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #33 on: July 10, 2016, 10:09:03 AM »
0
Steve is Steve Todd of Android Engine Driver fame. He's a member of Piedmont N Southern club.  He has a slightly less out of date page about the Pi and JMRI here --> http://www.piedmontnsouthern.org/content/jmri-raspberrypi-as-access-point  where is sayd to get access to the boot image you need to email him (mstevetodd @ gmail.com).  He also goes on to say how he modified his copy of Raspbian Jessie to get the image.

One thing to note is that his image is set up to run headless.  You use a VNC viewer on another computer (OS X, Linux, Windows) to manage JMRI.  The image is built such that JMRI starts when the system boots and once you open up the VNC connection you can start tailoring JMRI to your needs - such as setting up the command station connection, etc.

It's still not a turnkey system, but it's getting closer.

Thanks, John.

I don't want to use it headless, at least not right away, so I'll probably do the initial setup myself.  After poking around the web for a day, it looks like getting a Pi 3 running is a pretty simple job.

But if anyone knows Steve, please pass on the message that a port of Engine Driver to run on/with ESU Loksound's new Mobile Control 2 throttle would be a big deal.  The MC2 is an android device.  I'm not a programmer, so I don't know how hard it would be, but having a wi-fi throttle with a knob and 4 hard buttons in addition to a customizable touch screen that works with JMRI would be something major for DCC folks.  If he's interested, I'd buy an MC2 and loan it to him for development testing.

John C.

jdcolombo

  • Crew
  • *
  • Posts: 2265
  • Respect: +973
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #34 on: July 13, 2016, 06:23:03 PM »
+4
Up and running!

This was pretty darn easy.  I ordered a kit from Amazon (Canakit).   The kit had the Raspberry Pi 3 board; a 2.5 amp power supply; a nice clear plastic case; and two heatsinks (one for the main processor and one for the other main chip on the board).  Also got a 32gb microSD with NOOBS already installed (not part of the kit; I ordered this separately).

Getting this up and running is really pretty straight-forward.  Here's what I did.

1.  Unpack board.
2.  Install heat sinks (they have an adhesive covered by slick paper; pull the paper off and stick the heat sink on the appropriate chip.  It's obvious which one goes where).
3.  Unpack case.  The case I got had three parts: a bottom, a side, and a top.  Pull the parts apart.  The board snaps into the bottom; the side portion then slips over the board and the various ports and snaps into place over the bottom.  Then the top just slides on (in this particular case, there is an air gap between the top and side for air circulation; don't try to push the top all the way down).  You now have an assembled Raspberry Pi 3 computer.  Total time: 3 minutes.
4.  Connect a mouse, a keyboard and a monitor.  The monitor needs to have an HDMI input; that's all the Raspberry Pi has for video out (you can control the Pi remotely if you want, but since I'm going to be using this for running JMRI and programming locos, I wanted a monitor/keyboard/mouse).  I also use a hard-wired ethernet connection, so I connected that.  The Pi 3 has on-board wifi, but I didn't use it.
5.  Insert microSD card with NOOBS and the Raspbian Jessie OS in the slot.  This is a friction fit - just push it in the slot all the way.
6.  Plug power supply into barrel connector on the Pi.
7.  Turn on monitor.
8.  Plug the power supply in.  The Pi will automatically boot, install the OS, and immediately go into a GUI (not a command-line).  The GUI is pretty intuitive; there are icons at the top for a browser, the file system, etc.  This part of the process takes about five minutes.
9.  Click on the browser icon at the top of the desktop to start the browser.  If you have hooked the Pi to a hard-wire ethernet connection, you are ready to go.  If you are relying on wifi, you're on your own (I think the OS asks you to ID your wifi network at some point).
10.  Go to the JMRI site, and download the Linux version.  The download will be stored in the "Pi" user folder (which apparently is the default) in the "Downloads" subfolder.  It is a compressed file, and when you double-click on it, the JMRI File Extraction utility comes up. 
11.  Using the file manager (click on the filing cabinet icon at the top of the desktop), create a new folder in the "Pi" user called JMRI or whatever you want.  Then click on "extract" in the JMRI utility, and tell it to extract to the new folder you just set up.
12.  Plug in your command station interface (in my case, it is a Digitrax PR3).
13.  Now open your new JMRI folder, and you will find icons for Decoder Pro and Panel Pro.  In my case, I wanted to run Decoder Pro, so I double-clicked on that icon.  I got a dialog box saying something like "This appears to be a script; what to you want to do?"  The options were to Execute; Execute in Terminal; and something else.  I picked "Execute" and JMRI started up with it's configuration assistant.  The only issue I had was specifying the port for the PR3; there were two choices, I just picked the first one, and it worked.  The main screen came up, and I imported my roster that I had previously exported from my old laptop that I had been using (I had this exported roster stored on an NAS; connecting the Pi to the NAS was as simple as clicking on "Network" in the file manager and entering the login credentials).

All this took about 30 minutes max.  I really still have a hard time believing this tiny board is a full-fledged computer running Linux, but it is and it does.  Pretty darn amazing.  For about $65 total, I've got a dedicated JMRI machine.

John C.

C855B

  • Crew
  • *
  • Posts: 10878
  • Respect: +2421
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #35 on: July 14, 2016, 02:55:02 AM »
0
Thanks for doing the step-by-step, John. Saves me from having to revisit. Received my new kit today, but didn't have a chance to put it together - storm-induced power failure pretty much killed that plan. I should have time tomorrow to take a few screen shots of the startup process for clarity.

One recommended but not required step:

8.5. Start the "Terminal" application to get a command line screen. Enter the following two (...Linux [cough cough]...) commands:

  sudo apt-get update
  sudo apt-get upgrade

When setting up my first one this took 30-40 minutes and scrolled a whole bunch of text up the screen. This process makes doubly-certain that you are running the latest OS rev, apps and behind-the-scenes fiddly-bits. It's best to do this when the system is fresh out of the box since loading apps later can sometimes do their own things to the behind-the-scenes fiddly-bits (a/k/a "dependencies"), and then the update/upgrade process can have hiccups.

Bottom line is what you saw - it's that easy.

If somebody would care to jump in here with the shell script, etc., to make JMRI auto-start on boot, I think we'd all appreciate it. I probably could hack my way through something, but my bash script skills are weak and there are wiser Linux heads here than I.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

jdcolombo

  • Crew
  • *
  • Posts: 2265
  • Respect: +973
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #36 on: July 14, 2016, 10:00:31 AM »
0
OOPS - I forgot about the "update your OS" step.

I'm going to do that this morning and hope that it doesn't crash JMRI.  If it does, well, I can always start over with a fresh copy of everything on the SD card.

John C.

reinhardtjh

  • Crew
  • *
  • Posts: 3006
  • Respect: +365
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #37 on: July 14, 2016, 01:48:10 PM »
0
OOPS - I forgot about the "update your OS" step.

I'm going to do that this morning and hope that it doesn't crash JMRI.  If it does, well, I can always start over with a fresh copy of everything on the SD card.

John C.

It shouldn't.  Other than through Java JMRI doesn't depend a whole lot on other Linux parts.
John H. Reinhardt
PRRT&HS #8909
C&O HS #11530
N-Trak #7566

C855B

  • Crew
  • *
  • Posts: 10878
  • Respect: +2421
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #38 on: July 14, 2016, 03:57:58 PM »
0
Yes - the 'J' in JMRI is for Java. Installing it shouldn't invoke dependency hell on OS and other app upgrades.

Screen shots with additional info. Selecting a WiFi network* (selection prompts for password, or, rather, "Pre-Shared Key"):



* - Once you have selected a Wi-Fi network, there is no easy method to forget it, other than command line tweaks embedded into startup scripts. That was inconvenient for my situation.

Here's a Terminal window invoked from the menu bar, and I've typed the "sudo apt-get update":



10 seconds after hitting <return>, almost done:



"sudo apt-get upgrade" has started, and here's the one prompt asking to continue:



That took about 20 minutes. After rebooting, need to configure for local conditions:



Country, time zone and - most important - keyboard. It starts-up with a UK keyboard, and getting to things like '$' and '#' need to be changed for your particular US configuration:



One other note - I ordered my kit from the official distributor, Allied Electronics. It did not include the heatsinks for the processor chips like my original kit and the one John bought. I had to go to eBay to get a set for $5.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

jdcolombo

  • Crew
  • *
  • Posts: 2265
  • Respect: +973
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #39 on: July 14, 2016, 10:00:52 PM »
0
Updated OS and no problems at all.  JMRI still running like a champ. 

Now I'm thinking I might want to get a 10" touch screen to hook to the Pi and mount the touch screen right on the fascia board with the computer and the touchscreen driver board attached to the back of the fascia with velcro.  This would be really slick if it would work.  Has anyone ever tried to use JMRI with a touch screen?

Uh-oh.  This is getting to be as crazy as putting sound decoders in everything . . .

John C.
« Last Edit: July 14, 2016, 10:02:30 PM by jdcolombo »

C855B

  • Crew
  • *
  • Posts: 10878
  • Respect: +2421
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #40 on: July 14, 2016, 10:26:32 PM »
0
Yes: https://www.raspberrypi.org/products/raspberry-pi-touch-display/

It's obviously the default "self-contained" display. It's 7", however. I certainly don't see any reason why a 10" screen with HDMI input and USB for the touch matrix would be a problem.

EDIT: I discovered a 10" screen project was started for the Pi two years ago, but apparently went no further than prototypes.
« Last Edit: July 14, 2016, 10:36:01 PM by C855B »
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

mighalpern

  • Crew
  • *
  • Posts: 273
  • Respect: +142
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #41 on: July 15, 2016, 01:53:38 AM »
0
Ok you guys rock!!
 I just got my starter kit today and hope to hook it up tomorrow.  So all those step by step instructions are awesome,
 keep them coming cuz I don't have a clue as to what I am doing.
thanks
Miguel

jdcolombo

  • Crew
  • *
  • Posts: 2265
  • Respect: +973
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #42 on: July 15, 2016, 08:34:51 AM »
0
Just one more note:

If your old monitor doesn't have an HDMI input, but DOES have a DVI input, just get a DVI-to-HDMI adapter.  That's what I did, and it worked fine.

$3 from Monoprice: http://www.monoprice.com/product?c_id=104&cp_id=10419&cs_id=1041902&p_id=2029&seq=1&format=2

John C.

GaryHinshaw

  • Global Moderator
  • Crew
  • *
  • Posts: 6346
  • Respect: +1869
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #43 on: July 16, 2016, 11:05:59 AM »
0
Very nice thread!.

I have not used a touch screen to control native jmri panels, but I do use them to interact with panels served by the jmri web server.  There are a few bugs in the signal displays, but it otherwise works great (and is wireless).  I have not tried interfacing with decoder pro via this path.



Question: if I want to develop panel files on my laptop, can I sync the files to the Pi across my home WiFi network?

C855B

  • Crew
  • *
  • Posts: 10878
  • Respect: +2421
Re: Raspberry Pi 3 in the House... and Running JMRI!
« Reply #44 on: July 16, 2016, 11:24:55 AM »
0
I don't see why not, but I haven't explored the particulars of file sharing on the Pi. At very minimum you can start an FTP server on the Pi and have it available for file transfers that way.

Yeah, you reminded me that you're doing what I was thinking about, local screens loaded with browser panels from the JMRI web server. There are a lot of Android pads out there for under $40, and that's cheaper than the parts and wire for a traditional hard-wired panel in most cases. Definitely a huge time saver for larger layouts.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.