Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline Onkenhout  
#1 Posted : 23 October 2015 04:25:13(UTC)
Onkenhout

United States   
Joined: 21/10/2015(UTC)
Posts: 4
Location: Florida, Boca Raton
Hi,
I am fairly new to CS2 and its associated decoders etc. Found it very cumbersome to create and edit keyboard layouts not to mention Routes (Fahrstrassen).

So I created an Excel workbook that enables me to do that much faster with all the editing and other tools the PC offers, although initially created to more easily and thoroughly prepare for a new design, I came to realize that I still would have to do the error prone manually keying in of whatever I created on the PC.

So after a little research into the structure of the backup files CS2 creates/accepts I wrote a compiler that takes the stuff created on the PC (Excel), and translates it into proper CS2 format. With the help of my long standing friend Total Commander (author: Ghisler) I am able to reinsert the fahrstrassen and magnetartikel files into the original backup, and do a restore. Net effect: all the stuff from the PC is uploaded into CS2 in 3 minutes flat.

Maybe you guys & gals have long since solved this issue and I am re-inventing the wheel.

But if not, feel free to contact me if you are interested to learn more. Or have a better solution that I can use.

Note: this is a first (?) prototype, with many opportunities to enhance, but it does what I need it to do.
thanks 8 users liked this useful post by Onkenhout
Offline siroljuk  
#2 Posted : 23 October 2015 08:03:01(UTC)
siroljuk

Finland   
Joined: 29/10/2010(UTC)
Posts: 377
Hello Onkenhout!

Would it be possible to publish, the idea you have developed in this forum. In that way everyone interested in it, would see and can comment.

I would like to see all what you have done and I´m willing to try in practice also.

Please show more what you have done and how we could do also.

Regards Jukka Sirola
Finland
thanks 1 user liked this useful post by siroljuk
Offline Goofy  
#3 Posted : 23 October 2015 20:14:46(UTC)
Goofy


Joined: 12/08/2006(UTC)
Posts: 8,993
Originally Posted by: Onkenhout Go to Quoted Post
Hi,
I am fairly new to CS2 and its associated decoders etc. Found it very cumbersome to create and edit keyboard layouts not to mention Routes (Fahrstrassen).

So I created an Excel workbook that enables me to do that much faster with all the editing and other tools the PC offers, although initially created to more easily and thoroughly prepare for a new design, I came to realize that I still would have to do the error prone manually keying in of whatever I created on the PC.

So after a little research into the structure of the backup files CS2 creates/accepts I wrote a compiler that takes the stuff created on the PC (Excel), and translates it into proper CS2 format. With the help of my long standing friend Total Commander (author: Ghisler) I am able to reinsert the fahrstrassen and magnetartikel files into the original backup, and do a restore. Net effect: all the stuff from the PC is uploaded into CS2 in 3 minutes flat.

Maybe you guys & gals have long since solved this issue and I am re-inventing the wheel.

But if not, feel free to contact me if you are interested to learn more. Or have a better solution that I can use.

Note: this is a first (?) prototype, with many opportunities to enhance, but it does what I need it to do.


When you do this,the warranty disappear at once!
Trust me...Märklin do visit here too and reading yours comments.

H0
DCC = Digital Command Control
Offline Thewolf  
#4 Posted : 23 October 2015 20:20:50(UTC)
Thewolf

Canada   
Joined: 08/09/2015(UTC)
Posts: 2,035
Location: Saint Mathias dur Richelieu-Canada
Originally Posted by: Goofy Go to Quoted Post
Originally Posted by: Onkenhout Go to Quoted Post
Hi,
I am fairly new to CS2 and its associated decoders etc. Found it very cumbersome to create and edit keyboard layouts not to mention Routes (Fahrstrassen).

So I created an Excel workbook that enables me to do that much faster with all the editing and other tools the PC offers, although initially created to more easily and thoroughly prepare for a new design, I came to realize that I still would have to do the error prone manually keying in of whatever I created on the PC.

