Serial interface between the STM32 dongle and a the MQTT Broquer
build
scons
run
./gateway
Config file used is "./rf_gateway_config.json"
#C, Cpp clients ##Install
sudo apt-get install libmosquitto-dev
sudo apt-get install libmosquittopp-dev
- Scons : simple maintenance for a samll project
- C++11 : Modern c++
- Boost 1.60 (filesystem) : see install instructions
- json for modern c++ : json as easy to use as in javascript https://github.com/nlohmann/json (to be replaced by Poco::JSON)
Minimal install for filesystem support:
mkdir boost
cd boost
wget http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.bz2
tar xvfo boost_1_60_0.tar.bz2
cd boost_1_60_0
wget http://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2
tar xvfo boost_1_62_0.tar.bz2
cd boost_1_62_0
./bootstrap.sh --with-libraries=filesystem,system
sudo ./b2 install
mosquitto_pub -t 'jNodes/28/RGB' -m '{"Red":100,"Green":120,"Blue":255 }'
mosquitto_sub -t 'jNodes/#' -h 10.0.0.12 -p 1883 -v