Wireless Whitchcraft

SimonT

Western Thunderer
Observers of Aberbeeg at the Wigan Show and the ARSE at Larkrail will have seen much use of iPhones. No, we weren't on social meeedya or placing bets on nags, we were running the trainset. We can do this as an outstanding app has become available called Touchcab. It is available in two versions one of which you pay for and one of which is free. You can guess what the differences might be! In addition the DCC manufacturers are moving to using computer WAN technology rather than radio control with its expensive licensing requirements. Touchcab is aimed at Lenz users although I understand from David Nicholson that the ZTC equipment should be able to use it.

This diagram should show what you need and how it all connects together.

Wireless DCC Schematic.jpgMost of the Lenz kit is available from the usual sources. The Router I use is the TP-Link Wireless N Nano Router available form Maplin for £20. Without it, the project would be unachievable as the Lenz documentation is atrocious; the best versions are available on the US Lenz website.

This was what the build looks like:

IMG_1100.JPG

You boy, at the back. Are you paying attention?

The trick bit is setting up. The Lenz Interface unit comes with a CD that includes their CV editor and some more information. I thought the easy way would be to connect my laptop to the interface on a LAN cable and use the CV editor to control something. Didn't work. I tried a LAN crossover cable. It still didn't work. After an hour of faff I was about to bring out the hammer and smash the thing to hell. As a last effort I thought to see if the laptop could see the router. Immediately I was into the router and a fabulous on line series of web pages telling you everything about the router. Now the Lenz instructions had talked about needing to change the router IP address to the interface IP address. Complete rubbish. The router just asked me if I wanted to talk to the interface. A minute of setting names and passwords had me connected to the layout and I ran a loco from the laptop.

Next I fired up Touchcab on the phone and it immediately connected to the layout. Cue run loco from iPhone.

So what are the advantages of all this? On Aberbeeg I have got rid of three small control panels, with associated power supplies (all now controlled from Touchcab), three Lenz handsets and three data cables that ran the length of the layout. This save 20 minutes of set up/knock down time and gives fewer components to fail. In addition everyone hated the Lenz handsets but now our resident septic thinks that TouchCab is the best controller he has ever seen. Instead of the sequence taking 1hr 40 mins we run through in 1 hr which means more trains moving. This also makes the fiddle yards easier to run as the drivers move trains out as soon as they are ready up to the first signal.

In addition, I have written the complete loco, point and signal configuration on my iPhone. I can pass this to each of the operators through the router. I now have a configuration for each layout on the phone. To me this isn't gimmick but one of the best improvements in operating a train set.

Hope this is of use. Blame Dog Star for this as he asked me to document it. Grahem, time for Tiffin!

Simon
 

Dog Star

Western Thunderer
Thank you Simon for producing this topic.

Peter and I were watching Simon's DCC system in use at Larkrail this month and my son suggested that this implementation was decent tech and worth using for our layout. Too true in that the Magic Box removes the need for an ExpressNet bus along the baseboard and the associated handset sockets... more to the point, "control-in-a-case" is portable and allows us to use our (packaged) DCC kit with our layout, with the Basingstoke Club layouts, and with Hartley Hill.

Just one DCC bus to connect the case to any layout.

All for around £200 over and above the basic DCC price.

regards, Graham
 

Tim V

Western Thunderer
I use a similar set up with but with JMRI, and a cheap tablet.

The only downside is using a touch screen to control the trains, it "doesn't" quite have the same feel as a control knob, but the flexibility it brings is great.
 

flexible_coupling

Western Thunderer
I'm very interested in trying this kind of operation out at some stage... I saw a demo several years ago using a mini netbook PC and it was very cool. That being said, I need a working loco first!!!
 

Dog Star

Western Thunderer
So ten weeks after seeing Simon's demonstration of wireless control of a layout using an i-phone we have managed to create an imitation of the Witchcraft Case:-

Wireless case 1.jpg

Wireless case 2.jpg

