Sunday, June 30, 2013

Sorry for the absence of an update of late

A couple of weeks ago I spent 4 days/3 nights in the hospital with my youngest son, so nothing got done that week as all my stuff was at home. Last week was a little more productive. I trudged on with my Pi Howto document and just about there. I was having a problem with it recognising the NCE SB3a and not running in 'faceless mode'. After some nights research I found the answers. Thanks to Mark Gurries' website I found out that re the SB3a, JMRI doesn't recognise it in its configuration settings, even though it is in there. Apparently you have to "lie" to JMRI and set it up as a Powercab and it works fine. As for the 'faceless mode' I had been using DecoderPro3 to set the configuration settings under this misguided notion that being '3' it must be a better version compared to just 'Pro'. If I understand the forum correctly, apparently '3' is actually a cutdown version specific for decoder settings etc, not the full shebang! So I reconfigured the settings using just DecoderPro to mainly start the WiThrottle server upon startup. Copied its configuration file to the faceless mode configuration file. Made an entry in the start up script. Disconnected the terminal. Rebooted. Waited for a couple of minutes and voila my smartphone's Engine Driver app picked up the WiThrottle address and port and was able to connect. Brilliant. So now just to update the doco and I do a run through to make sure no problems. Then I might approach one or two guys from the forums to test and provide feedback before I release to the general public. Nearly there!

I also took the plunge and ordered an Auscision NSGR 73 Class, 7309, reverse Tuscan shunter. I couldn't get the one I really wanted ('Dubbo') as it was sold out. So I will take modeller's license and say 7309 has been posted to the western line on loan from Eveleigh Yard for some reason or other!

Saturday is a running day at Mr Mackie's so that will be a good arvo.

The Tour de France has started again so that will be distracting me for the next few weeks.

Sunday, June 16, 2013

What's been happening in the last two weeks?

Sorry I missed updating the blog last week. Busy with the Pi.

Yes I think I am just about ready to release my instructions. I will be attempting another run through of the instructions, and might even see if anyone on the forums is prepared to do a run through as well. I am pretty happy with what I have done so far. There is a bit of discussion on this topic on the JMRI forum, but I guess there is more than one solution to the problem, so maybe mine will be just another one to be considered?

On the weekend of the Queen's Birthday Long Weekend in Queensland (and most of Oz except for WA) my club, RMCQ, celebrated our 40th anniversary. Go along to www.rmcq.org.au and click on the 40th Anniversary link. I also took possession of some newzed (newly used) railmotors that my mate PK was wanting to offload. Both NSWGR. First there was the CPH/CTH railmotor in green and cream livery. The second was a 620/720 railmotor in reverse Tuscan red. Both with DCC, sound and weathered. Very good, hardly used, and the price was great!

While I have been concentrating on the Pi, my hobby desk had been progressively getting buried with junk that I had just thrown there for later filing, storing, etc. The long weekend had been mostly wet, so I took the opportunity to do a big clean up of the study/hobby room so now I can actually use the hobby desk to start modelling again. The Club Xmas Modelling Competition is on in December which isn't that far away in the scheme of things!

So this week I will concentrate on the Pi and JMRI setup howto run through and iron out any issues as I would like to finalise this sometime soon.

Sunday, June 2, 2013

The Pi is basically ready

Well since my last written post I've been tinkering away with the Pi and getting answers from the Forums for some questions I needed sorting out. So in the last couple of weeks I've basically been able to get the Pi to a state of readiness. I had answers provided to me about the persistent device names which would come in handy for situations where more than one system may be connected to the Pi. Fairly simple once explained! Secondly I was able to get a very simple answer as to how to pass these device names to JMRI so that they would be in the drop down list in the Preferences section. And yesterday I had a afternoon pass-out from the missus and I was able to go over to Mr Mackie's for what the missus said was a 'play date'. I've been interested to see how the Pi would go connecting to a NCE 5A Command Station which by default comes with a serial interface rather than USB. Craig had a Serial to USB cable, so at least I would have connectivity but how would the Pi go with interfacing to the new device. I was thinking I might have to look for Linux drivers, etc, but as it happened, the Pi immediately recognises the connection without drivers and assigned /dev/ttyUSB0 to the device. I then fired up JMRI, re-jigged the NCE Preference to Serial connection and /dev/ttyUSB0 and voila we had layout interfacing going. I was able to control one of Craig's trains no problems. I then restarted the system with the wifi Access Point dongle connected and got JMRI's WiThrottle going. Out came the smartphone and was similarly able to connect to the layout and control an engine.

One thing I will have to investigate is with the Android Engine Driver app I had the speed up to '28' and the engine was just moving. There was another setting to do with max throttle something or other which was set to 25%. I am wondering whether this reduces the '28' setting to 25% or say '7'. Not sure so will enquire online further. One interesting thing we saw was that both the JMRI throttle and the smartphone throttle reflected each other when both were set to the same engine number. So when one's speed increased it was mirrored on the other. Amazing!

So basically the Pi is set to go if I don't want to look at further interconnectivity with say MERG. But I do, so will potter around further. However I will write up my How To, repeat the install instructions to make sure this is OK, and once satisfied will publish them. I might also offer a Pi Setup Service!

