UART-CAN-Protocol: Difference between revisions

From CANopen-Lift
Jump to navigation Jump to search
(Created page with "de:UART-CAN-Protokoll Das UART-CAN-Protokoll (UCP) dient der Übertragung von CAN-Nachrichten über andere Medien, wie zum Beispiel einer Telefonleitung oder über das Int...")
 
(English translation)
 
Line 1: Line 1:
[[de:UART-CAN-Protokoll]]
[[de:UART-CAN-Protokoll]]
Das UART-CAN-Protokoll (UCP) dient der Übertragung von CAN-Nachrichten über andere Medien, wie zum Beispiel einer Telefonleitung oder über das Internet.
The UART-CAN-Protocol (UCP) is used for the transmisson of CAN bus messages over other physical media (e. g. phone line or internet).


Im Jahr 2005 wurde UCP von der Firma BÖHNKE + PARTNER GmbH entwickelt und [http://www.canwizard.de/en/node/109 offen gelegt]. Das Protokoll hat zzt. noch keinen endgültigen Status erreicht und es können sich noch Änderungen ergeben.
In 2005 was UCP developed by the company BÖHNKE + PARTNER GmbH and [http://www.canwizard.de/en/node/109 was published]. The protocol does not have a final status and could be changed in the future.


Diese Seite informiert über den aktuellen Status des Protokolls.  
This page informs about the current status of the protocol.  


== Telegrammaufbau ==
 
=== Datenrahmen ===
== Message structure ==
=== Data frame ===
{|  class="wikitable"
{|  class="wikitable"
! Flag  
! Flag  
Line 22: Line 23:
|}
|}


=== Steuerzeichen ===
=== Control chars ===


{| class="wikitable"
{| class="wikitable"
Line 32: Line 33:
|}
|}


=== Transparenz ===
=== Transparency ===
 
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):


{| class="wikitable"
{| class="wikitable"
Line 49: Line 52:
{|  class="wikitable"
{|  class="wikitable"
| 0
| 0
| Daten vom Gateway (A)
| Data from the gateway (A)


|-
|-
| 1 - 8
| 1 - 8
| CAN-Telegramm vom Netzwerk 1 .. 8
| CAN message from network 1 .. 8


|-
|-
| 9 - 127
| 9 - 127
| reserviert
| reserved


|-
|-
| 128
| 128
| Daten für Gateway (B)
| Data to the gateway (B)


|-
|-
| 129 - 136
| 129 - 136
| CAN-Telegramm für Netzwerk 1 .. 8
| CAN message for network 1 .. 8


|-
|-
| 137 - 254
| 137 - 254
| reserviert
| reserved


|-
|-
| 255
| 255
| CAN-Telegramm für alle Netzwerke (broadcast)
| CAN message for all networks (broadcast)


|}
|}


=== Information (CAN Nachricht, siehe SJA1000) ===
=== Information (CAN Nachricht, see SJA1000) ===


{| class="wikitable"
{| class="wikitable"
Line 136: Line 139:


|}
|}
ID IdentifierRTR remote transmission requestDLC data length code


=== Aufbau Daten Telegramm A ===
ID Identifier<br>
RTR remote transmission request<br>
DLC data length code
 
=== Structure of data message A ===


{| class="wikitable"
{| class="wikitable"
Line 153: Line 159:
| 0
| 0
| 6
| 6
| colspan="2" | reserviert
| colspan="2" | reserved
| colspan="2" | Anzahl Empfangsfehler
| colspan="2" | Number of receive errors
| colspan="2" | Anzahl Sendefehler
| colspan="2" | Number of transmit errors


|}
|}
=== Aufbau Daten Telegramm B ===
=== Structure of daten message B ===


{| class="wikitable"
{| class="wikitable"
Line 173: Line 179:
| 0
| 0
| 6
| 6
| Netz ein
| network enable (bit mask)
| Netz aus
| network disable (bit mask)
| colspan="2" | reserviert
| colspan="2" | reserved
| colspan="2" | reserviert
| colspan="2" | reserved


|}
|}


== Verbindungsaufbau ==
=== Ablauf der Einwahl mit Passwort ===
* Nach dem Connect sendet das Gateway den Text "Password: "
* Der Anrufer sendet sein Pass<nowiki>wort, mit <CR> abgeschlossen</nowiki>
* Das Gateway sendet bei korrektem Login "Login accepted."
* Bei falschem Login sendet das Gateway "Login error!" und legt auf
* <nowiki>Steuerzeichen <CR> und <LF> sind nicht dargestellt, auch kann das Gateway am Anfang oder Ende einen beliebigen Text ausgeben</nowiki>
* Die Wartezeit beträgt 10 s. Erfolgt innerhalb dieser Zeit keine Eingabe, so sendet das Gateway "Login error (Timeout)!" und legt auf.
* Das Gateway wartet auf eine Aktion vom Anrufer


=== Ablauf der Einwahl ohne Passwort: ===
== Connection establishment ==
* Nach dem Connect kann das Gateway einen beliebigen Text senden und wartet dann auf eine Aktion vom Anrufer
=== Process of dial-in with password ===
* After the connect the gateway sends the text "Password: ".
* The caller sends the pass<nowiki>word, terminated with <CR>.</nowiki>
* The gateway sends "Login accepted." if the password was correct.
* If the password is wrong the gateway sends "Login error!" and closes the connection.
* <nowiki>Control chars <CR> and <LF> are allowed and the gateway could display on begin or end of the connection any text.</nowiki>
* 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).


=== Verbindungsaufbau und -überwachung: ===
=== Connection monitoring ===
* Der Anrufer beginnt die Datenübertragung, indem er ein CAN-Telegramm oder das Telegramm B sendet. Das Gateway weiß somit, von welchem CAN-Netzwerk der Anrufer CAN-Telegramme empfangen möchte. Somit wird auch der Heartbeat vom Gateway (Telegramm A) aktiviert.
* 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.
* Sind keine CAN-Telegramme zu senden, so wird das Telegramm A oder B übertragen. Der Empfänger kann so erkennen, ob die Verbindung noch aktiv ist. Das Timeout beträgt 15 s.
* 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.

Latest revision as of 10:01, 31 October 2012

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

Transparency

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

Address

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.