From CANopen-Lift
Revision as of 09:01, 31 October 2012 by Hba (talk | contribs) (English translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The UART-CAN-Protocol (UCP) is used for the transmisson of CAN bus messages over other physical media (e. g. phone line or internet).

In 2005 was UCP developed by the company BÖHNKE + PARTNER GmbH and was published. The protocol does not have a final status and could be changed in the future.

This page informs about the current status of the protocol.

Message structure

Data frame

Flag Address Information CRC Flag
8-Bits 8-Bits n * 8-Bits 16-Bits (lo,hi) 8-Bits

Control chars

Flag 0x7E
ESC 0x7D


If the control chars are inside the frame (not the flags), the control chars are to replaced by following chars (only in the transmitted stream, after calculatiing of the checksum):

Flag ESC + (Flag ^ 0x20) => 0x7D,0x5E
ESC ESC + (ESC ^ 0x20) => 0x7D,0x5D

Checksumme (CRC-16, siehe RFC-1662)

X^16 + X^12 + X^5 + 1


0 Data from the gateway (A)
1 - 8 CAN message from network 1 .. 8
9 - 127 reserved
128 Data to the gateway (B)
129 - 136 CAN message for network 1 .. 8
137 - 254 reserved
255 CAN message for all networks (broadcast)

Information (CAN Nachricht, see SJA1000)

Descriptor 1 Descriptor 2 Data (RTR = 0)
8-Bits 8-Bits DLC * 8-Bits

Descriptor 1

Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8
ID.11 ID.10 ID.9 ID.8 ID.7 ID.6 ID.5 ID.3

Descriptor 2

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
ID.2 ID.1 ID.0 RTR DLC.3 DLC.2 DLC.1 DLC.0

ID Identifier
RTR remote transmission request
DLC data length code

Structure of data message A

Descr. 1 Descr. 2 Data 0 Data 1 Data 2 Data 3 Data 4 Data 5
0 6 reserved Number of receive errors Number of transmit errors

Structure of daten message B

Descr. 1 Descr. 2 Data 0 Data 1 Data 2 Data 3 Data 4 Data 5
0 6 network enable (bit mask) network disable (bit mask) reserved reserved

Connection establishment

Process of dial-in with password

  • After the connect the gateway sends the text "Password: ".
  • The caller sends the password, terminated with <CR>.
  • The gateway sends "Login accepted." if the password was correct.
  • If the password is wrong the gateway sends "Login error!" and closes the connection.
  • Control chars <CR> and <LF> are allowed and the gateway could display on begin or end of the connection any text.
  • The wait time for the password is 10 s. Is there not input during this time the gateway sends "Login error (Timeout)!" and closes the connection.
  • After correct dial-in the gateway waits for actions of the caller (all networks are disabled by default).

Process of dial-in without password

  • After the connect the gateway may send any text and will wait for actions of the caller (all networks are disabled by default).

Connection monitoring

  • The caller starts the data transmission by sending a CAN message or data message B. The gateway now knows of what network the caller wants to receive CAN messages. The gateway now activates the heartbeat message by sending data message A.
  • Are there no CAN messages to transmit the data messages A or B are to send. The receiver can therefor detect that the connection is still established. The keep alive timeout is 15 s.