Xpressnet™ - Supported Commands

    The following table show a complete list of xpressnet commands. This list applies to the Xpressnet version and to the parser in Lenz-Mode. OpenDCC does not (yet) support double or multi-header.
    Commandlist for Xpressnet (messages from the client to command station)
     OP-CodeVer.Operation

    0x05 0xF1 TCODE1 TCODE2 TCODE3 TCODE4 [XOR]   DCC FAST CLOCK set request.
    Format of TCODEx
    00mmmmmmTCODE1, mmmmmm = denotes minutes, range 0...59.
    100HHHHHTCODE2, HHHHH = denotes hours, range 0...23.
    01000wwwTCODE3, www = denotes day of week, 0=monday, 1=tuesday, a.s.o.
    110fffffTCODE4, fffff = denotes speed ratio, range 0..31. (0=stopped)
    The answer is 0x05 0xF1 TCODE1 TCODE2 TCODE3 TCODE4 [XOR] as broadcast.
    When the command station receives a FAST CLOCK set command, it will generate a clock message on the dcc side with the new setting.

    0x01 0xF2 0xF3   DCC FAST CLOCK get request.
    The answer is 0x05 0xF1 TCODE1 TCODE2 TCODE3 TCODE4 [XOR] as dedicated message to this slave.

    0x13 0x01 B+AddrH AddrL   DCC extended accessory command request. (compact form)
    AddrH (bit A10..A8) and AddrL (bit A7..A0) form a 11-bit decoder address, B (=B4..B0) form the desired aspect. All bits B4..B0 equal 0 define the 'stop'-aspect. The command station shall issue a DCC extended accessory command as defined in NMRA 9.2.1.
    There is no answer
    0x21 0x10 0x31   Request for Service Mode results
    0x22 0x11 REG [XOR]   Register Mode read request (Register Mode (REG=1..8))
    0x23 0x12 REG DAT [XOR]   Register Mode write request (Register Mode)
    0x22 0x14 CV [XOR]   Paged Mode read request (Paged Mode)
    0x22 0x15 CV [XOR] 3.0 Direct Mode CV read request (CV mode)
    0x23 0x16 CV DAT [XOR] 3.0 Direct Mode CV write request (CV mode (CV=1..256))
    0x23 0x17 CV DAT [XOR]   Paged Mode write request (Paged mode)
    0x22 0x18 CV [XOR] 3.6 Direct Mode CV read request (CV mode (CV1024, CV=1..255))
    0x22 0x19 CV [XOR] 3.6 Direct Mode CV read request (CV mode (CV=256 ... 511))
    0x22 0x1A CV [XOR] 3.6 Direct Mode CV read request (CV mode (CV=512 ... 767))
    0x22 0x1B CV [XOR] 3.6 Direct Mode CV read request (CV mode (CV=768 ... 1023))
    0x23 0x1C CV DAT [XOR] 3.6 Direct Mode CV write request (CV mode (CV1024, CV=1..255))
    0x23 0x1D CV DAT [XOR] 3.6 Direct Mode CV write request (CV mode (CV=256 ... 511))
    0x23 0x1E CV DAT [XOR] 3.6 Direct Mode CV write request (CV mode (CV=512 ... 767))
    0x23 0x1F CV DAT [XOR] 3.6 Direct Mode CV write request (CV mode (CV=768 ... 1023))
    0x21 0x21 0x00   Command station software-version request
    OpenDCC does not answer with its software version, but with 3.0 20, OpenDCC XP answers with 0x63, 0x21, 0x36
    0x22 0x22 00000M00 [XOR]   Set command station power-up mode
    This command is implemented, but not executed. The power-up mode of OpenDCC is always stopped (security first)
    0x21 0x24 0x05   Command station status request

    0x23 0x28 AddrH AddrL [XOR]   SO (special option) read request; this allows to read the internal configuration values.
    AddrH AddrL denotes the address of the CV. The answer is 0x24 0x28 AddrH AddrL DATA [XOR]

    0x24 0x29 AddrH AddrL DAT [XOR]   SO write request
    The answer is 0x24 0x28 AddrH AddrL DATA [XOR]
    0x21 0x80 0xA1   Stop operations request (emergency off)
    0x21 0x81 0xA0   Resume operations request

    0x3* ** ** [XOR]   Command Tunnel
    Commands starting with 0x3* are transferred from Xpressnet to the Host-Interface and vice versa. see below.
    0x42 Addr Nibble [XOR]   Accessory Decoder information request
    0x52 Addr DAT [XOR]   Accessory Decoder operation request
    0x7* ** ** [XOR]   BiDi messages (see below)
    0x80 0x80   Stop all locomotives request (emergency stop)
    0x91 loco_addr [XOR] 2 Emergency stop a locomotive
    0x92 AddrH AddrL [XOR]   Emergency stop a locomotive
    0x9N loco_addr_1 loco_addr_2 ... loco_addr N [XOR] 2 Emergency stop selected locomotives
    (old V2 command, depracted)
    0xA1 loco_addr [XOR] 1 Locomotive information request
    0xA2 loco_addr ModSel [XOR] 2 Locomotive information request
    0xC3 0x05 loco_addr_1 loco_addr_2 [XOR] 2 Establish Double Header
    0xC3 0x04 loco_addr_1 loco_addr_2 [XOR]   Dissolve Double Header
    0xB3 loco_addr loco_data_1 loco_data_2 [XOR] 1 Locomotive operation (old command from X-Bus V1)
    0xB4 loco_addr loco_data_1 loco_data_2 ModSel [XOR] 2 Locomotive operation (old command from X-Bus V2)
    0xE3 0x00 AddrH AddrL [XOR]   Locomotive information request
    0xE4 0x01+R MTR AddrH AddrL [XOR]   Address inquiry member of a Multi-unit request
    0xE2 0x03+R MTR [XOR]   Address inquiry Multi-unit request
    0xE3 0x05+R AddrH AddrL [XOR]   Address inquiry locomotive at command station stack request
    0xE3 0x07 AddrH AddrL [XOR]   Function status request
    0xE3 0x08 AddrH AddrL [XOR] 3.6 Function status request F13-F28
    0xE3 0x09 AddrH AddrL [XOR] 3.6 Function level request F13-F28
    0xE4 0x10 AddrH AddrL Speed [XOR]   Locomotive speed and direction operation - 14 speed step
    0xE4 0x11 AddrH AddrL Speed [XOR]   Locomotive speed and direction operation - 27 speed step
    0xE4 0x12 AddrH AddrL Speed [XOR]   Locomotive speed and direction operation - 28 speed step
    0xE4 0x13 AddrH AddrL Speed [XOR]   Locomotive speed and direction operation - 128 speed step
    0xE4 0x20 AddrH AddrL Group [XOR]   Function operation instruction - Group 1 f0f4f3f2f1
    0xE4 0x21 AddrH AddrL Group [XOR]   Function operation instruction - Group 2 f8f7f6f5
    0xE4 0x22 AddrH AddrL Group [XOR]   Function operation instruction - Group 3 f12..f9
    0xE4 0x23 AddrH AddrL Group [XOR] 3.6 Function operation instruction - Group 4 f20..f13
    0xE4 0x24 AddrH AddrL Group [XOR]   Set function state - Group 1
    0xE4 0x25 AddrH AddrL Group [XOR]   Set function state - Group 2
    0xE4 0x26 AddrH AddrL Group [XOR]   Set function state - Group 3
    0xE4 0x27 AddrH AddrL Group [XOR] 3.6 Set function state - Group 4
    0xE4 0x28 AddrH AddrL Group [XOR] 3.6 Function operation instruction - Group 5 (f28..f21)
    0xE4 0x2C AddrH AddrL Group [XOR] 3.6 Set function state - Group 5
    0xE5 0x2F AddrH AddrL RefMode [XOR] 3.6 Set function refresh mode
    0xE6 0x30 AddrH AddrL 0xE4+C CV DAT [XOR]   Operations Mode Programming byte mode read request.
    Notes: in Lenz Xpressnet docu this is stated as 0xEA+C, seems to be an error in this document.
    This command sends the corresponding dcc packet down the track; this command performs a byte read, therefore supplying the DAT during the query is redundant. It will be replaced by 0 in the command station. If a OpenDCC GBM16 is connected to the xpressnet, OpenDCC will get the data with these command extensions to xpressnet for BiDi.
    CV is given in 0..1023. C are the two upper bits of CV address.
    0xE6 0x30 AddrH AddrL 0xEC+C CV DAT [XOR]   Operations Mode Programming byte mode write request;
    Note: CV is given in the range 0..1023 (same format as seen on the track; CV1 is transmitted as 0); this is different to normal CV commands
    0xE6 0x30 AddrH AddrL 0xE8+C CV DAT [XOR]   Operations Mode programming bit mode write request

    0xE6 0x30 AddrH AddrL 0xF0+C CV DAT [XOR]   Operations Mode Programming write request for accessory decoder; CV is given as 0..1023; C are the two upper bits. Address is coded like with locomotives: if value is >= 100, then the high part is OR'ed with 0xC0.

    0xE6 0x30 AddrH AddrL 0xF4+C CV DAT [XOR]   Operations Mode Programming read request for accessory decoder; CV is given as 0..1023; C are the two upper bits. DAT is void.

    0xE6 0x30 AddrH AddrL 0xF8+C CV DAT [XOR]   Operations Mode Programming write request for extended accessory decoder; CV is given as 0..1023; C are the two upper bits.

    0xE6 0x30 AddrH AddrL 0xFC+C CV DAT [XOR]   Operations Mode Programming read request for extended accessory decoder; CV is given as 0..1023; C are the two upper bits. DAT is void.
    0xE5 0x43 ADR1H ADR1L ADR2H ADR2L [XOR]   Establish Double Header
    0xE5 0x43 ADR1H ADR1L 0x00 0x00 [XOR]   Dissolve Double Header
    0xE4 0x40+R AddrH AddrL MTR [XOR]   Add a locomotive to a multi-unit request
    0xE4 0x42 AddrH AddrL MTR [XOR]   Remove a locomotive from a Multi-unit request
    0xE3 0x44 AddrH AddrL [XOR]   Delete locomotive from command station stack request
    This isn't necessary with OpenDCC, stack management is done dynamically.

    0xE9 0xF1 AddrH AddrL IDX SIZE [NAME][XOR]   Library Entry
    This undocumented command is used when a mulitMAUS™ is transferring it's library. The length of this command may vary depending on the length of the NAME. (coded in ASCII, max. 10 chars). So the header may be 0xE5 up to 0xEF.
    IDX is the index, counting from 0 to SIZE-1.
    SIZE is the size of the data base (entries).
    This command is transferred twice for each locomotive, with a 100ms gap. The multiMAUS&trade overwrites its loco library with the transferred values. Locomotive names with mor than 5 char are truncated by multimaus, the OpenDCC throttle accepts them.

    0xE4 0xF3 AddrH AddrL Group [XOR]   Function operation instruction - Group contains the bits for group 4 in the order f20..f13 (msb..lsb)
    This undocumented command is used when a mulitMAUS™ is controlling functions f20..f13.
    0xF0 [XOR]   Ask LI-Version
    Answer: 0x03 0x30 0x01 [XOR]
    This command ist only available on the host interface, not on the xpressnet if. (V0.23.5) . It is used to fulfill host requests.
    0xF2 0x01 ADR [XOR]   Ask/set LI-Slot Addr
    Answer: 0xF2 0x01 ADR [XOR]
    This command ist only available on the host interface, not on the xpressnet if. (V0.23.5) . It is used to fulfill host requests, no action on OpenDCC.
    0xF2 0x02 BAUD [XOR]   Ask/set Baudrate
    Answer: 0xF2 0x02 BAUD [XOR]
    This command ist only available on the host interface, not on the xpressnet if. (V0.23.5). BAUD is coded as follows:
    1BAUD = 19200 (default)
    2BAUD = 38400
    3BAUD = 57600
    4BAUD = 115200
    All other values are converted to default value.
    A note on address coding: if address < 100, the address is coded as is. if address >= 100, then the address is incremented by 0xC000 before putting it in the command.
    Commandlist for Xpressnet (messages from the host)
     OP-CodeVer.Operation

    0x05 0x01 TCODE0 TCODE1 TCODE2 TCODE3   Timecode transfer, accelerated layout time. A TCODE consists of one byte, coded binary as CCDDDDDD, where CC denotes the type of code and DDDDDDD the corresponding data.
    TCODEContent
    CC=00DDDDDD = mmmmmm, this denotes the minute, range 0..59.
    CC=10DDDDDD = 0HHHHHH, this denotes the hour, range 0..23
    CC=01DDDDDD = 000WWW, this denotes the day of week,
    0=Monday, 1=Tuesday, 2=Wednesday, 3=Thursday, 4=Friday, 5=Saturday, 6=Sunday.
    CC=11DDDDDD = 00FFFFF, this denotes the acceleration factor, range 0..31;
    an acceleration factor of 0 means clock is stopped, a factor of 1 means clock is running real time, a factor of 2 means clock is running twice as fast a real time.
    This message is issued as broadcast once every (layout-) minute or as answer to a set request.

    0x61 0x23 [XOR]   Broadcast. All occupancy devices should resend their data.

    This message is issued when the host clears the occupancy data already stored in the command station, thus a retransmission is necessary.
    Legend
    Command implemented
    Command not yet implemented or in test phase
    Command not implemented
      Command obsolete (old version)
    Command with different coding then Lenz
    Additional command

