For VSCP multicast the address
should be used.Please see the following:
Currently the multicast interface is used for heart beats and announcements of available services and to set up multicast groups that share events. For this port 9698 is always used.
General multicast information can be found here.
|0||Packet type & encryption settings.||Never encrypted|
|1||VSCP Level II Head MSB||Yes|
|2||VSCP Level II Head LSB||Yes|
|3||Timestamp microseconds MSB||Yes|
|6||Timestamp microseconds LSB||Yes|
|34||DATA SIZE MSB||Yes|
|35||DATA SIZE LSB||Yes|
|36-n||data ... limited to max 512-25 = 487 bytes||Yes|
|len-2||CRC MSB (Calculated on HEAD + CLASS + TYPE + ADDRESS + SIZE + DATA…)||Yes|
|opt||Optional encryption data such as a 16-byte IV for AES follow here||No|
The number above is the offset in the package. Len is the total datagram size.
Time should always be UTC time. If the time block is set to all zero the current time will be set by interface (VSCP Server for example).
|7,6,5,4||Packet type. Currently always zero.|
|1||AES128 CBC encryption. 16-byte IV is appended to each frame.|
|2||AES192 CBC encryption. 16-byte IV is appended to each frame.|
|3||AES256 CBC encryption. 16-byte IV is appended to each frame.|
For encryption/decryption code using OpenSSL see this link. Note that byte 0 of the frame is never encrypted. The encryption/decryption is instead carried out over byte 1 to the CRC.
|15||GUID is IP v.6 address.|
|14-8||Reserved (Set to zero!).|
|3||Don't calculate CRC if bit set. CRC should be set to 0xAA55 if set.|
|2,1,0||reserved (Set to zero!).|
Note also that the MSB is sent before the LSB (network byte order, Big Endian). So, for little endian machines such as a typical PC the byte order needs to be reversed for multi-byte types.
There is a 24-byte overhead to send one byte of data so this is not a protocol which should be used where an efficient protocol for data intensive applications is required and where data is sent in small packets.
The CRC used is the 16-bit CCITT type and it should be calculated across all bytes except for the CRC itself.
Announcements are done on the default VSCP port 9598.
Announcements is an important part of the traffic on the multicast channel. There are a few different types.
High end device announce. Announce the availability of the device and its capability. All Level II nodes should have this functionality. At the bottom line they just look to the system as a VSCP daemon with less capabilities.
Heart beats: Heart beats come in the form of heartbeats from VSCP daemons and from high end nodes. Both send them out each minute. Also heartbeats are available form devices connected to a daemon or through a high end node.
It's up to the implementer to decide what events should be available on a multicast channel by setting the receive/transmit filters/masks for the channel. Several channels can be set up on different ports forming different subnets. Normally just a filtered number of events is transmitted. A typical example of such a segment is a group of nodes on Ethernet.
This document is licensed under Creative Commons BY 4.0 and can be freely copied, redistributed, remixed, transformed, built upon as long as you give credits to the author.