Author Topic: Raspberry Pi+JMRI+PR3XTRA+wifi adapter=portable Wifi Throttles? Now on a Netbook  (Read 6880 times)

0 Members and 1 Guest are viewing this topic.

delamaize

  • Crew
  • *
  • Posts: 2401
  • Gender: Male
  • Prairie Line Native
  • Respect: +547
ok, I broke down and bought a Digitrax PR3 XTRA to make programming my sound equipped locomotives a little easier, and with JRMI, programming in general is going to be easier. I'm in a Ntrak/oNetrak Club now also, on a probational status. They run strait DC and Digitrax DCC. Given I use a Zephyr, I don't have a throttle of my own that I can realistically carry around with me at sessions and shows, and the DT402D is about $200. Something I have noticed is all the components to make a "Wifi Loconet access point" is just over half the cost, and would enable anyone who is in the club, and has a smart phone to use it as a throttle, by simply downloading the app. From what I have read, others have done it, the Raspberry Pi can be programmed to start automatically, and start the wifi throttle software automatically, eliminating the need for a video source, or a keyboard/mouse source. Setup would be simply connecting it to the Loconet, plugging in the Raspberry Pi, and the PR3, then waiting for the boot cycle to finish.

The big problem I am running into right now, is no one seems to have made a "How to" or a "step by step" guide on how to get the Pi set up, and running, and it's a little over my head to try to just figure it out.

Sooooo.....I guess my questions, am I completely nuts/is this a good idea? And has anyone here done what I'm talking about, and could anyone point me in the direction of a "How to?"
« Last Edit: December 20, 2014, 08:45:51 PM by delamaize »
Mike

Northern Pacific, Tacoma Division, 4th subdivision "The Prarie Line" (still in planning stages)

C855B

  • Crew
  • *
  • Posts: 10875
  • Respect: +2421
0
The answer is "completely nuts", Mike. What do you need the Raspberry Pi for? As a substitute for a laptop or something like that? If there's a computer running JMRI connected to a PR3, that's all the server you need to run smartphones as throttles. The Raspberry Pi sounds like a whole bunch of complication, and, actually, running JMRI on the Pi is still experimental and pushes its limits. I think that's mostly why you can't find a how-to... nobody has really done it yet in a reliable, repeatable fashion that others below the Linux geek level can use. The whole concept smells of "hack" at this point.

Everybody, or so it seems, has a previous-generation laptop sitting around doing nothing. Heck, my brother-in-law gave me two MacBooks just to get them out of his closet, and I loaded JMRI on one the day it arrived. Do that, and save yourself a headache or two or three. Unless you want to take the challenge and be Mr. Proof-of-Concept. :D

I last looked into doing the Raspberry Pi versus JMRI about three months ago. My conclusion about the necessary effort was that it was Rube Goldberg, which explains my vehemence. Somebody may know something more current.
...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.

reinhardtjh

  • Crew
  • *
  • Posts: 3006
  • Respect: +365
0
It can be done, but if you're not at least somewhat schooled in Linux and JMRI already, it can be bit of a slog to do.  I'm looking into using a Beaglebone Black as it supposedly loads and runs Java somewhat faster than the Pi does.  What it takes is a Pi/Beaglebone, a USB Wi-Fi dongle and a SPROG/PR3/Locobuffer and you can have a standalone JMRI server.  But you have to install the Linux, the Wi-fi AP software, a DHCP server and probably a lightweight DNS server like DNSMASQ.  A VNC server and a dropbox client wouldn't be a bad idea either (to get JMRI files in and out).

One place that has a sort of "How-to" is this thread on RMWeb  Wireless DCC System for £90 (using SPROG, Raspberry Pi and JMRI)

There is a JMRI installer/setup script at https://github.com/proffalken/JMR-Pi  It works with most any Debian-based Linux, but it also hasn't been updated in at least a year, so it may have bugs now.

If you haven't already, join the JMRI Yahoo group. Pi and other Linux-based systems are discussed often and in the archives.  But if you happen to have an unused laptop or desktop that available, then a cheap Wi-fi AP can be added and you get the same thing with the benefit that you have a screen to run JMRI from and probably quite a bit less hackery to make it all work.

Running JMRI on a Pi or other small computer appliance is still very much bleeding edge, hence the lack of comprehensive How-To's at this point.  Perhaps in the not so distant future things will be different.
John H. Reinhardt
PRRT&HS #8909
C&O HS #11530
N-Trak #7566

wcfn100

  • Crew
  • *
  • Posts: 8841
  • Respect: +1221
    • Chicago Great Western Modeler
0
If there's a computer running JMRI connected to a PR3, that's all the server you need to run smartphones as throttles.

No wireless router?

Jason

jagged ben

  • Crew
  • *
  • Posts: 3257
  • Respect: +501
0
No wireless router?

Jason

In at least some case a computer with a wireless adapter it can just be set up as the access point and server.  We're not talking about connecting to the internet.

C855B

  • Crew
  • *
  • Posts: 10875
  • Respect: +2421
0
No wireless router?

No. The computer running JMRI is the direct access point between WiFi and LocoNet. You're routing to nothing else.
...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.

wcfn100

  • Crew
  • *
  • Posts: 8841
  • Respect: +1221
    • Chicago Great Western Modeler
0
No. The computer running JMRI is the direct access point between WiFi and LocoNet. You're routing to nothing else.

Is there a write up somewhere on this setup?  Everything I see, including the WiThrottle site says a local wireless network is part of the requirements.  I assume what your talking about falls somewhere under P2P.

