ahnniu / meshd

A Bluetooth mesh gateway daemon(d-bus) based on meshctl of bluez@5.50

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meshctld

A Bluetooth mesh gateway daemon based on meshctl of bluez@5.50

Setup on Raspberry Pi 3

Install Dependencies

Install Dependencies for BlueZ

$ 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

Install json-c

$ 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

Install ell for BlueZ v5.50

$ 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

Get source code

$ cd ~
$ git clone https://github.com/ahnniu/meshd.git
$ cd meshd
$ git checkout meshd

Compile

$ ./bootstrap
$ ./configure --enable-mesh --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
$ make

Install

$ 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

How to use

Start / Stop the program

Start the meshctl

$ 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 daemon with meshd script

# start / stop / restart
# logfile -> /var/log/bluetooth/mesh/meshd.log
# config dir -> /var/lib/bluetooth/mesh
$ sudo meshd start

Start daemon with systemctl

# logfile -> /var/log/bluetooth/mesh/meshd.log
# config dir -> /var/lib/bluetooth/mesh
sudo systemctl start bluetooth-meshd

DBus configuration

$ cd /path/to/meshd
$ sudo cp mesh/conf/embest.conf /etc/dbus-1/system.d/
$ sudo reboot

DBus interface

About

A Bluetooth mesh gateway daemon(d-bus) based on meshctl of bluez@5.50

License:GNU General Public License v2.0


Languages

Language:C 97.6%Language:Python 1.3%Language:Makefile 0.4%Language:Roff 0.3%Language:C++ 0.2%Language:M4 0.1%Language:Shell 0.0%Language:Objective-C 0.0%Language:Perl 0.0%