For a complete view : with UML sequence diagrams The purpose is to have a framework for small embedded devices that have the ease of integration and development.
This framework is based on the ideas that also live in Vertx and Node.js.
-- Wifi : to signal connection setup and disconnection -- Mqtt : assure publishing of events to mqtt server and maintain connection -- Config : assures store of persistent config items -- Telnet : CLI interface for chaning config -- Monitor : reports task state to logger -- Hardware : abstraction interface for peripherals -- DWM1000_Anchor -- DWM1000_Tag
https://docs.google.com/document/d/1fxgZ6O5Crq3wHmV1OV_fEfGh67ktuzFFL1c-V1uz-TM/pub
It uses both led's on a nodemcu esp8266
You can open a telnet session towards the esp8266 once it's on the wifi network. the compilation picks up some environment variables to load the first Wifi AP. The below example as already configured the system.host property to "anchor3", so it's visible via mDNS under "anchor3.local". The property dwm1000.role is used to determine it's role as anchor or tag.
$ telnet anchor3.local
Trying 192.168.0.102...
Connected to anchor3.local.
Escape character is '^]'.
anchor3 $ config show
{
"system": {
"host": "anchor3"
},
"dwm1000": {
"x": 1000,
"y": 2000,
"role": "A"
},
"telnet": {
"port": 23
},
"wifi": {
"ssid": "YourSSID",
"pswd": "YourPassword"
}
}
anchor3 $ config set service option abcdef
done - service option=abcdef
anchor3 $ config show
{
"system": {
"host": "anchor3"
},
"dwm1000": {
"x": 1000,
"y": 2000,
"role": "A"
},
"telnet": {
"port": 23
},
"wifi": {
"ssid": "YourSSID",
"pswd": "YourPassword"
},
"service": {
"option": "abcdef"
}
}
anchor3 $ config save
config saved.
anchor3 $ <ctrl-D><enter> closes the connection
Connection closed by foreign host.
The basics : https://en.wikipedia.org/wiki/Trilateration
sequenceDiagram
participant Tag
participant Anchor1
participant Anchor2
Anchor1 ->> Tag: Blink Message
Note right of Tag: Anchor1 announces himself to Tag. Tag extracts x,y(Configured static in Anchor ) ,distance ( last measurement ) from blink Message. Tag will include Anchor1 in polling. !! NON-STANDARD blink message
Tag ->> Anchor1: Poll message
activate Tag
Activate Anchor1
Anchor1 ->> Tag: Resp Message ( rx time + fixed delay )
Tag ->> Anchor1: Final message ( poll,resp,final timing included )
Note right of Anchor1 : Anchor1 stores distance for next blink message
deactivate Tag
deactivate Anchor1
Anchor2 ->> Tag: Blink Message
Note right of Tag: Anchor2 announces himself to Tag. Tag extracts x,y(Configured static in Anchor ) ,distance ( last measurement ) from blink Message. Tag will include Anchor2 in polling.
Activate Tag
Note right of Tag : Tag has the x,y,distance for each Anchor, so can calculate through trilateration the position of itself.Piece of cake (NOT!). Any Anchors timed out will be removed from polling list
Deactivate Tag
Written with StackEdit.