Difference between revisions of "KONNEKTING Protocol Specification 0x01"

From KONNEKTING Wiki
Jump to navigation Jump to search
Line 540: Line 540:
 
* "size of raw data" is a uint16 value.
 
* "size of raw data" is a uint16 value.
 
* "raw data identifier" can be everything, f.i. a string with up to 10 bytes
 
* "raw data identifier" can be everything, f.i. a string with up to 10 bytes
 +
 +
[[User:Konnekting|KONNEKTING]] ([[User talk:Konnekting|talk]]) Do we really require an identifier with up to 10 bytes? We will not have that much data. Maybe a single byte is sufficient. Kind of "ID" like we have for parameters.
  
 
== 0x?? RawDataWrite ==
 
== 0x?? RawDataWrite ==

Revision as of 08:00, 14 March 2018

Message Types for Protocol-Version 0x01

--- DRAFT ---
This is the second protocol version (version=0x01), starting witrh 1.0.0 beta5
--- DRAFT ---

0x00 Acknowledge

  • Message Name: Acknowledge
  • Message-Type-ID: 0 dec / 0x00 hex
  • Direction: Device -> Suite
  • Expected Response: n/a
  • Description: Sent by device as answer to most WRITE messages
  • Requires Programming Mode: n/a
Byte no# Description
2 Acknowledge Type
3 Error Code
4..13 0xFF, unused

Acknowledge Type

hex Description
0x00 ACK
0xFF NACK

Error Code

hex Description
0x00 no error / no error code available

0x01 DeviceInfoRead

  • Message Name: DeviceInfoRead
  • Message-Type-ID: 1 dec / 0x01 hex
  • Direction: Suite -> Device
  • Expected Response: DeviceInfoResponse
  • Description: Initiates reading general device information
  • Requires Programming Mode: no
Byte no# Description
2 IndividualAddress HI
3 IndividualAddress LO
4..13 0xFF, unused


0x02 DeviceInfoResponse

  • Message Name: DeviceInfoResponse
  • Message-Type-ID: 2 dec / 0x02 hex
  • Direction: Device -> Suite
  • Expected Response: n/a
  • Description: Response to a DeviceInfoRead message
  • Requires Programming Mode: n/a
Byte no# Description
2 Manufacturer-ID HI
3 Manufacturer-ID LO
4 Device-ID
5 RevisionID
6 Device Flags, see below
7 IndividualAddress HI
8 IndividualAddress LO
9 System Type, see below
10..13 0xFF, unused

Device Flags

b7 ist the left most bit, b0 is the right most bit.

bit hex mask Description
b7 0x80 Factory Flag:
  • 1 = factory settings
  • 0 = stored settings
b6..b0 n/a unused

System Types

hex Name Description
0x00 System 1
Default
Up to:
  • 256 GAs
  • 256 GA-ComObj relations
  • 256 ComObjects
  • 256 Parameters
0x01 System 2
Simple
Up to:
  • 128 GAs
  • 128 GA-ComObj relations
  • 128 ComObjects
  • 128 Parameters
0x02 System 3
Extended
DRAFT
Up to:
  • 65535 GAs (32*8*256)
  • 65535 GA-ComObj relations
  • 65535 ComObjects
  • 65535 Parameters

GAs = Unique GroupAddresses
GA-ComObj relations = Assignments of GAs to ComObjects
ComObjects = Number of ComObjects
Parameters = Number of Paramaters

0x09 Restart

  • Message Name: Restart
  • Message-Type-ID: 9 dec / 0x09 hex
  • Direction: Suite -> Device
  • Expected Response: Acknowledge
  • Description: Restart device (device reboot, no memory reset)
  • Requires Programming Mode: no
Byte no# Description
2 IndividualAddress HI
3 IndividualAddress LO
4..13 0xFF, unused


0x0A ProgrammingModeWrite

  • Message Name: ProgrammingModeWrite
  • Message-Type-ID: 10 dec / 0x0A hex
  • Direction: Suite -> Device
  • Expected Response: Acknowlegde
  • Description: Sets/Unsets Programming-Mode for device with given individual address. Device will respond with a "Acknowledge" message.
  • Requires Programming Mode: no
Byte no# Description
2 IndividualAddress HI
3 IndividualAddress LO
4 Mode:

0x00 = OFF
0x01 = ON

5..13 0xFF, unused


0x0B ProgrammingModeRead

  • Message Name: ProgrammingModeRead
  • Message-Type-ID: 11 dec / 0x10 hex
  • Direction: Suite -> Device
  • Expected Response: ProgrammingModeResponse
  • Description: Reads current programming mode of all listening devices. If more than one device is in programming-mode, you will get more then one AnswerProgrammingMode messages.
  • Requires Programming Mode: no
Byte no# Description
2..13 0xFF, unused


