A Bluetooth mesh gateway daemon based on meshctl of bluez@5.50
$ sudo apt-get install autoconf libtool libtool-bin libglib2.0-dev libdbus-1-dev libjson-c-dev elfutils libelf-dev libdw-dev udev libudev-dev systemd libsystemd-dev libasound2-dev libical-dev libreadline-dev libsbc-dev libspeexdsp-dev automake qt3d5-dev libncurses5-dev pesign
$ cd ~
$ wget https://s3.amazonaws.com/json-c_releases/releases/json-c-0.13.tar.gz
$ tar -xvf json-c-0.13.tar.gz
$ cd json-c-0.13/
$ ./configure --prefix=/usr --disable-static && make
$ sudo make install
$ cd ~
$ wget https://mirrors.edge.kernel.org/pub/linux/libs/ell/ell-0.6.tar.xz
$ tar -xvf ell-0.6.tar.xz
$ cd ell-0.6/
$ ./configure --prefix=/usr
$ make
$ sudo make install
$ cd ~
$ git clone https://github.com/ahnniu/meshd.git
$ cd meshd
$ git checkout meshd
$ ./bootstrap
$ ./configure --enable-mesh --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
$ make
$ cd /path/to/meshd
$ sudo make install
- meshctl will be installed in /usr/bin/meshctl
- meshd will be installed in /usr/bin/meshd
- bluetooth-meshd.service will be installed in /lib/systemd/system/bluetooth-meshd.service
$ cd /path/to/meshctl
# Start in shell interactive mode
$ sudo mesh/meshctl --config mesh
# Start in daemon mode
$ sudo mesh/meshctl --config mesh --daemon 1 --log mesh/log.txt
# start / stop / restart
# logfile -> /var/log/bluetooth/mesh/meshd.log
# config dir -> /var/lib/bluetooth/mesh
$ sudo meshd start
# logfile -> /var/log/bluetooth/mesh/meshd.log
# config dir -> /var/lib/bluetooth/mesh
sudo systemctl start bluetooth-meshd
$ cd /path/to/meshd
$ sudo cp mesh/conf/embest.conf /etc/dbus-1/system.d/
$ sudo reboot