Connect BLE sensors to local Mosquitto MQTT Broker. Current implementation read BLE beacons in disconnected mode that means sensors do not need to connect to BLE controller all the time. The following BLE sensor essentim SPOT is integrated. In principle the source code can recieve ble sensor data from any other ble sensors as well. https://essentim.com/en/essentim-sensors
- Local MQTT Broker running as docker container or systemd service
- sudo apt-get install mosquitto
- sudo systemctl status mosquitto
-
The --cpus= option specify how much of the available CPU resources a container can use. Example the following command limit the container at most 10% of the CPU every second.
-
The --memory= option specify maximum amount of memory the container can use. If you set this option, the minimum allowed value is 6m (6 megabytes).
sudo docker run -d \
--net=host \
--name bluetooth --privileged \
--cpus=".1" --memory="20m" \
--restart=always \
--log-driver json-file amjadbadar05/mx-ble-mqtt:0.0.4-armhf --ipv4="127.0.0.1"
docker-compose up
-
OUTPUT As you can see bluetooth application is connected successfully to local mosquitto broker
-
Verify container logs
sudo docker exec -it bluetooth "bash"