diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-01-07 14:43:03 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-01-07 14:43:03 +0100 |
commit | adb70d5ee1987cfb1680114d2db9786923aad1f1 (patch) | |
tree | a15de82808f40153cd285994cab7534ed9a10538 /shared/protocol-tests | |
parent | 46ede2c109fe2aa390936ec4f0a30321fb7b5d86 (diff) | |
parent | b083c8e08d610a4e74f39f66f3daa191301893b1 (diff) |
Merge branch 'qt-gui-meshconnector-serial' into dev
Diffstat (limited to 'shared/protocol-tests')
-rw-r--r-- | shared/protocol-tests/.gitignore | 1 | ||||
-rw-r--r-- | shared/protocol-tests/get-node-response.src | 81 | ||||
-rw-r--r-- | shared/protocol-tests/makefile | 15 | ||||
-rw-r--r-- | shared/protocol-tests/ping-response.src | 10 | ||||
-rw-r--r-- | shared/protocol-tests/ping.src | 4 |
5 files changed, 111 insertions, 0 deletions
diff --git a/shared/protocol-tests/.gitignore b/shared/protocol-tests/.gitignore new file mode 100644 index 0000000..a8a0dce --- /dev/null +++ b/shared/protocol-tests/.gitignore @@ -0,0 +1 @@ +*.bin diff --git a/shared/protocol-tests/get-node-response.src b/shared/protocol-tests/get-node-response.src new file mode 100644 index 0000000..31bf1ff --- /dev/null +++ b/shared/protocol-tests/get-node-response.src @@ -0,0 +1,81 @@ +00: ff ; start byte +01: 05 ; opcode (0x05 = response) +02: 00 ; message id (0x0000) +03: 00 ; ^ +04: 00 ; error byte (0x00 = false) +05: 01 ; response type (0x01 = get node) +06: 8f ; original message id (0x8ff8) +07: f8 ; ^ +08: 00 ; remaining response size (0x39 = 57 bytes) +09: 39 ; ^ +-------; |- remaining response (cd_s_cmd_response_get_node) +0a: 00 ; | node count (0x0001 = 1) +0b: 01 ; | ^ +0c: 00 ; | remaining response size (0x35 = 53 bytes) +0d: 35 ; | ^ +-------; | |- remaining response (cd_s_cmd_node[1]) +0e: ff ; | | [esc] +0f: ff ; | | uuid (ffffffff-0000-0000-dead-beef00000000) +10: ff ; | | [esc] +11: ff ; | | ^ +12: ff ; | | [esc] +13: ff ; | | ^ +14: ff ; | | [esc] +15: ff ; | | ^ +16: 00 ; | | ^ +17: 00 ; | | ^ +18: 00 ; | | ^ +19: 00 ; | | ^ +1a: de ; | | ^ +1b: ad ; | | ^ +1c: be ; | | ^ +1d: ef ; | | ^ +1e: 00 ; | | ^ +1f: 00 ; | | ^ +20: 00 ; | | ^ +21: 00 ; | | ^ +22: ff ; | | [esc] +23: ff ; | | mac address (ff:00:ff:00:ff:00) +24: 00 ; | | ^ +25: ff ; | | [esc] +26: ff ; | | ^ +27: 00 ; | | ^ +28: ff ; | | [esc] +29: ff ; | | ^ +2a: 00 ; | | ^ +2b: 04 ; | | name length (0x04 = 4) +2c: 00 ; | | light on (0x00 = false) +2d: 00 ; | | provisioned (0x00 = false) +2e: de ; | | button publish address (0xdeadbeef) +2f: ad ; | | ^ +30: be ; | | ^ +31: ef ; | | ^ +32: 00 ; | | link count (0x0001 = 1) +33: 01 ; | | ^ +34: 00 ; | | remaining size (0x14 = 20 bytes) +35: 14 ; | | ^ +-------; | | |- remaining response (char[4], cd_uuid_t[1]) +36: 67 ; | | | node name ("gert") +37: 65 ; | | | ^ +38: 72 ; | | | ^ +39: 74 ; | | | ^ +3a: ff ; | | | [esc] +3b: ff ; | | | link[0] uuid (ffffffff-0000-0000-dead-beef00000000) +3c: ff ; | | | [esc] +3d: ff ; | | | ^ +3e: ff ; | | | [esc] +3f: ff ; | | | ^ +40: ff ; | | | [esc] +41: ff ; | | | ^ +42: 00 ; | | | ^ +43: 00 ; | | | ^ +44: 00 ; | | | ^ +45: 00 ; | | | ^ +46: de ; | | | ^ +47: ad ; | | | ^ +48: be ; | | | ^ +49: ef ; | | | ^ +4a: 00 ; | | | ^ +4b: 00 ; | | | ^ +4c: 00 ; | | | ^ +4d: 00 ; | | | ^ diff --git a/shared/protocol-tests/makefile b/shared/protocol-tests/makefile new file mode 100644 index 0000000..f8ac490 --- /dev/null +++ b/shared/protocol-tests/makefile @@ -0,0 +1,15 @@ +XXD := xxd +RM := rm -f + +SRCS := $(wildcard *.src) +TARGET := $(SRCS:.src=.bin) + +.PHONY: all clean + +all: $(TARGET) + +%.bin: %.src + $(XXD) -r -c1 $< $@ + +clean: + $(RM) $(TARGET) diff --git a/shared/protocol-tests/ping-response.src b/shared/protocol-tests/ping-response.src new file mode 100644 index 0000000..57418d5 --- /dev/null +++ b/shared/protocol-tests/ping-response.src @@ -0,0 +1,10 @@ +00: ff ; start byte +01: 05 ; response opcode +02: 00 ; message id (0x0001) +03: 01 ; ^ +04: 01 ; error (true) +05: 00 ; response type (0x00 = ping) +06: 00 ; original message id (0x0000) +07: 00 ; ^ +08: 00 ; remainder size (0x0000) +09: 00 ; ^ diff --git a/shared/protocol-tests/ping.src b/shared/protocol-tests/ping.src new file mode 100644 index 0000000..beec10a --- /dev/null +++ b/shared/protocol-tests/ping.src @@ -0,0 +1,4 @@ +00: ff ; start byte +01: 00 ; ping opcode +02: f8 ; message id (used as ping identifier) +03: 8f ; ^ |