Our core
server:
- Collects packets from
board
s - Performs real-time analytics
- Sends data to the
frontend
module
MongoDB
and mongocxx
drivers.
Create a configuration file config.json
having the following format:
{
"port": 12345,
"boards": [
{
"mac": "2e:c5:44:b4:7a:08",
"x": 0,
"y": 0
},
{
"mac": "1a:dd:db:a7:b7:f5",
"x": 20,
"y": 0
}
],
"room_coordinates":[
{"x": 0, "y": 0},
{"x": 0, "y": 90},
{"x": 90, "y": 0},
{"x": 90, "y": 90}
]
}
- Start MongoDB:
$ sudo service mongod start
- Optionally, free the
core
server port (example with port 12345):lsof -i tcp:12345 | grep LISTEN | awk '{print $2}' | xargs kill
- Run the
core
server:$ chmod u+x start.sh $ ./start.sh
- Move to the dummy packet producer directory
$ cd ../examples/dummy_packets
- Launch the dummy packet producer
$ python3 dummy_packet_producer.py --batch_size 10 --batch_rate 10 --protobuf --out_file batch.txt 127.0.0.1 12345