From 7488d5191bc6cd47acd2e67be408243270a23f6d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 26 Dec 2011 22:20:02 +0100 Subject: [PATCH] A brief description of the protocol --- PROTOCOL | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 PROTOCOL diff --git a/PROTOCOL b/PROTOCOL new file mode 100644 index 0000000..0c9407d --- /dev/null +++ b/PROTOCOL @@ -0,0 +1,35 @@ +Arexx Data Logger Protocol +~~~~~~~~~~~~~~~~~~~~~~~~~~ +All packets have fixed size of 64 bytes. The first byte is a packet +type, followed by type-dependent data. + +Timestamps are 32-bit integers representing the number of seconds +since 2000-01-01 00:00:00 UTC. + +Request packets (from the PC to the logger) +~~~~~~~~~~~~~~~ + +type 03 Request sensor data + The data part is probably unused. + +type 04 Set clock + Data: u32le timestamp + + +Reply packets (from the logger to the PC) +~~~~~~~~~~~~~ + +type 00 Report sensor data + The data part is a sequence of tuples, each tuple + starts with its length. + + 9-byte tuples: + u8 tuple length (0x09) + u16le sensor ID + u16be! raw value + u32le timestamp + + 10-byte tuples contain one extra byte: + u8 signal quality (units unknown) + + A 0-byte tuple serves as a terminator. -- 2.39.2