So after a little research into the structure of the backup files CS2 creates/accepts I wrote a compiler that takes the stuff created on the PC (Excel), and translates it into proper CS2 format. With the help of my long standing friend Total Commander (author: Ghisler) I am able to reinsert the fahrstrassen and magnetartikel files into the original backup, and do a restore. Net effect: all the stuff from the PC is uploaded into CS2 in 3 minutes flat.

Maybe you guys & gals have long since solved this issue and I am re-inventing the wheel.

But if not, feel free to contact me if you are interested to learn more. Or have a better solution that I can use.

Note: this is a first (?) prototype, with many opportunities to enhance, but it does what I need it to do.


When you do this,the warranty disappear at once!
Trust me...Märklin do visit here too and reading yours comments.



I agree
Project The Richelieu Valley Railway-CS2-Track C- Itrain-Digital
Offline siroljuk  
#5 Posted : 24 October 2015 07:59:54(UTC)
siroljuk

Finland   
Joined: 29/10/2010(UTC)
Posts: 377
Hello!

Of course Märklin people read this forum, hopefully they also change their policy example considering what language they favor.

But in this case I don´t see any problem to open more and more how we could make use of the information which is there for everybody wide open. In this I mean CS2´s open web-server and all information which can be taken from there.

I believe that because the obtainable information has bee published open, Märklin people hope that we do more and more suggestions about how to develop their products.
I really hope that somebody closely related with Märklin will comment this.

Of course you if you start to do changes like Onkenhout has done, you have think that some kind of disaster might take place. Then of course warraty might be gone.

If you look closely in some posts in this forum and in Internet you can see much more dangerous methods witch certainly broke warranty and nobody has not mentioned anything about that.

Remember this is only software not hardware.

Happy training everyone

regards

Jukka
thanks 1 user liked this useful post by siroljuk
Offline walter__  
#6 Posted : 24 October 2015 12:28:03(UTC)
walter__

Belgium   
Joined: 30/12/2013(UTC)
Posts: 19
Location: Antwerp
Hi all,

Did these kinds of "experiments" with changing backup and restoring it to fast implement my magnet items, though it takes a little work doing it manually, it works nicely.
The way M creates the backups is an invitation to use them this way BigGrin

Quote:
When you do this,the warranty disappear at once!
Trust me...Märklin do visit here too and reading yours comments.

If you tamper with firmware then I totally agree, in this case I don't think this is true, we are only changing user settings, not the firmware.. its similar to changing by hand on a CS2 or using any (M) software for it.
Its only doing what they describe using another tool, and if you make an accidental wrong entry, the software in CS2 sets that entry to default value.... at least in my tests Cool

Greetings,
Walter
thanks 5 users liked this useful post by walter__
Offline kiwiAlan  
#7 Posted : 24 October 2015 13:46:57(UTC)
kiwiAlan

United Kingdom   
Joined: 23/07/2014(UTC)
Posts: 8,082
Location: ENGLAND, Didcot
Originally Posted by: walter__ Go to Quoted Post
Hi all,

Did these kinds of "experiments" with changing backup and restoring it to fast implement my magnet items, though it takes a little work doing it manually, it works nicely.
The way M creates the backups is an invitation to use them this way BigGrin

Quote:
When you do this,the warranty disappear at once!
Trust me...Märklin do visit here too and reading yours comments.

If you tamper with firmware then I totally agree, in this case I don't think this is true, we are only changing user settings, not the firmware.. its similar to changing by hand on a CS2 or using any (M) software for it.
Its only doing what they describe using another tool, and if you make an accidental wrong entry, the software in CS2 sets that entry to default value.... at least in my tests Cool

Greetings,
Walter


I agree that it is doubtful that this method will void the warranty. How is Marklin going to know how the setup was loaded into the CS? Was it by hand, that then had a backup made and later restored, or was it by fiddling a backup in the method described? They won't be able to tell.

I agree that fiddling with the firmware is likely to void the warranty - but first you have to get at the firmware ... BigGrin

