CAN-GC1e Firmware



The protocol used over Ethernet will be the same as used for the CANRS and CANUSB: Gridconnect ASCII Frames.


:     -> Start of frame
S     -> Frame type: S=Standard, X=Extended, Y=Ethernet
h1    -> SIDH <bit7,6,5,4=Prio> <bit3,2,1,0=high 4 part of CAN-ID> (2 byte HEXA)
h2    -> SIDL <bit7,6,5=low 3 part of CAN-ID> (2 byte HEXA)
N     -> N=normal R=RTR¹
d0    -> OPC  (2 byte HEXA)
d1-d7 -> Data (2 byte HEXA)
;     -> End of frame

¹) RTR = “Request-To-Transmit”; Not used for MergCBUS.


The Ethernet Frames are for communication between client and CAN-GC1e only.

OPC Description Data
0 Ping; Resets the idle timer. -
1 Status report event.
Triggered by the number of connections.
d1: error code
d2: number of connections
d3: max.¹ CAN queue
d4: max.¹ Ethernet queue
2 Command Ack with return code, OPC and ticker. d1: error code
d2: the OPC acknowledged
d3: ticker (continuous running number from 0 to 255)

¹) The highest queue index used so far.

Error code Description
0 OK

Trace snippet:

cbreader OCBUS    1205 Ethernet status: rc=0 con=1 maxcanQ=1 maxethQ=4
cbreader OCBUS    1215 Ethernet command Ack: rc=0 opc=0x71 cmdticker=28


Extended frames are used for Boot loading new firmware over the CBUS.

Default settings

At initial startup, first time, the firmware expects EEPROM address 0 to have a value of 0xFF. This will trigger writing the default setup values into EEPROM like IP address, MAC and so on.
If the programmer did overwrite the EEPROM with other values it can be triggered by holding down the pushbutton at power up.


NMRA Manufacturer ID 70
Product ID 11
Default node number 11
Default CanID 11

Node Variables

# Description
1 node configuration
2 CAN-ID¹ (Read only)
3-6 IP Address
7-10 NetMask
11-16 MAC Address
17 Idle time in 500ms

¹) The CAN-ID is token from the frames coming from the PC.

Node configuration byte

Bit Function Remark
0 Idle time watch dog This will disconnect a client after reaching the idle timer.
1 Power off at idle Only available in case of an active idle time watch dog.
2 Activate command ack. Every incoming command on the ethernet will be acknowledged using an 'Y' frame.
The client may ignore it or use it as handshake for sending a next command.



Development Tools

Personal Tools