On a side not, I also installed Putty and VNC Viewer on the laptop so that I can remotely connect to the Pi and reduce the need for keyboard, mouse and monitor connectivity when in the future the Pi becomes a standalone device providing whatever interconnectivity between the various layout systems I come up with.

One of these days I'll get back to the modelling!

Friday, May 24, 2013

Pi and JMRI photos

As promised in the last post, here are some photos and a video.

My Pi in its case with the DLink modem active as the Access Point

Close up of the WiThrottle screen in JMRI with my smartphone's Engine Driver app connected

The full JMRI DecoderPro screen operating on the Pi

The Engine Driver app on my Android smartphone with 4494 connected


Monday, May 20, 2013

Pi and JMRI success!

This week has been a HUGE THUMBS UP. After re-imaging the Pi's SD card I progressively built the system up and installed JMRI on the Pi Friday night. I got to the point of starting the WiThrottle server within JMRI to see if the Pi advertised the JMRI connection specs to the outside world. And IT DID! So Sunday morning I went the next step and connected up the NCE USB to the Pi as well as the NCE SB3a. The SB3a was then connected to a length of track so that an engine could be tested. After setting up some more preferences within JMRI around the NCE system, the Pi was restarted, JMRI started up, and WiThrottle started. I then went to the Android smartphone, connected to the Pi's wifi signal, started up the Engine Driver app, and voila I connected to JMRI! After acquiring NSGW 4494 (the engine I had on hand) I played with the Android controls and the engine moved up and down the track. Oh wow! I also tested the connectivity on the Android tablet also running Engine Driver. All good. I do have a video and some photos but for some reason Youtube and Blogger are playing up. I'll try again on another day from another PC.

Back to the Pi and wifi connectivity, I was also able to establish a remote ssh connection on the Tablet to allow terminal emulation over wifi. Wow. Also I installed a VNC (virtual network connection) server on the Pi and using an Android app (AndroidVNC) was able to fire up the Pi's desktop GUI remotely on the Tablet. Double Wow! However I have to learn how to drive this. I am also thinking of installing similar apps on the laptop to allow remote connectivity if required.

This week I still have to sort out the persistent naming of the NCE and MERG USB interfaces as JMRI is currently using /dev/ttyUSB0 or 1 which is not easy to remember. Hopefully if I associate these interfaces to something more readable, JMRI will use these. Time will tell.

For those following my progress, I have been writing the steps I took to get this done. I will publish this once finalised.


Sunday, May 12, 2013

Oops back to square one!

This week I persisted with the Pi up to the point of causing some sort of system issue and the spare room on the SD card was consumed to the point of only having some MBs left on an 8GB card! No idea what. So back to square one and re-image the card and start again this week. I think I am getting a better feel for the little beasty so hopefully it will not take me long to get back to where I was before the conniption!

Saturday was Club Day but no chance to run trains due to busy meetings. However Sunday was Mothers' Day so I took the boys down to the Club for an hour or so to let Mum have some quiet time! We were the only ones there. Lachlan ran his N scale train and Matthew ran his Thomas and Toby trains. I even got a chance to run a NSWGR 44 Class for the first time in months!

So hopefully a better week with the Pi.


Monday, May 6, 2013

Pi Persistence and a new link

Hi all. Sorry for no update last week as there really wasn't much to update. I have been persisting with the Pi and trying to understand the whole UDEV thing. I discovered I needed some additional 'packages' to allow certain things to be reported. Did this and ran one of the new commands 'udevadm' which was looking very hopeful when it started to hang the Pi. After much colourful language emanating from the study, I decided I needed to research this new development more. It would appear there is a known bug in the Pi whereby the output stack for this command running on the Raspbian OS fills up and then stops the Pi. Hopefully the Linux gurus can sort this out soon. Things like this happen with development boards such as the Pi. I'll keep a close eye on the Forums.

I stumbled on a new link as a result of my membership of MERG, the Guildford Model Railway Group (Sydney, NSW) who 'Wallerawang' as their current exhibition layout, but are planning their new exhibition layout (still early days) which they are hoping to possibly use MERG control for. A fellow MERG member is a club member and also a reader of this blog. http://www.gmrg.org.au/. I'll add this to my Links list.

The weekend just gone was the Brisbane Model Train Show and my club RMCQ was well represented. The lads looked very schmick in our new uniforms. Everyone was consistent. I was only able to get out on Sunday and help out.

So this week depending on the Linux gurus, I might progress with the Pi or not. As I mentioned to the above member/reader a for the Pi other people have been able to get JMRI running on it, as have I, but it is the integration of JMRI into the Pi as an access point in its own right that doesn't appear to be documented or experimented well at the moment, and that is what I am perservering with. That and the ability of the Pi to recognise some generic USB type conenctions such as the wifi dongle to be used as the access point, the NCE USB interface and the MERG USB interface that is keeping me busy trying to work it out. Hopefully the end result is some basic instructions whereby if these are connected the Pi will assign a more meaningful interface name than say /dev/ttyUSB0 to something like /dev/NCEUSB or similar. Then hopefully modellers who use other DCC manufacturers could potentially tinker with my instructions for their USB interfaces.

So if this doesn't move along at any speed I might look at starting some more modelling!