Joined: 13/10/2007(UTC) Posts: 82 Location: Ystad, Sweden
|
I bought this little add-on board to a Raspberry Pi2 from ifoedit, to connect the two to the trackbox of a MS2. I have started to make my own program to control it from my PC, but my problem is that the doc of the CS2 CAN bus protocol from Märklin (can be downloaded using CAN bus protocol) is in German, and I have "some" problem understand it. I have downloaded a program with source code from r-serwe.de and used that understand how it works. Same thing here, all comments etc are in german... But it works, I can make simple commands. Changing speed or switch on functions is reflected on the MS2. But I would like to understand more of the protocol. Anybody knows if it's available in english anywhere? Thanks Håkan  For me, this is a great board, making it possible for me to use whatever I want to control the trains, the MS2, a PC, a tablet or a smartphone
|
 2 users liked this useful post by hwestl
|
|
|
Joined: 23/07/2014(UTC) Posts: 8,508 Location: ENGLAND, Didcot
|
Originally Posted by: hwestl  I bought this little add-on board to a Raspberry Pi2 from ifoedit, to connect the two to the trackbox of a MS2. I have started to make my own program to control it from my PC, but my problem is that the doc of the CS2 CAN bus protocol from Märklin (can be downloaded using CAN bus protocol) is in German, and I have "some" problem understand it. I have downloaded a program with source code from r-serwe.de and used that understand how it works. Same thing here, all comments etc are in german... But it works, I can make simple commands. Changing speed or switch on functions is reflected on the MS2. But I would like to understand more of the protocol. Anybody knows if it's available in english anywhere? Thanks Håkan  For me, this is a great board, making it possible for me to use whatever I want to control the trains, the MS2, a PC, a tablet or a smartphone I have this google English translation that I have attached. It is a web page, so you need to unzip it into a directory, then open the web page. CS2 CAN Protocol 2-0 Translated_files.zip (356kb) downloaded 187 time(s).You still need to use the pictures from the German one, as Google didn't include the pictures in the translation.
|
 1 user liked this useful post by kiwiAlan
|
|
|
Joined: 01/02/2009(UTC) Posts: 147 Location: Barcelona, Spain
|
Hi Håkan, I've the same setup as you. It works very well with Rocrail. I've also tried it with Märklin CS2.exe and with Freewald's RR&Co.
For the CAN protocol I've the same problem as you, there is not an english version and even the german one is not complete.
[edit] By the way, you don't actually need the MS2.
Regards,
Rafael |
Collecting Era I, II & III, mainly German, French & Spanish RR, some USA |
 1 user liked this useful post by rbonet
|
|
|
Joined: 16/02/2011(UTC) Views messages in topic : 124 Location: Bergamo - italy
|
You might get some useful hints from RocRail Forum (www.rocrail.com): just search for "mgbox" or "Arduino" or "RasPI"
|
 1 user liked this useful post by eroncelli
|
|
|
Joined: 02/04/2013(UTC) Posts: 683
|
|
|
 1 user liked this useful post by Moritz-BR365
|
|
|
Joined: 13/10/2007(UTC) Posts: 82 Location: Ystad, Sweden
|
I found out a nice and cool feature using this setup with a MS2 and a Raspberry Pi2. The MS2 can handle only 10 active locs, easily selectable, and then you you can have others that are "rolled out" with the "Lok freigeben/Free Loco" function. Total of 40, if I interpret the manual correctly (Interner Speicher für 40 locomotiven/40 internal memory locations) Using the PC-program or my own Android-app, I can also control all locs that have been entered but rolled out. I have added 12 locs, and I had no problem controlling a loc that was rolled out using my app. I can now easily select any of my 40 locs of the MS2. After I have added them, of course
|
 2 users liked this useful post by hwestl
|
|
|
Joined: 13/10/2007(UTC) Posts: 82 Location: Ystad, Sweden
|
Today I found out that I don't have to add the locos to the MS2. It's enough that I have them in my app. I just putted a "not registered loc in the MS2" onto the track, added it in my app, and could control it directly. Even better
|
 2 users liked this useful post by hwestl
|
|
|
Joined: 02/04/2013(UTC) Posts: 683
|
Originally Posted by: hwestl  Today I found out that I don't have to add the locos to the MS2. It's enough that I have them in my app. I just putted a "not registered loc in the MS2" onto the track, added it in my app, and could control it directly. Even better Hello Håkan, is Your own app available for download, e.g. as apk-file? Regards, Moritz |
|
|
|
|
Joined: 13/10/2007(UTC) Posts: 82 Location: Ystad, Sweden
|
Hej Moritz Well, not really. It's pretty hardcoded with my locs. From the start I had some thoughts of having it generic, but as time went on I made some shortcuts to make it easy. Mostly regarding the pictures. I can see if I can do some changes in the future. But it's also things like functions. I have only made it available for 10 functions (F1 - F10) since I don't have any loc that has more functions. And then the screen is adapted to my phone, Sony Xperia Z5 Compact But anyway, this is the main screen and one can select loc using the drop down list.  Regards Håkan
|
 2 users liked this useful post by hwestl
|
|
|
Joined: 02/04/2013(UTC) Posts: 683
|
Originally Posted by: hwestl  Hej Moritz
Well, not really. It's pretty hardcoded with my locs. From the start I had some thoughts of having it generic, but as time went on I made some shortcuts to make it easy. Mostly regarding the pictures. I can see if I can do some changes in the future. But it's also things like functions. I have only made it available for 10 functions (F1 - F10) since I don't have any loc that has more functions. And then the screen is adapted to my phone, Sony Xperia Z5 Compact
Hello Håkan, this looks nice. I would like to test if it runs together with the BananaPi solution. What development Environment do You use? Regards, Moritz |
|
|
|
|
Joined: 13/10/2007(UTC) Posts: 82 Location: Ystad, Sweden
|
Originally Posted by: Moritz-BR365  Hello Håkan, this looks nice. I would like to test if it runs together with the BananaPi solution.
What development Environment do You use?
Regards, Moritz
Hej Moritz I'm using Android Studio on a PC. I can send you the source code of my project if you want to. Regards Håkan
|
 1 user liked this useful post by hwestl
|
|
|
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.