parent
271d5e78aa
commit
8df7f30ed7
@ -1 +1,58 @@
|
||||
Willkommen im Wiki.
|
||||
# Funkprotokoll für die Zeitschaltung
|
||||
## Specs
|
||||
* Scakeabke Node Address Protocol
|
||||
* http://www.hth.com/snap/
|
||||
* http://www.hth.com/filelibrary/pdffiles/snap.pdf
|
||||
## Aufbau
|
||||
* CRC-8
|
||||
* 3 Data-Bytes (1 Command-Byte, 2 Daten-Bytes)
|
||||
* All Byte Descriptions are in LSB
|
||||
2.0 Protocol description.
|
||||
```
|
||||
SYNC Synchronization byte
|
||||
HDB2 Header Definition Byte 2
|
||||
HDB1 Header Definition Byte 1
|
||||
DAB1 Destination Address Byte
|
||||
SAB1 Source Address Byte
|
||||
DB3 Data Byte 3
|
||||
DB2 Data Byte 2
|
||||
DB1 Data Byte 1
|
||||
CRC1 High byte of CRC-8
|
||||
```
|
||||
### SYNC
|
||||
2.1 Synchronization byte - SYNC. `0b01010100`
|
||||
### HDB
|
||||
2.2 Overview of header definition bytes (HDB2 and HDB1).
|
||||
* HDB2 `0b01010000`
|
||||
* DAB = Number of Destination Address Bytes (8,7 Bit) [1 Byte destination address]
|
||||
* SAB = Number of Source Address Bytes (6,5 Bit) [1 Byte source address]
|
||||
* PFB = Number of Protocol specific Flag Bytes (4,3 Bit) [0 Byte flags]
|
||||
* ACK = ACK/NAK bits (2,1 Bit) [No ACK request (Tx)]
|
||||
* HDB1 `0b10110011`
|
||||
* CMD = CoMmanD mode bit (8 Bit) [indicates that the data in DB1 contains a command]
|
||||
* EDM = Error Detection Method (7,6,5 Bit) [8-bit CRC]
|
||||
* NDB = Number of Data Bytes (4,3,2,1 Bit) [3 Bytes]
|
||||
### DAB
|
||||
Address 0 is reserved as a broadcast address and should not be used for anything else. Otherwise that is the destination address of the node.
|
||||
### SAB
|
||||
Source Address of that Node. If a Node hasn't a address it should use ´0xFF´
|
||||
### DB
|
||||
* DB1 (`0x02`-`0x7F` Query, `0x82`-`0xFF` Responses)
|
||||
* DB2 (1 Data-Byte, if not needed = 0)
|
||||
* DB3 (2 Data-Byte, if not needed = 0)
|
||||
### CRC
|
||||
* http://code.google.com/p/avr-code/source/browse/trunk/thermo/crc8.c
|
||||
## Addresses
|
||||
* Brodcast-Address: `0x00`
|
||||
* No Address Definded: `0xFF`
|
||||
* Controllers: `0xD0`-`0xE0`
|
||||
* Actors: `0x10`-`0xAF`
|
||||
All others are reserved for future use!
|
||||
## Querys
|
||||
* `0x02`: Status Request (Data: none)
|
||||
* `0x03`: Request Set Address (Data: none) [the only vaild command that can send with SAB `0xFF`]
|
||||
* `0x04`: Request Set Capabilitys (Data: none)
|
||||
## Responses
|
||||
* `0x82`: Status Response (Data: 1 Byte; `0x01` Ready, `0x02` Armed, `0x03` Ilde)
|
||||
* `0x83`: Set Adress (Data 1 Byte; Address)
|
||||
* `0x84`: Set Capability (Data 1 Byte, `Bit 1`: Servo, `Bit 2`: Motor, `Bit 3`: Quickstart-Button, `Bit 4-8`: Reserved)
|
Loading…
Reference in New Issue
Block a user