Same sort of contents... we have included a 4-way 240V socket with USB ports for power to the wireless device and for charging i-phones (and i-pads). The Lenz expressnet faceplate has been mounted horizontally so as to ease the connection of a Lenz handset (if required).

The tplink device needs configuration and that has been a mini-nightmare. We went to visit Simon for help in getting the case set up and for configuring Touch-cab (on an i-pad). No matter what we/Simon did we could not get our tplink device to function as a "router" - yet swapping our device for the one from Simon's case enabled operation of our system "immediately". Back to PC-world to exchange the device. The replacement device refused to play ball when set up as instructed by Simon... rethink of our understanding of the instructions that come with the tplink device. A reset of the device to factory default settings and then re-configure as an access point gave us the ability to control the layout from an i-pad.

So Simon has a working case full of wireless witchcraft and we have a working case of black magic... neither Simon nor I, as of today, understand why Simon's device works as a router whilst our device works only as an access point. I suspect that the answer lies in how Touch-cab uses TCP/IP to communicate with the Lenz control unit and the manner in which the tplink box transfers data to / from the Lenz expressnet interface.

Anyone got any suggestions?

regards, Graham
 

Steph Dale

Western Thunderer
Guys, there is a slightly cheaper option - the ZTC 640 USB interface is £60 and works fine with the Lenz system. It also seems to be a little easier to set up, although you will need to make a cable to hook it up...

Steph
 

demu1037

Western Thunderer
Anyone got any suggestions?

regards, Graham

Yes Graham,

Persevere -the results will be worth it

Without knowing any of the techy giggerpokery, I recall a friend who was having trouble setting his up and it was a hardware issue -I'll try & find out when I next see him.

Regards

Andy
 

Dog Star

Western Thunderer
Persevere - the results will be worth it.
Quite, just so, absolutely.

Andy, the current question is not "how to get the thing to work?".... more along the lines of "why does it work?".

Simon and Peter have pretty identical content in their Witchcraft cases and both cases work in that Touch Cab connects to the layout and loco control is possible using i-thingies. The puzzle, to me, is why we could not get our tplink box to work in the same communication mode as Simon's box - ours is set up as Access Point and Simon's is set up as Router.

Since posting this morning I have read oodles of posts to the Touch Cab forum and there is a very relevant topic about configuring the wireless interface to communicate with the Lenz LAN/Xpressnet box. The topic implies that the task can be difficult and offers several solutions, most of those solutions involve DHCP and assigning IP addresses. More than 30 years in communications system has not helped me in that I do not understand what is written in that topic (being conversant only in Arinc 429, Mil-Std-1553B and Decnet) - suffice to say that we did not have to set any IP address when configuring the tplink device as an access point. I do hope that someone here is able to comment, in a lucid and clear manner, on just what goes on along the LAN interface.

regards, Graham
 

Steph Dale

Western Thunderer
Can I just ask a couple of things here as I'm interested too. However, having recently 'bricked' an iPad2 (not mine!) by upgrading to iOS8 I'm now even more anti 'iDevice' than I was before, and am also wondering if there are any compatibility issues with Apple's disastrous new operating system?
And what about us Android/Linux users, is there a TouchCab version? I couldn't find anything in either a general search or the Google Store.

I've been looking at RocRail, which seems to suit my needs, but wonder if anyone here has any experience with it?

Steph
 

Dog Star

Western Thunderer
Steph,

The Touch Cab website is amazingly open about road plans, problems and fixes... with very little froth or dross. My understanding of the Android question is that the owner of Touch Cab is not interested in Android because of two concerns:-

1/ platform stability and rate of revision;
2/ loss of IPR protection due to ability to re-engineer Android applications.

Please note that the above is my interpretation of the content of relevant forum topics.

As for Apple o/s, the same website suggests that the owner has no intention of getting bitten by upgrade disasters.

For the moment I am happy to stay where we are even though that means that Peter is likely to have to buy a couple of i-pod thingies as handsets (comparable price to Lenz LH-100 handset).

