Back to Specification
Physical Level

:!:Preliminary:!:

VSCP over Ethernet

VSCP can use Ethernet directly making it possible to construct very low end nodes. The payload is a standard VSCP level II frame with some specific Ethernet stuff in it

Content Size Description
Destination MAC address 6 bytes Destination address
Source MAC address 6 bytes Source address
Ethernet Type 2 bytes Packet type
VSCP sub destination address 2 bytes Lowest 16 bits of VSCP GUID destination address
VSCP sub source address 2 bytes Lowest 16 bits of VSCP GUID source address
VSCP head 2 bytes Header: To be defined
VSCP class 2 bytes 16-bit VSCP class
VSCP type 2 bytes 16-bit VSCP type
Payload 1- 512 bytes VSCP data.
CRC 4-bytes 32 bit CRC checksum

The VSCP GUID for Ethernet is defined as

FF FF FF FF FF FF FF FE YY YY YY YY YY YY XX XX

where FF FF FF FF FF FF FF FE say this is an Enhernet GUID and YY YY YY YY YY YY is the MAC address and XX XX is the id for a specific VSCP device. Each node can thus appear as 65535 - 2 nodes which is perfect for a gateway or similar device that have VSCP devices connected on one or many other buses such as CAN, RF and the like. Two id's is reserved. 0 which is the Ethernet node itself and 0xffff which is all nodes on the interface. If a node consist just of itself then it can ignore the VSCP sub address but it is recommended that it use 0×0000 for it's transmitted frames.

More information on the Ethernet frames are here: http://en.wikipedia.org/wiki/Ethernet

The Ethernet type is still to be defined.

Standard Level read register operation

Level II

Content Size Description
Destination MAC address 6 bytes Destination address - We know which node we want to talk to so this is a real MAC part of the nodes full GUID
Source MAC address 6 bytes Source address - Always the MAC part of the GUID
Ethernet Type 2 bytes Packet type
VSCP sub destination address 2 bytes Lowest 16 bits of VSCP GUID destination address
VSCP sub source address 2 bytes Lowest 16 bits of VSCP GUID source address
0×0000 2 bytes Header: To be defined
0×0400 2 bytes Level II Protocol Functionality
0×0001 2 bytes ReadRegisterII
Register to read 4 bytes Address for VSCP register to read.
Register count. 2 bytes Number of consecutive registers to read
Reserved 2 bytes Two nills.
GUID 16 bytes GUID for the target node.
CRC 4-bytes 32 bit CRC checksum

The answer will be

Content Size Description
Destination MAC address 6 bytes Destination address - We know which node did the read request so this is a real MAC part of the nodes full GUID
Source MAC address 6 bytes Source address - Always the MAC part of the GUID
Ethernet Type 2 bytes Packet type
VSCP sub destination address 2 bytes Lowest 16 bits of VSCP GUID destination address
VSCP sub source address 2 bytes Lowest 16 bits of VSCP GUID source address
VSCP head 2 bytes Header: To be defined
0×0400 2 bytes Level II Protocol Functionality
0×0003 2 bytes ReadWriteResponseII
Register to read 4 bytes Address for VSCP register to read.
Reserved 2 bytes Two nills.
Register content n bytes Content for registers read.
CRC 4-bytes 32 bit CRC checksum

Note that the Ethernet node can act as a proxy for several subnets connected to it. These devices can have there own unique GUID's we can read from them but they are also known with the GUID of our Ethernet device but they will all have different VSCP sub addresses.

Think of a an Ethernet device with eight CAN buses connected to it. To the outer world it looks like an Ethernet device. This device can use the MSB of the VSCP sub address to address the segment and the LSB to represent a nickname id for a specific device on that bus. This way it is possible to address each device on each segment individually.

Level I

But it is perfectly fine to do a Level I read as well

Content Size Description
Destination MAC address 6 bytes Destination address - We know which node we want to talk to so this is a real MAC part of the nodes full GUID
Source MAC address 6 bytes Source address - Always the MAC part of the GUID
Ethernet Type 2 bytes Paket type
VSCP sub destination address 2 bytes Lowest 16 bits of VSCP GUID destination address
VSCP sub source address 2 bytes Lowest 16 bits of VSCP GUID source address
0×0000 2 bytes Header: To be defined
0×0000 2 bytes Level I Protocol Functionality
0×0009 2 bytes Read register.
Register to read 1 bytes Address for VSCP register to read.
Node id 1 bytes Nickname if for the node who's registers should be read
Register 1 bytes Register to read
CRC 4-bytes 32 bit CRC checksum

this will get an answer

Content Size Description
Destination MAC address 6 bytes Destination address - We know which node we want to talk to so this is a real MAC part of the nodes full GUID
Source MAC address 6 bytes Source address - Always the MAC part of the GUID
Ethernet Type 2 bytes Packet type
VSCP sub destination address 2 bytes Lowest 16 bits of VSCP GUID destination address
VSCP sub source address 2 bytes Lowest 16 bits of VSCP GUID source address
0×0000 2 bytes Header: To be defined
0×0000 2 bytes Level I Protocol Functionality
0x000A 2 bytes Read/write register response.
Register read 1 bytes Address for VSCP register read.
Content 1 bytes Content of register.
CRC 4-bytes 32 bit CRC checksum

How about non addressed events

Non addressed events such as a temperature measurement is broadcasted on the bus using MAC address 0xFFFFFFFFFFFF. So a Temperature event can look like this

Content Size Description
Destination MAC address 6 bytes Destination address - Broadcast = 0xFFFFFFFFFFFF
Source MAC address 6 bytes Source address - Always the MAC part of the GUID
Ethernet Type 2 bytes Packet type
VSCP sub destination address 2 bytes Broadcast 0xFFFF
VSCP sub source address 2 bytes Lowest 16 bits of VSCP GUID source address
0×0000 2 bytes Header: To be defined
0x000A 2 bytes Level I Measurement Functionality
0×0006 2 bytes Temperature reading.
Datacoding 1 bytes VSCP data coding byte.
value 1-7 bytes Temperature.
CRC 4-bytes 32 bit CRC checksum

VSCP header

Description of the VSCP Ethernet package header.

Bits Description
bit 15,14,13 Priority. 0 - highest, 7-lowest.
bit 12 Hardcoded. For compability with other physical protocols used by VSCP.
bit 11-0 Reserved
 
vscp/spec/phy/vscp_over_ethernet.txt · Last modified: 2009/11/26 12:24 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki