User`s guide

18 Ethernet Control
Control Message Checksum
The Checksum is the summation of the hexadecimal value of all of the bytes in
the Control Message except the first byte (0xF1), the last byte (0xF2) and of
course the Checksum itself. The value of the checksum may easily increase to a
value that cannot be represented by one byte. This situation calls for what we
call number expansion.
If the value of the Checksum is between 0x00 and 0xF9 (0-249), the value is
represented in only 8 bits (1 byte). If the value is between 0xFA and 0xFFFF
(250-65535), the value is represented in 16 bits (2 bytes) and is preceded by
0xFF to signify the number has been expanded to 16 bits. If the value is
between 0x10000 and 0xFFFFFF (65536-16777215), the value is represented in
24 bits (3 bytes) and is preceded by 0xFE to signify the number has been
expanded to 24 bits. The following example shows a Control Message with an
expanded Checksum.
0xF1 0x01 0x04 5 5 @ R J <CR> 0xFF 0x01 0x58 0xF2
The value of the checksum is calculated by adding the hexadecimal values of
each byte preceding it except the first byte (0xF1) as follows:
0x01 + 0x04 + 0x35 + 0x35 + 0x40 + 0x52 + 0x4A + 0x0D = 0x158.
The Checksum in this example is 0x158, but because it is greater 0xF9, the two
byte Checksum is preceded by 0xFF.
UDP Message Layer
The control source sends UDP Packets to the unit. A UDP Packet contains
information about the packet source (IP Address, Port number) as well as
definable user data. The user data contains the entire unit Control Message
including all AMINet specific bytes. These packets should be sent to the
broadcast IP Address (0xFFFFFF) with UDP port number 2639.
Control Message Response
The unit will normally send back a response to each Control Message it
receives. The user data in these responses exactly match those in the Pioneer /
AMI control command descriptions. For example, you’ll receive an “R”
contained when you send a “PL” contained in the AMINet wrapper. The
responses are sent to the IP Address and UDP Port number found in the UDP
packet that contained the original Control Message. As with the Addressable
serial protocol, any Control Message sent to the wildcard unit ID (127) will not
receive any response. This practice avoids any potential confusion at the source
of the Control Message due to many responses to the same message.
A Software Developer’s Kit with C Source Code implementing this protocol is
available on our website at http://www.alcorn.com/support