aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-11-08 16:20:55 +0100
committerlonkaars <loek@pipeframe.xyz>2022-11-08 16:20:55 +0100
commit2784261e7b83b9549c5e2ba0913303d695493456 (patch)
treee973ab0e46823c86aeecfc153f7f7b97b51e6139
parentacbc6ee608bc7d9ec33ddf57719841335eff70b1 (diff)
project scaffolding and architecture draft in readme
-rw-r--r--.gitignore3
-rw-r--r--assets/fig-architecture.svg3
-rw-r--r--bts/main.c7
-rw-r--r--bts/makefile24
-rw-r--r--fig.drawio1
-rw-r--r--nrf528xx/main.c0
-rw-r--r--nrf528xx/makefile24
-rw-r--r--nrf528xx/readme.md4
-rw-r--r--readme.md37
-rw-r--r--shared/consts.h1
10 files changed, 103 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index fda6d56..2806e96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,10 @@
**/.cache
**/compile_commands.json
**/.DS_Store
+**/.$*
copyright/
temp/
+# bts
+bts/bts
diff --git a/assets/fig-architecture.svg b/assets/fig-architecture.svg
new file mode 100644
index 0000000..7196dd8
--- /dev/null
+++ b/assets/fig-architecture.svg
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1653px" height="1115px" viewBox="-0.5 -0.5 1653 1115" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="0" y="0" width="930" height="1050" fill="none" stroke="#000000" stroke-opacity="0.7" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 308px; height: 1px; padding-top: 357px; margin-left: 2px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">bluetooth mesh network</div></div></div></foreignObject><text x="2" y="369" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">bluetooth mesh network</text></switch></g><path d="M 360 945 L 570 945" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 195 870 L 195 690" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.7" stroke-width="3" stroke-miterlimit="10" stroke-dasharray="9 9" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 260px; margin-left: 65px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">bluetooth</div></div></div></foreignObject><text x="65" y="263" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">bluetooth</text></switch></g><rect x="30" y="870" width="330" height="150" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 315px; margin-left: 11px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">node</div></div></div></foreignObject><text x="65" y="319" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">node</text></switch></g><path d="M 195 540 L 195 330" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.7" stroke-width="3" stroke-miterlimit="10" stroke-dasharray="9 9" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 145px; margin-left: 65px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">bluetooth</div></div></div></foreignObject><text x="65" y="148" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">bluetooth</text></switch></g><path d="M 360 615 L 570 615" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><rect x="30" y="540" width="330" height="150" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 205px; margin-left: 11px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">node</div></div></div></foreignObject><text x="65" y="209" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">node</text></switch></g><rect x="960" y="0" width="690" height="900" fill="none" stroke="#000000" stroke-opacity="0.7" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 228px; height: 1px; padding-top: 307px; margin-left: 322px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">desktop computer<br />(on ip network)</div></div></div></foreignObject><text x="322" y="319" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">desktop computer...</text></switch></g><rect x="570" y="870" width="330" height="150" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 315px; margin-left: 191px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">usb power source (no data)</div></div></div></foreignObject><text x="245" y="319" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">usb power source (...</text></switch></g><rect x="570" y="540" width="330" height="150" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 205px; margin-left: 191px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">usb power source (no data)</div></div></div></foreignObject><text x="245" y="209" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">usb power source (...</text></switch></g><rect x="990" y="30" width="390" height="390" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 128px; height: 1px; padding-top: 147px; margin-left: 330px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Border Transport Server</div></div></div></foreignObject><text x="458" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">Border Transport Serv...</text></switch></g><path d="M 660 180 L 930.09 180 L 990 180" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 60px; margin-left: 275px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">USB serial</div></div></div></foreignObject><text x="275" y="63" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">USB serial</text></switch></g><rect x="30" y="30" width="630" height="300" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-end; width: 208px; height: 1px; padding-top: 117px; margin-left: 10px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: right;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">node (as border router)</div></div></div></foreignObject><text x="218" y="129" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="end">node (as border router)</text></switch></g><path d="M 270 210 L 270 150" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><rect x="210" y="210" width="120" height="90" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 85px; margin-left: 71px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">light</div></div></div></foreignObject><text x="90" y="89" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">light</text></switch></g><rect x="60" y="210" width="120" height="90" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 85px; margin-left: 21px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">button</div></div></div></foreignObject><text x="40" y="89" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">button</text></switch></g><rect x="60" y="60" width="570" height="90" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 188px; height: 1px; padding-top: 35px; margin-left: 21px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">nRF528xx</div></div></div></foreignObject><text x="115" y="39" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">nRF528xx</text></switch></g><path d="M 120 210 L 120 150" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 495 210 L 495 150" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><rect x="360" y="210" width="270" height="90" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 85px; margin-left: 121px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">usb controller</div></div></div></foreignObject><text x="165" y="89" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">usb controller</text></switch></g><rect x="1020" y="60" width="330" height="150" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 45px; margin-left: 341px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">serial port communication</div></div></div></foreignObject><text x="395" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">serial port commun...</text></switch></g><path d="M 1350 315.09 L 1530.09 315.09 L 1530.09 720 L 1380 720" fill="none" stroke="rgb(0, 0, 0)" stroke-opacity="0.7" stroke-width="3" stroke-miterlimit="10" pointer-events="stroke"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 167px; margin-left: 510px;"><div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">TCP socket</div></div></div></foreignObject><text x="510" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">TCP socket</text></switch></g><rect x="1020" y="240" width="330" height="150" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 108px; height: 1px; padding-top: 105px; margin-left: 341px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">TCP socket API</div></div></div></foreignObject><text x="395" y="109" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">TCP socket API</text></switch></g><rect x="990" y="570" width="390" height="300" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-width="3" pointer-events="all"/><g transform="translate(-0.5 -0.5)scale(3)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 240px; margin-left: 331px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Configuration UI / Action handler server<br /><br />(Home Assistant or custom HTML/QT GUI)</div></div></div></foreignObject><text x="395" y="244" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Configuration UI / Ac...</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
diff --git a/bts/main.c b/bts/main.c
new file mode 100644
index 0000000..1be969b
--- /dev/null
+++ b/bts/main.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main() {
+ printf("hello world!\n");
+
+ return 0;
+}
diff --git a/bts/makefile b/bts/makefile
new file mode 100644
index 0000000..e646524
--- /dev/null
+++ b/bts/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
new file mode 100644
index 0000000..be88a39
--- /dev/null
+++ b/fig.drawio
@@ -0,0 +1 @@
+<mxfile host="Electron" modified="2022-11-08T14:55:02.382Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.3.0 Chrome/104.0.5112.114 Electron/20.1.3 Safari/537.36" etag="Yv_Capr2PmcIKWL7ctCu" version="20.3.0" type="device"><diagram id="TQBjHMX74tOWVntnVVwY" name="architecture">3VrbcqM4EP0aV2UfNgXI18f4kkmqMjXZcVI7eZRBsTWRkUuI2N6v3xYIY5CNb9g444dEahohdZ8+ajXUUG+6+CbwbPKde4TVHMtb1FC/5jhty4a/SrCMBfVOPRaMBfVikZ0KhvQ/ooWWlobUI0FGUXLOJJ1lhS73feLKjAwLwedZtXfOsk+d4TExBEMXM1P6L/XkRC+rYaXyB0LHk+TJtqWvTHGirAXBBHt8viZCgxrqCc5l3JoueoQp2yV2ie+733J1NTFBfLnPDbNO6/fbbPA4cBsjMf/xSn4O5N92Ox7mE7NQr3gELTAxzB4WQQL1zydyzsWHXodcJsYRPPQ9osa3aqg7n1BJhjPsqqtzQAPIJnLKoGdDEzM69qHNyDvMt8vwiLBnHlBJuRK7sAwi4MInEZKCA55yCiMuJZ+uKdzpASVXT3qnjPU44zBE3+c+zKEbSME/SCKsOciKfnCFwyypVJBsqa62AYxLFluta698BlgnfEqkWILKIovXZbY7TzGDEtlkDS8oARLWOB2vRk5dCQ3tzQM8myxhzV3EA2jrLhdywsfcx2yQSrtZh6Y6T1zZOHLjbyLlUscpDiXPOhmsJZa/9P1R5011bhtJt79Yv9hfrnrenYrW1Hkguadqyf3UQ2oBxf6B9fJQuKTAME3NIliMiSwyoLXZ4YIwLOlndiKluw+1igKzCscWO4iwUXQxCU4QeTiYRI+0t0XcRf3ZqtKdTcObPuyUpxFqCazlZFkLWSZt2Zto62ysZZuGqhb2Cyp/pQwGvbcE8NBOyUx19uWyorjYEEYlhkprz1DZApq9Q0Xf+swpzHAFtlYjt0XmQBRPS9+U4ghsiZdrajOlEOz/mHxadJA6NOLnp5BeGeSEvRlViWV7HckrXG/D8tXv5/uCWmlVtwGY2/k1bgB2p/INoGMYCs5/HyrHV4e86SxUpwSnydQZYqRaY9W6gSMCjDxLDyt/nWbbP/u0gtDO44qDNh1X8pxd3nHFMvweBiO1KD5XDk94wLFufK7qCVjiE11cSvhcWwIVs9xXt2P1POTUDTvCnutFJnwR2A9msANDe0jEpxKeYsDjySVhKRFbZAvZlEEY9ayDnA3+2UQYK2H5DjJ31NdhV3mBCAqJ89c4I5eYByXV0Z15UP3EPOiorBzlMo1WcVZerH6erNzekqJZN7BIxxol4Q84gfA8kTS/QMw7O0Pe2UTJxrmuvNywUUlUn6EEUGLY1/cN+yqi3s5tG/XiqC9WP0/Um/s8i7BcdUrUzpqibUZffWOCfqbYQ4aZRiEQkl+5ndB12clMv/2f9w2nvVhcm6XQhhSuc0lT2SamTH43iHTNJlkDHsXTO7ePEpkancbUa35qFJyETizSNpq3TrYi2sz5P16nUaY1ydxu3jYzv8ywdm7Ykqq/tn3YjlOofqbqb9OE+VUeTo6JqBLjJcHhZVIbExq5NwP1MwG2fRhgC9XPBNiGQdRxTcnlvhScsVMLICVsbvbuPOCimxsybZYUJixdOnL5dBr6EGvRCa9qA66+RClIDy5agUPmm4CX3nNEHO4HMRP0K+DQi77MRft++IDaZfDjobzWyL9a0qf3bcSW10+AdVZmQ+bnBlmMWXfPj1cXmpUXx5H51WCP++90HApNZtYrmM1STwETulo2wb7H4pcQumqef4234cXeA8xZDRIENJA4QgxXQ7hhoOphjvXw8v0JHvTPC7S/vT5eui43pZ4XsUtSlzPuSApzK80yIGHU4/ctyB9RnYNu+plqHHrpt75o8D8=</diagram></mxfile> \ No newline at end of file
diff --git a/nrf528xx/main.c b/nrf528xx/main.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nrf528xx/main.c
diff --git a/nrf528xx/makefile b/nrf528xx/makefile
new file mode 100644
index 0000000..78d52e2
--- /dev/null
+++ b/nrf528xx/makefile
@@ -0,0 +1,24 @@
+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
new file mode 100644
index 0000000..fcebcf8
--- /dev/null
+++ b/nrf528xx/readme.md
@@ -0,0 +1,4 @@
+# nrf528xx subdirectory
+
+- compatible with nrf52833 and nrf52840
+- make for compiling and building
diff --git a/readme.md b/readme.md
index da1e752..2e360fe 100644
--- a/readme.md
+++ b/readme.md
@@ -1,3 +1,38 @@
# project domotica
-het is er weer een hoor
+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
+
+<div align="center">
+ <img src="assets/fig-architecture.svg"/>
+</div>
+
+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.
+- 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 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.
diff --git a/shared/consts.h b/shared/consts.h
new file mode 100644
index 0000000..6f70f09
--- /dev/null
+++ b/shared/consts.h
@@ -0,0 +1 @@
+#pragma once