Skip to content

Commit 203d86f

Browse files
Update documentation.
1 parent f78617d commit 203d86f

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

docs/kiss_modem_protocol.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,38 @@ All values little-endian.
168168
| SF | 1 byte | Spreading factor (5-12) |
169169
| CR | 1 byte | Coding rate (5-8) |
170170

171+
### Version (Version response)
172+
173+
| Field | Size | Description |
174+
|-------|------|-------------|
175+
| Version | 1 byte | Firmware version |
176+
| Reserved | 1 byte | Always 0 |
177+
178+
### Encrypted (Encrypted response)
179+
180+
| Field | Size | Description |
181+
|-------|------|-------------|
182+
| MAC | 2 bytes | HMAC-SHA256 truncated to 2 bytes |
183+
| Ciphertext | variable | AES-128-CBC encrypted data |
184+
185+
### Airtime (Airtime response)
186+
187+
All values little-endian.
188+
189+
| Field | Size | Description |
190+
|-------|------|-------------|
191+
| Airtime | 4 bytes | uint32_t, estimated air time in milliseconds |
192+
193+
### Noise Floor (NoiseFloor response)
194+
195+
All values little-endian.
196+
197+
| Field | Size | Description |
198+
|-------|------|-------------|
199+
| Noise floor | 2 bytes | int16_t, dBm (signed) |
200+
201+
The modem recalibrates the noise floor every 2 seconds with an AGC reset every 30 seconds.
202+
171203
### Stats (Stats response)
172204

173205
All values little-endian.
@@ -178,6 +210,14 @@ All values little-endian.
178210
| TX | 4 bytes | Packets transmitted |
179211
| Errors | 4 bytes | Receive errors |
180212

213+
### Battery (Battery response)
214+
215+
All values little-endian.
216+
217+
| Field | Size | Description |
218+
|-------|------|-------------|
219+
| Millivolts | 2 bytes | uint16_t, battery voltage in mV |
220+
181221
### Sensor Permissions (GetSensors)
182222

183223
| Bit | Value | Description |
@@ -192,9 +232,19 @@ Use `0x07` for all permissions.
192232

193233
Data returned in CayenneLPP format. See [CayenneLPP documentation](https://docs.mydevices.com/docs/lorawan/cayenne-lpp) for parsing.
194234

235+
## Cryptographic Algorithms
236+
237+
| Operation | Algorithm |
238+
|-----------|-----------|
239+
| Identity / Signing / Verification | Ed25519 |
240+
| Key Exchange | X25519 (ECDH) |
241+
| Encryption | AES-128-CBC + HMAC-SHA256 (MAC truncated to 2 bytes) |
242+
| Hashing | SHA-256 |
243+
195244
## Notes
196245

197246
- Modem generates identity on first boot (stored in flash)
247+
- All multi-byte values are little-endian unless stated otherwise
198248
- SNR values in RxMeta are multiplied by 4 for 0.25 dB precision
199249
- TxDone is sent as a SetHardware event after each transmission
200250
- Standard KISS clients receive only type 0x00 data frames and can safely ignore all SetHardware (0x06) frames

0 commit comments

Comments
 (0)