regards, Graham
 

demu1037

Western Thunderer
for the moment I am happy to stay where we are even though that means that Peter is likely to have to buy a couple of i-pod thingies as handsets (comparable price to Lenz LH-100 handset).

regards, Graham

you can buy them quite reasonably - the discarded ones that don't have all the latest bells an whistles :) - after all, they will only be 'handsets', not as if you are going to browse the net with them!

Andy
 

SimonT

Western Thunderer
The real proof that this is witchcraft is this router bit.
When I set mine up I first established wireless contact from my lap top with the router. Easy piezy. I then opened the lousy Lenz CV and control application on the lap top and attempted to contact the interface device. Only a partial success as I got various unintelligible Lenz error messages. So I carried out Digital Procedure Number 1 and switched it all off then on again. Success and I could drive a train. I then turned to Touchcab. It went through the start up and reached the step where it asks for the IP address of the device that you are wanting to contact. This showed the address of the Lenz Interface and not the address of the router. This is the step that we could not achieve with the Dog Star Tplink. In other words my router could find the interface and communicate with it while the Dog Star unit could not.

the ZTC 640 USB interface
Steph, we needed a LAN connection to the Tplink and not a USB.

iDevice Upgrades. Not while I have a hole in my backside. When this phone dies I will probably go back to my Nokia 6210i and do without interweb access when out of the house; I have a spare iPhone from my daughter to provide Touchcab. Wiltshire doesn't exactly have great 3G coverage. Wiltshire has dire 3G coverage.

Simon
 

Simon

Flying Squad
I'm not entirely understanding but am nonetheless enjoying this thread, boffinery at its best.

Sort of "Man From Uncle" gets a train set, or should that be "Man from C&A"....

Dem bones dem bones....

Sorry, I'll get back to my Multimaus!

Simon
 

Steph Dale

Western Thunderer
Steph, we needed a LAN connection to the Tplink and not a USB.

Simon
Aah, right; different architecture. But then, I suppose it would be. I was looking at doing route control and roster management through visual displays, which means rather more software functionality. It also means the coms are routed slightly differently, and suddenly RocRail's client and server approach starts to make sense.
Steph
 

Railwaymaniac

Western Thunderer
Graham;

Here we go, treatise on TCP/IP addressing coming up. (Strictly speaking, that's IP V4 addressing, IP V6 is another different nightmare ...)

Firstly:-
A device needs both an IP address and a sensible subnet mask.
Typical pairings of these are :-
IP:- 192.168.0.13 S/net mask:- 255.255.255.0
IP:- 10.0.0.156 S/net mask 255.255.0.0

Taking the first one of those examples, the zero on the R.H end of the S/net mask means that your device can communicate with any other device whose IP address starts with '192.168.0' - a device with address 192.168.0.95, for example.

Therefore all of the IP capable devices on your system must have similar and compatible IP addresses and subnet masks before they will talk to each other.
Oh, and each device must have a different IP address to all other devices on the system. S/net mask would be the same in all cases on a given system.

Secondly:-
There are two ways that a device can receive an IP address.
Either the device is given an IP address (*AND* a S/net mask, in all cases) by the system administrator - you, in this case. This is called 'Fixed IP'

Or a device can be set to ask for an IP address. This implies that one of the devices on the system can supply such an IP address and is called a 'DHCP server'. I would suggest that your router is capable of doing this.
The router would need to be configured to supply a range of these addresses, 192.168.0.10 to 192.168.0.30, for example.

The router MUST have a fixed IP - you'll probably find it is set to 192.168.0.1 or 192.168.1.1


Possibilities :-
1) You have a 'fixed IP' device with no IP address or no subnet mask assigned
2) You have a 'fixed IP' device with the wrong IP address or the wrong subnet mask assigned
3) You have a device asking for a DHCP address and there is no DHCP sever in the system
4) your DHCP server is dishing out the wrong IP range or the wrong subnet mask

Does any of this strike a chord?

Ian
 
Top