Xpressnet - supported functions

    Besides the handling of the client, there are some more things to explain:
  • Scheduling
    OpenDCC uses an intelligent algorithm to schedule the xpressnet clients actually connected. Active clients are called more often than inactive clients. The complete range of up to 31 clients is allowed.
    This xpressnet schedule runs in parallel to the host interface, which has its own access to the data base. This is quite a performance advantage compared to traditional xpressnet implementations, where the host has to wait for the according slot. Moreover, the protocol at the host interface is completely independant, so xpressnet can run together either with lenz or intellibox emulation.
  • Handover
    Locomotives could be controlled from different clients and from the host interface. OpenDCC automatically handles the transfer, and notifies the according client or the host interface about the transfer of the control.
  • Feedback
    Whenever a feedback event occurs, it is reported to both sides: pc and xpressnet. The change flags, whether a certain event has been already reported are doubled, thus enabling indepedant reports. See also the explanations on Xpressnet feedback address mapping.
  • Turnouts
    Manual operations of turnouts are reported to the host; this currently applies only for the turnouts 1...1024 (see also #define SIZE_TURNOUTBUFFER in config.c)
  • Extended Accessory
    The OpenDCC command station is able to send the extended dcc accessory command with up to 31 different aspect. There is a command extension für that.
  • Programming
    Apparently the Lenz command station ceases operation when in programming mode. Only the client who issued the programming command is active and gets the result. OpenDCC acts different: operation is continued, only the track output is reduced to programming commands. Therefore no (neither immediate nor later) answer is given. The result must be queried by either 'Request for Service Mode results' or a general status request. This matches the behavior of the Roco multiMaus.
    Sorry to say so, but Lenz LH100 has some trouble with this behavior: the answer 'command station is busy (=0x61 0x1F)' is ignored and no more query for a result is issued - so the LH100 remains in the state 'reading'.
  • Command Tunnel
    OpenDCC command station allows the direct interaction between a throttle and a PC program. In this mode, the keystrokes on the throttle are forwarded to the host. On the other side, the PC gets access to the display and LEDs of the throttle. All commands starting with 0x3.. are mirrored from the PC to Xpressnet and vice versa.
    When the PC issues a tunnel command, it will get the normal ACK message if the command is forwarded to the Xpressnet Bus. This is not an acknowledge from the throttle. If the command can't be forwarded, the answer will be 'BUSY' and the the command is discarded. It must then be repeated by the client (either PC or throttle).
  • BiDi (railcom®) Messages
    Up to now there are no message types for BiDi in the Lenz documentation. OpenDCC uses the complete range of 0x7* messages to transport BiDi and feedback.