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!


Monday, April 22, 2013

Promising Pi developments

This week I motored along with the Pi. Using the most recent Raspbian OS image, along with some additional packages I chanced upon via research, I was able to get the Dlink DWA-125 wifi adaptor to become a access point and transmit a static address. Woo hoo!
Problem was for some reason the other wifi adaptor which was configured for the Internet dropped out. Hmmm. I would like both to be working but not a big issue as the main outcome is to have the Pi transmitting IP addresses so that hopefully when JMRI's WiThrottle is turned on, it will be able to connect to smartphone/tablet throttles. Having an internet connection would be nice for operating system and application package updating but I could get around this via ethernet connectivity to a laptop or tether a mobile phone to the Pi on those infrequent times when updating might be required.

So half the battle won. Now this week I will look at UDEV rules to lock in specific devices to specific Linux interfaces. The point of this is to allow for say the DLink modem to be always assigned wlan1 say. Then in a similar fashion the NCE USB and MERG USB modules to be assigned specific interfaces.

If I get this working, I will look at installing JMRI and see if the predefined interface for the Dlink modem comes up, and then see if JMRI's WiThrottle starts and broadcasts addresses for wifi connectivity.

As for modelling, just taking  small break while I have the enthusiasm to persist with the Pi.

Sunday, April 14, 2013

Pi restarted

This week I put some time into re-familiarising myself with the Raspberry Pi as it has been since December last year since I have potted around with it. I downloaded the latest Raspbian image and put it onto a separate SD card. This is the beauty of this system. The whole operating system and applications are all stored on a single SD card! You want to try a different OS, then just copy it onto another SD card, give it a go and you can always revert to an early or different version by exchanging the SD cards.

Well I tried the latest version and it still doesn't appear to be working exactly like I had hoped. I'm thinking of trying another OS version from a different mob to see if it is better or not.

No modelling this week, however today we went across to Hobbyrama for Lachlan to spend some of his birthday money. Over Easter I introduced him to aircraft modelling to do something different and to start small and easy and work up to more complicated modelling kits, hopefully with a view to railway modelling. So I bought him one of the classics, an Airfix Spitfire kit. He did pretty well with a little help from me. He started painting it this weekend. He then went a bought himself a Soviet WW2 tank over the holidays. And today he bought a Jaguar model car! Very diverse collection so far!

So while I was there, I went around to the railway modelling section and bought a Dapol Country Inn (ie pub) kit to put on the layout beside the shop.

So this upcoming week might be more Pi and start either the pub or yard sheds kits.

Monday, April 8, 2013

Some advances this week

This week I was able to finish the Dapol shop and Metcalfe platform (bus) shelter. I decided not to put a LED light into the shop due to a number of reasons, but the main one being that the light would have been reflecting off a number of features, especially the actual building interior itself. I would've had to paint the interior black to stop the light penetrating throught the plastic and I wasn't going to do that! So in the end I just glued down the cement paving Scalescenes paper to the cardboard and then the shop onto the cardboard base.





As for the shelter, it has certainly surpassed my opinions of potentially using Metcalfe kits in the future. Very easy to construct and instructions were very easy to understand.


 
I was also able to revisit the Pi. During the week I did some additional research and came across some solutions. Not all were agreeable! Looks like the little wireless dongle I bought had a number of issues. I am hoping the more recent version of Raspbian has had some additional fixes added to it. So last night I downloaded the latest version but have yet to get to the Pi with the new OS. Something to do this week.

Other things to do may be the small yard huts and continue with the Pi.