Jason

C855B

  • Crew
  • *
  • Posts: 10875
  • Respect: +2421
0
Hmmm... you might be sort of right... not P2P. I'm now recalling that I had to "select" a local WiFi network, or that I had to setup the computer as a network host (easy on OS X - just enable network sharing). Bottom line is a network host to point the phones at, not just the app. That issue might be one of the complications in getting it going on the Pi.

I've done it twice outside of my home/studio networks, so the exact steps are cloaked in faded memory. Tomorrow I'm setting it up for a train show, so let me verify what is necessary, the main rub being (I think) an older version of JMRI due to running on aforementioned throwaway laptop with superseded OS X.

I'll be comparing WiThrottle against Engine Driver, so this ought to be interesting.
...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.

reinhardtjh

  • Crew
  • *
  • Posts: 3006
  • Respect: +365
0
Yes, you need a WI-Fi access point of some kind.  If the laptop's Wi-Fi can be set in that mode (not all can) then that will work but it won't be connected to the house through it then.  Or else you can add a cheap Linksys/etc wireless router if you don't already have wireless in your house/layout location.  The computer running JMRI also need the Bonjour/Zeroconf zero configuration networking service.  It's automatic on Mac OS X and most Linux installs but needed if you're running Windows.  Installing iTunes add it and so does a couple other applications, but you will probably need to install if you are using Windows.  Both WiThrottle and Engine Driver need it to find the JMRI server - unless you specify a fixed address for the JMRI server and then hand enter it into the phone app.
John H. Reinhardt
PRRT&HS #8909
C&O HS #11530
N-Trak #7566

wcfn100

  • Crew
  • *
  • Posts: 8841
  • Respect: +1221
    • Chicago Great Western Modeler
0
Okay, I see that win7 and later have some utilities to transform the wireless adapter to an access point (or could you do this before and nobody said anything?).  That's good news as I never cared for the idea of having to set up a wireless router at train shows just to use the phone as a throttle.

It's too bad Digitrax couldn't bring their wifi to market.


Jason

C855B

  • Crew
  • *
  • Posts: 10875
  • Respect: +2421
0
I just confirmed that "Network Sharing" on a Mac was what solved the access point issue. No wonder it was so easy. Yes, you then isolate the Mac from the general WiFi network, but in the case of our train shows that's not necessarily a bad thing. If at home, you just point everything to your home access point... done.

I couldn't get my test rig to go completely as it turned out the only RJ12 cable I had on-hand is a straight-through, and LocoNet requires "a twist". I'll confirm tomorrow night after getting into the club's barrel of "official" LocoNet cables.

I did discover the hard way (by confusing WiThrottle) that I have two iPhones with the same user name. I need to fix that. :|
...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.

reinhardtjh

  • Crew
  • *
  • Posts: 3006
  • Respect: +365
0
I couldn't get my test rig to go completely as it turned out the only RJ12 cable I had on-hand is a straight-through, and LocoNet requires "a twist". I'll confirm tomorrow night after getting into the club's barrel of "official" LocoNet cables.

Technically, a LocoNet cable is a "straight-thru" data cable.  Pin 1 to pin 1, pin 2 to pin 2, etc.  Using the usual flat telephone cable means that if you lay the cable flat, one connector will be face up and one face down, hence the "twist" even though it is a straight-thru cable electrically.

I know Mike knows this, but some might get confused by the terms if not experienced with data communications.

The typical phone version of the cable will have both connectors facing the same way which results in pin 1 to pin 6, 2 to 5, 3, to 4.  So the straight-thru cable is the data cable, the other version is the voice cable.  In the early days, Digitrax said the voice cable would work, but only if you have a command station and UP5/throttles on the line because they don't depend on the phase of the Rail-Sync signal.  Since then, with the release of newer LocoNet devices such as the SEC8 or DS54/64 which do they have amended this to say you need the straight-thru data cables to keep the LocoNet signals in phase.

Some handy Digitrax Tech Depot articles on LocoNet:

KB825: Making LocoNet Cables
KB714: Loconet Overview
John H. Reinhardt
PRRT&HS #8909
C&O HS #11530
N-Trak #7566

C855B

  • Crew
  • *
  • Posts: 10875
  • Respect: +2421
0
^^^^ What he said. :D
...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.

delamaize

  • Crew
  • *
  • Posts: 2401
  • Gender: Male
  • Prairie Line Native
  • Respect: +547
0
Hey guys! thanks for all the input. The whole reason I was looking at the Raspberry Pi can be boiled down to 2 reasons, Price and portability. my first idea was to just my own laptop, but I didn't to lug it back and forth to shows. then I thought about a netbook running Windows of some type. If the Raspberry pi is as difficult to get to work with JMRI in an autonomous mode, then it might be a better decision to go with a Netbook. Ideally, if money wasn't an issue, a Microsoft surface, built into the top of a box, containing the PR3. a small Wifi hub/access point, and the power supplies would be the Ideal. a small package, easy to operate, and easy to get set up. As for the home layout, I'll probably use my laptop for my JMRI uses. 
Mike

Northern Pacific, Tacoma Division, 4th subdivision "The Prarie Line" (still in planning stages)

x600

  • Crew
  • *
  • Posts: 444
  • Respect: +198
0
Mike, This sounds really cool, I'm looking forward to being able to do this on the layout.
Jim Y and John Benny are the guys to talk to about what we might need to do to connect to MRNS.
It may take some time as we recover from BallardWhy-itis...... :D

Greg O.