0x0C ProgrammingModeResponse

  • Message Name: ProgrammingModeResponse
  • Message-Type-ID: 12 dec / 0x11 hex
  • Direction: Device -> Suite
  • Expected Response: n/a
  • Description: Response to ProgrammingModeRead message.
  • Requires Programming Mode: n/a
Byte no# Description
2 IndividualAddress HI
3 IndividualAddress LO
4..13 0xFF, unused


0x14 IndividualAddressWrite

  • Message Name: IndividualAddressWrite
  • Message-Type-ID: 20 dec / 0x14 hex
  • Description: Writes the individual address the device should use. Device will respond with a "Acknowledge" message.
  • Requires Programming Mode: yes
Byte no# Description
2 IndividualAddress HI
3 IndividualAddress LO
4..13 0xFF, unused


0x15 IndividualAddressRead

  • Message Name: IndividualAddressRead
  • Message-Type-ID: 21 dec / 0x15 hex
  • Description: Each device in programming mode will respond with its individual address
  • Requires Programming Mode: yes
Byte no# Description
2..13 0xFF, unused


0x16 IndividualAddressResponse

  • Message Name: IndividualAddressResponse
  • Message-Type-ID: 22 dec / 0x16 hex
  • Description: Response to a IndividualAddressRead message with the device's individual address.
  • Requires Programming Mode: n/a
Byte no# Description
2 IndividualAddress HI
3 IndividualAddress LO
4..13 0xFF, unused


0x1E MemoryWrite

  • Message Name: MemoryWrite
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: Write data to device memory
  • Requires Programming Mode: yes
Byte no# Description
2 Count: Number of bytes to write to memory, starting at "Address"
3 Address HI
4 Address LO
5..13 1..9 bytes of Data, depends on "Count". Remaining bytes: 0xFF


0x1F MemoryRead

  • Message Name: MemoryRead
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: Reads data from device memory
  • Requires Programming Mode: yes
Byte no# Description
2 Count: Number of bytes to read from address
3 Address HI
4 Address LO
5..13 0xFF, unused


0x20 MemoryResponse

  • Message Name: MemoryResponse
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: Response to MemoryRead
  • Requires Programming Mode: yes
Byte no# Description
2 Count: Number of bytes that have been read from address
3 Address HI
4 Address LO
5..13 1..9 bytes of Data, depends on "Count". Remaining bytes: 0xFF


0x?? UpdatePrepare

  • Message Name: UpdatePrepare
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: prepare update
  • Requires Programming Mode: yes
Byte no# Description
2 size of update integer[0]
3 size of update integer[1]
4 size of update integer[2]
5 size of update integer[3]
6..13 unused, 0xFF


0x?? UpdateWrite

  • Message Name: UpdateWrite
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: prepare update
  • Requires Programming Mode: yes
Byte no# Description
2 count: 1..11 bytes
3..13 1..11 bytes of Data, depends on "Count". Remaining bytes: 0xFF

0x?? UpdateFinish

  • Message Name: UpdateFinish
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: finish update
  • Requires Programming Mode: yes
Byte no# Description
2 CRC32[0] [1]
3 CRC32[1]
4 CRC32[2]
5 CRC32[3]
6..13 unused, 0xFF


0x?? RawDataPrepare

  • Message Name: RawDataPrepare
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: prepare raw data upload
  • Requires Programming Mode: yes
Byte no# Description
2 size of raw data; integer[0]
3 size of raw data; integer[1]
4 raw data identifier; byte[0]
5 raw data identifier; byte[1]
6 raw data identifier; byte[2]
7 raw data identifier; byte[3]
8 raw data identifier; byte[4]
9 raw data identifier; byte[5]
10 raw data identifier; byte[6]
11 raw data identifier; byte[7]
12 raw data identifier; byte[8]
13 raw data identifier; byte[9]

Note:

  • "size of raw data" is a uint16 value.
  • "raw data identifier" can be everything, f.i. a string with up to 10 bytes

KONNEKTING (talk) Do we really require an identifier with up to 10 bytes? We will not have that much data. Maybe a single byte is sufficient. Kind of "ID" like we have for parameters.

0x?? RawDataWrite

  • Message Name: RawDataWrite
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: write raw data to device; each message returns an ACK message. see above.
  • Requires Programming Mode: yes
Byte no# Description
2 count: 1..11 bytes
3..13 1..11 bytes of data, depends on "count". Remaining bytes: 0xFF

0x?? RawDataFinish

  • Message Name: RawDataFinish
  • Message-Type-ID: ?? dec / 0x?? hex
  • Description: finish raw data transfer
  • Requires Programming Mode: yes
Byte no# Description
2 CRC32[0] [2]
3 CRC32[1]
4 CRC32[2]
5 CRC32[3]
6..13 unused, 0xFF