thanks 3 users liked this useful post by kiwiAlan
Offline Onkenhout  
#8 Posted : 24 October 2015 20:26:48(UTC)
Onkenhout

United States   
Joined: 21/10/2015(UTC)
Posts: 4
Location: Florida, Boca Raton
Hi Everyone. Ignore the warranty issue please. The point of posting my message was to let you know I got something helpful to do fast keyboard and Route development and implementation. It helps me save lots of time and errors (hand typing stuff into CS2). I thought that some of you might find it helpful for your own designs.

So if yes: let me know, if no that is fine too. But let's stay on-topic. No need for observations other than if you find this helpful (or you have something better).
thanks 6 users liked this useful post by Onkenhout
Offline Webmaster  
#9 Posted : 24 October 2015 21:13:27(UTC)
Webmaster


Joined: 25/07/2001(UTC)
Posts: 11,161
I think this is an excellent idea of doing it, even better would be if Märklin could provide us with a small free software package that could read & write directly to the "magnetic articles" and route config files.

The Main Station iPad app can do this, but you still have the tedious data entry work to do through the user interface. It is better done by sitting comfortable at a computer than with touch screens.

On a side note, this has nothing to do with warranty since you create the configs yourself anyway and you don't mess up the CS2 itself - just your own settings.
Juhan - "Webmaster", at your service...
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
thanks 3 users liked this useful post by Webmaster
Offline tfk  
#10 Posted : 24 October 2015 21:57:02(UTC)
tfk

Netherlands   
Joined: 18/10/2015(UTC)
Posts: 17
Location: Somewhere in the Netherlands
Firstly
Märklin does allow for users to change user data. The backup function is one example. When you create a backup then you should be able to put it back. When you navigate to the IP address of your CS2 you will find some pages for managing user defined data. Take a look at the lokcvs and magcvs tab sheets. These contain a nice list of files and an upload form at the bottom. I don't know if they work but hey, they're there.

Secondly
I do see why Märklin is a bit apprehensive concerning their users exploring the more intimate features of the CS2. They just do not want to be confronted with the problem of everybody asking for free repairs when something goes wrong. The easiest way to get around this problem is via the warranty void clause.

Thirdly
They choose a very open system to base the CS2 on -Linux- and they've chosen well. The consequence is that this open architecture means that a multitude of people know about it's technology. Märklin knows this. Andreas Kielkopf one of the chief developers mentioned this in an article I once read. He said something like "I know that some smart users can get around the security measurements we took. That's OK. As long as they know that their warranty will be void when they do so". And I agree with this approach.

Fourthly,
I am a big fan of the following Linux phrase: "When you don't have the root password, you don't own the box". This means that the user who is the administrator is the owner. This is a very healthy approach and it is for this reason. In the Linux world the owner/administrator of the system is not the manufacturer of the computer nor is the software house that created the operating system. It's the one who installed the operating system and thus has root privileges over this system. The community reasons that this user has enough knowledge to keep the system stable. It's a question of responsibility.

Fifthly,
So there you are. Using this information as a template you see that all the wishes of all the parties fit. When a user reckons he or she has enough knowledge to run the box him or herself, he or she could do so, releasing Märklin's obligation to deliver service when something goes wrong. That's the warranty part.

In conclusion, the choice is yours. If you reckon you're up to it, own the box. When in doubt then please let Märklin do it for you...

Cheers!
TFK
TFK
thanks 1 user liked this useful post by tfk
Offline Hackcell  
#11 Posted : 24 October 2015 22:04:19(UTC)
Hackcell

Costa Rica   
Joined: 21/11/2013(UTC)
Posts: 521
If you ask me, I love Okenhout's idea and I want to learn more about it.
Danilo Jiménez
Union Pacific and DB Cargo H0 models.
Märklin, Brawa, MTH and some Walthers cars (nobody is perfect!)
Pinball machines, jukeboxes and Horses.
Costa Rica, pura vida!!
Offline tfk  
#12 Posted : 24 October 2015 22:23:45(UTC)
tfk

Netherlands   
Joined: 18/10/2015(UTC)
Posts: 17
Location: Somewhere in the Netherlands
Originally Posted by: Hackcell Go to Quoted Post
If you ask me, I love Okenhout's idea and I want to learn more about it.


Yep, me to. ThumpUp
TFK
TFK
Offline siroljuk  
#13 Posted : 25 October 2015 07:38:04(UTC)
siroljuk

Finland   
Joined: 29/10/2010(UTC)
Posts: 377
Good Morning

As I have earlier said I would like learn more.ThumpUp ThumpUp

Happy Training

Regards

Jukka
Offline Goofy  
#14 Posted : 25 October 2015 10:59:41(UTC)
Goofy


Joined: 12/08/2006(UTC)
Posts: 8,993
If Märklin present new upgrades,you will get problems with the bugs as result.
It´s truth about firmware,but it does stand for what Märklins CS2 is working like that.
I would not changed CS2 by self.
By use Ipad or Iphone,you can always choose different apps,by download them.
But you can´t change the app program itself.
H0
DCC = Digital Command Control
Offline Purellum  
#15 Posted : 25 October 2015 11:18:59(UTC)
Purellum

Denmark   
Joined: 08/11/2005(UTC)
Posts: 3,498
Location: Mullerup, 4200 Slagelse
Cool

Originally Posted by: Goofy Go to Quoted Post
If Märklin present new upgrades,you will get problems with the bugs as result.
It´s truth about firmware,but it does stand for what Märklins CS2 is working like that.
I would not changed CS2 by self.
By use Ipad or Iphone,you can always choose different apps,by download them.
But you can´t change the app program itself.


I don't think you understand what Onkenhout is doing here.

The CS doesn't "know" in which way the files are uploaded, the end result is the same as if you typed everything in manually.

Per.

Cool

If you can dream it, you can do it!

I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

UserPostedImage
thanks 2 users liked this useful post by Purellum
Offline H0  
#16 Posted : 25 October 2015 11:54:07(UTC)
H0


Joined: 16/02/2004(UTC)
Posts: 15,254
Location: DE-NW
Originally Posted by: kiwiAlan Go to Quoted Post
I agree that fiddling with the firmware is likely to void the warranty - but first you have to get at the firmware ... BigGrin
Version 3.7 is available for USB upgrades. You can patch it and upload a patched version to your CS2.
A lot can go wrong when you try that.

Replacing the boot and shutdown screens would be simple things to start with.
Regards
Tom
---
"In all of the gauges, we particularly emphasize a high level of quality, the best possible fidelity to the prototype, and absolute precision. You will see that in all of our products." (from Märklin New Items Brochure 2015, page 1) ROFLBTCUTS
UserPostedImage
Offline tfk  
#17 Posted : 25 October 2015 21:40:15(UTC)
tfk

Netherlands   
Joined: 18/10/2015(UTC)
Posts: 17
Location: Somewhere in the Netherlands
Originally Posted by: H0 Go to Quoted Post
Version 3.7 is available for USB upgrades. You can patch it and upload a patched version to your CS2.
A lot can go wrong when you try that.

Replacing the boot and shutdown screens would be simple things to start with.


Basically you're doing the same as with the download from the CS2. Only thing is that this version is older and is zipped into a tgz archive and and combined with an img image file. The tgz archive BTW is for the kernel libraries of the reiserfs file system and the cs2.arm program and the image (img) file is a complete filesystem like a CD/DVD image.

Why it's an older version? The usb update is always behind regarding versions. I think because Märklin has to test these upgrades too and I can imagine that this point is a bit further down their development agenda. I think when you perform the update as without touching it, thus as presented by Märklin, all will be fine.

One thing which is missing from the update is the most important one. I must congratulate Märklin with this fact as they clearly have put allot of thought into this and it shows that they know how to use Linux. This missing element is de /boot partition. So even when you foul up the update the system remains bootable.

