Page: SDL: FAQ - Connecting CS2
Date: 2011-12-10
Last update: 2011-12-10
Languages: EN
Author: Mafi

 


Connecting to CS2 / Verbindung zur CS2


CS2 (aka 60213 / 60214 / 60215)

This digital central unit has a built-in Ethernet-port for connecting the Mac to it. Use a crossover-cable to connect the CS2's Ethernet-port with the Ethernet-port of your Mac. Make suitable settings inside the CS2: give the CS2 an IP-address which fits to your setup of a local area-network (LAN), for example "192.168.0.5". Shown here for CS2 with firmware v1.4.2 or older:

  • go to tab "setup" in the CS2,
  • click on the wrench-icon (Schraubenschlüssel) in the lower left-corner to enter configuration mode,
  • select register-tab "IP",
  • select manually setting of the IP-address,
  • enter the IP-address which your CS2 should get,
  • enter CS-IP-Netmask "255.255.255.0",
  • enable "Start gateway" = "Gateway starten" (otherwise the CS2 will not talk via Ethernet, but can still read datagrams),
  • enter as destination address the broadcast-address of your LAN (#.#.0.255),
  • confirm all settings by clicking on the green icon in the lower right corner of the window.

For CS2 with firmware version v1.5.2 or newer you must make your settings in two setup-screens: "IP" and "CAN":

  1. go to tab "setup" in the CS2,
  2. click on the wrench-icon (Schraubenschlüssel) in the lower left-corner to enter configuration mode,
  3. select register-tab "IP",
  4. select manually setting of the IP-address,
  5. enter the IP-address which your CS2 should get,
  6. enter CS-IP-Netmask "255.255.255.0",
    IP-Gateway and DNS-Server can get the address of your router (in case you have the CS2 connected to a router), in the example above this would be "192.168.0.1". In case your CS2 is directly connected to your computer, connection might require to set IP-Gateway and DNS-Server to the IP-address of the connected computer.
  7. select now register-tab ">", to proceed to the right to register-tab "CAN":
  8. select the register-tab "CAN",
  9. enable "Start CAN-gateway" = "CAN-Gateway starten" (otherwise the CS2 will not talk via Ethernet, but can still read datagrams) by selecting "broadcast",
  10. enter as destination address the broadcast-address of your LAN (in the example above: #.#.#.255),
  11. confirm all settings by clicking on the green icon in the lower right corner of the window.

Make similiar settings on your Mac, using the system preferences "Network". Ensure that both, CS2 and Mac, have different IP-addresses. Example for the Mac's IP-address might be: "192.168.0.1". Mac and CS2 must have their IP-addresses within the same LAN-range.

On the Mac, you must also ensure that the Firewall enables UDP-traffic via Ethernet-port. When using MacOS-X 10.4, make these Firewall-settings within the system preferences "Sharing", tab "Firewall". You can disable the Firewall entirely or you can use "Advanved options" to enable UDP-traffic only.

When using MacOS-X 10.5 or later, make such settings within the system preferences "Security". Again, you can disable there the Firewall entirely or you select your SDL-X application and give it special advanced options, allowing UDP-traffic.

Then launch SDL-X on your Mac and call the window "Setting the Serial Port" (Cmd-I). Here you must select the desired digital central unit. When selecting "Mrkl60213", the program will automatically set the only available syntax and the protocol method "UDP". You must select the Ethernet-port to which your CS2 is connected. Then you must enter the IP-address of the CS2 and the two broadcast-ports for communication: for outgoing datas you must enter the port number "15731" and for incoming datas you must enter the port number "15730". See the following picture. Once this is done, you must push the button "Connect to device". We recommend to set an accessory switching time of 250ms. Accessories with a time less than this defined inside the CS2 itself, should be set off by the CS2 earlier. But SDL-X will send an "accessory-off" command to the CS2 in any case (as long as the connection will stay "on").

In case of performance problems you can disable the usage of the UDP-ports by deactivating the checkboxes at the right side of the port's edit fields. In case the connection is already done (perhaps automatically on startup), then this deactivation will have effect only after a program restart. Deactivating the incoming port 15730 might make sense in case the CS2 is sending too much datas.

More settings to the UDP-traffic handling can be done within the tab "CS/ECoS" of this window.

 

Which address to be entered for commanding vehicles with a CS2:

The CS2 will send vehicle commands to the tracks no matter if these vehicles are defined in it's own internal database (concerning old-style decoders with MM or DCC format). Commanding vehicles with a MM1/MM2-decoder can be done by entering the decoder's address in the "ControlF" window of SDL-X:

Commanding vehicles with a DCC-decoder in it can be done by entering the decoder's address prefixed by the word "dcc". SDL-X will then automatically calculate the correct address to command this decoder (CS2's DCC-loco-decoder address range starts at 0xC000):

For mfx-decoders this is a little bit more complicated. We believe, that the CS2 will send only commands to the tracks in case of these if they are defined inside the CS2's own vehicle table. To make the CS2 accept such commands, you must know the vehicles "uid". Valid "uid"s of mfx-vehicles starts at 4000hex. You can retrieve the currently valid "uid"s by examining the CS2-backup-file "lokomotive.cs2" (plain ASCII file). SDL-X accepts to ways of entering such "uid"s as addresses: by prefixing the word "mfx" of by entering hex-values (postfixing "h" or prefixing "0x") or a combination of both:

The same address-entering methods can be used in SDL-X's window "Vehicle table", too. When saving the vehicle table to disk, SDL-X will caculate and save the decimal addresses. So when loading the file on next program launch, you will no longer see your prefixes but the correct decimal values. Currently SDL-X offers you to access up to 33 decoder functions (F0 to F32), although the CS2's GUI is made to access F0 to F15 and it's GFP might be capable to command up to 32 functions for each decoder.

 

Which address to be entered for commanding accessories with a CS2:

The CS2 will accept MM- and DCC accessory-decoder addresses (MM2-range 1 - 320 or perhaps up to 1024, DCC-range 1 - 2048). Using the window "Keyboard" or the switchboard windows, you must select whether to use MM2- or DCC-accessory addresses. If you want to mix both formats, you must define these entries in SDL's accessory table accordingly. Then you can simply enter the decoder addresses, like being connected to a mrkl6051 or IB.

*

*