From d634b41735813489627cca534a9f51a3b5ad9b91 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 13 Nov 2022 15:04:07 +0100 Subject: update architecture --- assets/fig-architecture.svg | 2 +- bts/main.c | 7 ------- bts/makefile | 24 ------------------------ confui/main.c | 7 +++++++ confui/makefile | 24 ++++++++++++++++++++++++ fig.drawio | 2 +- nrf528xx/makefile | 24 ------------------------ nrf528xx/readme.md | 2 +- readme.md | 33 ++++++--------------------------- 9 files changed, 40 insertions(+), 85 deletions(-) delete mode 100644 bts/main.c delete mode 100644 bts/makefile create mode 100644 confui/main.c create mode 100644 confui/makefile delete mode 100644 nrf528xx/makefile diff --git a/assets/fig-architecture.svg b/assets/fig-architecture.svg index 07b3b12..8b65f9f 100644 --- a/assets/fig-architecture.svg +++ b/assets/fig-architecture.svg @@ -1,3 +1,3 @@ -
bluetooth mesh network
bluetooth mesh network
bluetooth
bluetooth
node
node
bluetooth
bluetooth
node
node
desktop computer
(on ip network)
desktop computer...
usb power source (no data)
usb power source (...
usb power source (no data)
usb power source (...
Border Transport Server
Border Transport Serv...
node (as border router)
node (as border router)
light
light
button
button
nRF528xx
nRF528xx
usb controller
usb controller
serial port communication
serial port commun...
TCP socket
TCP socket
TCP socket API
TCP socket API
Configuration UI / Action handler server

(Home Assistant or custom HTML/QT GUI)
Configuration UI / Ac...
USB serial
USB serial
Text is not SVG - cannot display
\ No newline at end of file +
bluetooth mesh network
bluetooth mesh network
BT mesh
BT mesh
node
node
BT mesh
BT mesh
node
node
Configuration utility
(on desktop computer)
Configuration utility...
node
(as border router)
node...
light
light
button
button
nRF528xx
nRF528xx
USB serial
USB serial
serial port communication
serial port commun...
configuration GUI
configuration GUI
J-Link debugger
J-Link debugger
Text is not SVG - cannot display
\ No newline at end of file diff --git a/bts/main.c b/bts/main.c deleted file mode 100644 index 1be969b..0000000 --- a/bts/main.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main() { - printf("hello world!\n"); - - return 0; -} diff --git a/bts/makefile b/bts/makefile deleted file mode 100644 index e646524..0000000 --- a/bts/makefile +++ /dev/null @@ -1,24 +0,0 @@ -CC = gcc -LD = gcc -RM = rm -f -CFLAGS = -LFLAGS = -TARGET = bts - -SRCS := $(wildcard *.c) -OBJS := $(patsubst %.c,%.o, $(SRCS)) - -all: $(TARGET) - -%.o: %.c - $(CC) -c $(CFLAGS) $< -o $@ - -$(TARGET): $(OBJS) - $(LD) $^ $(LFLAGS) -o $@ - -clean: - $(RM) $(TARGET) $(OBJS) - -compile_commands: clean - compiledb make - diff --git a/confui/main.c b/confui/main.c new file mode 100644 index 0000000..1be969b --- /dev/null +++ b/confui/main.c @@ -0,0 +1,7 @@ +#include + +int main() { + printf("hello world!\n"); + + return 0; +} diff --git a/confui/makefile b/confui/makefile new file mode 100644 index 0000000..e646524 --- /dev/null +++ b/confui/makefile @@ -0,0 +1,24 @@ +CC = gcc +LD = gcc +RM = rm -f +CFLAGS = +LFLAGS = +TARGET = bts + +SRCS := $(wildcard *.c) +OBJS := $(patsubst %.c,%.o, $(SRCS)) + +all: $(TARGET) + +%.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ + +$(TARGET): $(OBJS) + $(LD) $^ $(LFLAGS) -o $@ + +clean: + $(RM) $(TARGET) $(OBJS) + +compile_commands: clean + compiledb make + diff --git a/fig.drawio b/fig.drawio index 2262598..3170ced 100644 --- a/fig.drawio +++ b/fig.drawio @@ -1 +1 @@ -7Vvfc6o4FP5rnOk+bAeIoD621v6YuXe2e9vO3j5GiMptJE4IVfev3xMIIAQpVqw6d/vQJocQknO+852cA+2g4Xx1x/Fi9p15hHYsw1t10E3HsvqWDb+lYJ0IbGOQCKbc9xKRmQue/H+JEhpKGvkeCQsDBWNU+Iui0GVBQFxRkGHO2bI4bMJo8akLPCWa4MnFVJf+43tiprZlG7n8nvjTWfpk01BX5jgdrAThDHtsuSFCow4acsZE0pqvhoRK3aV6Se673XI1WxgngWhyw2LQ+/W6GD2MXHvMl3+9kB8j8afZT6Z5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EN4izvZhSjCq27JvdbcU9MFG2sMY7cTbFecX3oFy5ooRoKFa8gCGWozFk9ldJjRYhkC+CR3Up4yENaATJorLOKspkfijn3FPpxQzbb4jzvQIeppw2aYQi/1rGdeVmYbnF8lDZkoi42WDBkrbnjrv+oAcTmjIPHcFpopITZAHiR+YpOCVSR/nAEIEcPzXT0ODenWjOjUQGPxLoRo9A7xNNA4QKaIXKVI8V0+yIFfutQsXU0fypQ+VYXHSE0WCh4vQMFbNnqCg+XBiXYzBVPugdPmq5B4rFMcq1xnYrDbc4k+9dPVTRRsAN97VpsZyQHH6N03yNY7Q4mK/XerZYnK5WCeKjNmtLYF5PZD3ln29WMD46K4jjttGc02iFg5TBTNoAI+WYyNgDEyKlkctEK5CtX7JhIYDXUuRIlbuJBWjs19Ok2Ou1VyHiWA7cAS3W8nW75H6gvALTHvSwOuhRcmb4qnEg2DQuiDcDw6XMF64SCY7+f4nQofWzk8ygtw4yAIpRH61gmgE5AHlMu0ke0DO1aNVjOO7YH6Irdpj/Ix+/tFXvayG+RftmV+/si84zWmQwcTHuKS5AT3HxMiHxUgFQ3tuKzyNHFMBQ1V2vRyTj6nmU99YFuUP0jztC8O2uxxqYbipSZHQeaJqTnwtNoNfCL7c2mO5254mnpeN59Z54mjo99YKhZeYacE2UX5X4n61Hg6V+a+DUX/OafeTGcOJV05xOLkHzHjhp8SE/uXbb1KvJeHI5qf9YjWXbEnagS2yZIjpr2Aunn1zypsgMnpbzzWdj6pifg3+/j+dXHSXvcTmTlEIMQ/IhGuoZPdRJ0VeGha3HRSdK4EQFdFohtTUfFd4xYgFwfvvdpJG4ZeTX5nMoCGW6L0Kw44P+m32O6HSyft30Wl8j7h4/vRu4GpIdePcH1+kJ7hD1thNc67+TSg5niL4V9h0yybFN1hj++8U9jtYj+SXNTYNAfj85R353qMmh6C261X+i86pb/TvfWvwA \ No newline at end of file diff --git a/nrf528xx/makefile b/nrf528xx/makefile deleted file mode 100644 index 78d52e2..0000000 --- a/nrf528xx/makefile +++ /dev/null @@ -1,24 +0,0 @@ -CC = gcc -LD = gcc -RM = rm -f -CFLAGS = -LFLAGS = -TARGET = main - -SRCS := $(wildcard *.c) -OBJS := $(patsubst %.c,%.o, $(SRCS)) - -all: $(TARGET) - -%.o: %.c - $(CC) -c $(CFLAGS) $< -o $@ - -$(TARGET): $(OBJS) - $(LD) $^ $(LFLAGS) -o $@ - -clean: - $(RM) $(TARGET) $(OBJS) - -compile_commands: clean - compiledb make - diff --git a/nrf528xx/readme.md b/nrf528xx/readme.md index fcebcf8..77ea509 100644 --- a/nrf528xx/readme.md +++ b/nrf528xx/readme.md @@ -1,4 +1,4 @@ # nrf528xx subdirectory - compatible with nrf52833 and nrf52840 -- make for compiling and building +- west for building and flashing diff --git a/readme.md b/readme.md index 330b623..bf8ff2a 100644 --- a/readme.md +++ b/readme.md @@ -2,15 +2,6 @@ still WIP -## terminology - -|verb/acronym|description| -|-|-| -|dongle|USB stick with a nRF52833 or nRF52840 module| -|bts|Border Transport Server| -|node|A dongle running in node mode| -|border router|A dongle running in border router mode| - ## architecture
@@ -19,26 +10,14 @@ still WIP Above is a draft version of the system architecture. -- Each node runs the same firmware, and is capable of being a border router. -- Each dongle starts in "node mode" by default, and only turns into border - router mode once it receives a special command over the USB serial bus. +- Each node runs the same firmware, and is capable of being a border router + over the serial interface exposed by the J-Link debugger. - A node can turn into a border router, but will still keep functioning as a normal node as well. -- All blocks in the desktop computer zone can be run on different computers - over the network. -- The BTS creates a TCP socket which sends data to the client on incoming - events from the mesh network, and broadcasts any data received from the - client back to the mesh network. -- The configuration UI / action handler server sends and receives events - to/from the TCP socket API, and will decide which actions should be taken for - each event. +- The configuration UI can do the following: + - Change which buttons toggle which led(s) + - Manually set/reset leds of nodes + - List all connected nodes in the bluetooth mesh network - The protocol used for communicating between network nodes is preferably in a binary format to save on bandwidth. -- The protocol used by the TCP socket API is text-based, as it's used to - communicate between userspace services on desktop computers. -- Each node sends a button event to the border router when it's button is - pressed. -- Each node sets it's LED's status upon receiving an LED event. -- Each node has it's own ID (this is probably going to be it's bluetooth MAC - address for simplicity). -- cgit v1.2.3