Regarding start and shutdown images. Those are in a raw format and they are directly fired to the rendering engine. Basically it's the information as it is sent to the screen, a "blob" of information if you will. I think you can make them using ffmpeg -a video converter tool- but I still need to test this on my own machine to see if my assumption is correct...
TFK
TFK
Offline Onkenhout  
#18 Posted : 27 October 2015 01:31:19(UTC)
Onkenhout

United States   
Joined: 21/10/2015(UTC)
Posts: 4
Location: Florida, Boca Raton
Hi everyone. Thank you all for your observations. I now realize my tool needs a bit more explanation. So:

1. the tool is NOT a Linux compiler to create a different CS2.
2. In fact it is a configuration file writer for the two most important files: fahrstrassen.cs2 (routes) and magnetartikel.cs2 (solenoid devices). Why do I need this??

3. My design concept uses m84 relays to "memorize" the state of the track (flag), for example relay m84-4/port 1 is green when track 9 is free and gets set to red when occupied. (this is done with reed switches in the track, which feed into a S88 decoder). The m84 port itself has its middle port connected to 19V- (brown) and its red port to an S88 port as well. Net effect: I can set the state of a track, and I can use it as a flag to allow/deny Routes to run. This makes me independent of (error prone) rail contacts. The reed switches give a relatively reliable single pulse (as opposed to wheel - short-circuiting -based alternatives).

4. So I have about 25 state relays and 40-50 contact givers. Oh, and there are about 10 trains running automatically with 13 sections of track, 20 odd turnouts and 10-15 Signals. This requires a lot of CS2 Keyboard design work and about 40 or so Routes to keep things from blowing up. It is a nightmare to enter that into CS2 manually, let alone debug and change.

5. So, I set up an elaborate spreadsheet that allows me to (1) enter a keyboard layout, (2) enter flags and triggers, define Routes. The VB software I wrote then takes all that, checks it (like good compilers do), allows me to fix errors and then produces the two files. Using Total Commander (author: Ghisler) I stick the two files in an existing backup.tgz file (TC takes care of all the details - it makes the encoding and decoding totally transparent). Then I restore the file to CS2, and voila!, it all appears in CS2 like magic.

