JMRI: WiFi Throttle Communications Protocol

This page describes the protocol provided by the jmri.jmrit.withrottle package for controlling trains through JMRI via a TCP/IP link.

Open a TCP/IP link to the port advertised via ZeroConf/Bonjour as the servicve "_withrottle._tcp.local.".

The first letter is interpreted by the DeviceServer class to determine where to send the rest of the package.

  1. 'T' sends to the throttle controller class.
  2. 'N' is the device name.
  3. 'Q' indicates the device has quit, close its window.
  4. 'C' is not used anymore and forwards to the throttle controller.

Throttle Controller:

These would follow the 'T'

Send Laddr, or Saddr to allocate a throttle. "L" means Long DCC address, "S" means Short DCC address. e.g. TL345 will tell the throttle controller to request long address 345. When the address is set, the Device Server will send out the acquired address to the mobile device.

R0 is reverse, R1 is forward. e.g. TR1 tells throttle controller to set direction forward.

Viii sets speed, where iii is an integer value between 0 and 126. e.g. TV63 will have the throttle controller set the speed value to 50%

'r' and 'd' "release" and "dispatch" the throttle. For most DCC systems, these are the same thing; if in doubt, use release. Device server will then send "Not Set" to the mobile device.

Function buttons are not latched by the connected mobile device. Instead the packages sent from the device to JMRI indicate when a button is pressed, and when it is released. The format is 'F' followed by 0 or 1 for released and pressed, followed by the function number. e.g. TF13 says the button for function 3 is pressed, and TF03 is sent when the button for function 3 is released. The throttle controller then checks to see if that function is momentary, and handles it accordingly.

This is the package/jmri/jmrit/withrottle/Protocol help page