6. Simple but effective. The reason for my post was that it is very time consuming to write and debug the actual code, so if anyone wants to use/or discuss this more: Let me know (and we'll probably do that off-line).

Thanks again for all your feedback!
thanks 3 users liked this useful post by Onkenhout
Offline H0  
#19 Posted : 27 October 2015 08:11:52(UTC)
H0


Joined: 16/02/2004(UTC)
Posts: 15,254
Location: DE-NW
Hi!
Originally Posted by: Onkenhout Go to Quoted Post
1. the tool is NOT a Linux compiler to create a different CS2.
2. In fact it is a configuration file writer for the two most important files: fahrstrassen.cs2 (routes) and magnetartikel.cs2 (solenoid devices).
I understood this right from the start. Still I think it is good to clarify this.

I don't know how the CS2 will react if your tool corrupts those two configuration files. No problem if it still boots and the configuration files can still be replaced.
If the CS2 no longer boots and has to be sent to Göppingen for repair then the warranty would be void. They may not notice the manipulation and repair it on warranty, though.


It seems editing the configuration files is quite common. I heard from others who tried that, but I think they didn't write tools.
Regards
Tom
---
"In all of the gauges, we particularly emphasize a high level of quality, the best possible fidelity to the prototype, and absolute precision. You will see that in all of our products." (from Märklin New Items Brochure 2015, page 1) ROFLBTCUTS
UserPostedImage
Offline tfk  
#20 Posted : 27 October 2015 19:57:24(UTC)
tfk

Netherlands   
Joined: 18/10/2015(UTC)
Posts: 17
Location: Somewhere in the Netherlands
Hi,

Originally Posted by: H0 Go to Quoted Post

I don't know how the CS2 will react if your tool corrupts those two configuration files. No problem if it still boots and the configuration files can still be replaced.
If the CS2 no longer boots and has to be sent to Göppingen for repair then the warranty would be void. They may not notice the manipulation and repair it on warranty, though.


It seems editing the configuration files is quite common. I heard from others who tried that, but I think they didn't write tools.


Whether it is a tool that has a fault or a user who makes a typo doesn't really make a difference. The CS2 should just show an error message. I think the warranty issue doesn't apply for this type of files. Simply because Maerklin added a page for it on the web server that is served by the CS2. Just enter the IP address of your CS2 in a browser and you will be presented by this:

CV upload webpage on CS2

Cheers!
TFK
TFK
thanks 1 user liked this useful post by tfk
Offline Johnvr  
#21 Posted : 11 May 2018 20:00:44(UTC)
Johnvr

South Africa   
Joined: 03/10/2010(UTC)
Posts: 1,269
Location: Cape Town, South Africa
Hi all,

This is an old topic .. I am curious to find out any updates again.

I have the same requirement as other people .. to be able to download all of my CS2 Routes data onto a Memory Stick, and then use some computer software to read and analyse the information. The primary purpose of this is for Debugging of Routes, mainly operated by Circuit Tracks.

Unfortunately the CS2 does not have a feature where you can list all of the Routes in a simple list and filter on them to find a particular one. For example, if a certain home signal switches to green unexpectedly, and you cant remember which circuit track triggers it, then it would be useful to select the home signals from a drop-down list of your signal accessories, and find the circuit track which was the cause of the activation of that home signal.

I have asked the same question to a friend who operates and ESU Central Station to find out whether there is a filter option there.
(For a friend of mine who has an ESU Central Station and who similarly operates Routes and Circuit Tracks)

So, if anybody has any good ideas on this topic, I would be interested to hear these ideas.

Regards BigGrin
John
Offline clapcott  
#22 Posted : 12 May 2018 13:07:35(UTC)
clapcott

New Zealand   
Joined: 12/12/2005(UTC)
Posts: 2,433
Location: Wellington, New_Zealand
Originally Posted by: Johnvr Go to Quoted Post
I have the same requirement as other people .. to be able to download all of my CS2 Routes data onto a Memory Stick, and then use some computer software to read and analyse the information.

Why offload to a memory stick when you can access the data driectly?

Quote:
Unfortunately the CS2 does not have a feature where you can list all of the Routes in a simple list and filter on them to find a particular one.

Define simple?
The file from the CS2 is very simple in structure. As it is in text, it can be searched with a normal browser "find"
Or you could pump it into a Excel and run a macro.
I just parse the file with a small VB app to overlay icons and colour code things.
The biggest issue is, what format you want to display the data in.

NOTE: this is READING the data and is not the same as WRITING which was what this thread started out covering
Peter
Offline Onkenhout  
#23 Posted : 12 May 2018 14:23:10(UTC)
Onkenhout

United States   
Joined: 21/10/2015(UTC)
Posts: 4
Location: Florida, Boca Raton
Hi John,

In the original post that started this thread I explained that I have written software that allows you to create, edit, and debug Keyboard layouts and Routes, and of course move them back and forth between PC and CS2. If that sounds like it is what you need send me an email and we can discuss more off-line.

Best,
Hein Onkenhout

Offline HughC  
#24 Posted : 06 June 2020 05:35:17(UTC)
HughC

Canada   
Joined: 25/03/2013(UTC)
Posts: 11
Several years ago I did a very similar thing to that described above to (much) more easily handle extensive changes to the layout. I now have a CS3 (the CS2 broke and now thinks it is some sort of booster only) and, boy, has Marklin changed the format of the track plan (as well as the final look)!

My question is: has anyone figured out the syntax of the new format in detail? I am not asking how to get into the zip file, modify individual files etc., but how to change individual lines in the *.cs2 files in sub directory .../plneu to effect a given change on the screen.

Thanks in advance!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

| Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 1.257 seconds.