Skip to content
/ meshd Public

A Bluetooth mesh gateway daemon(d-bus) based on meshctl of [email protected]

License

GPL-2.0, LGPL-2.1 licenses found

Licenses found

GPL-2.0
COPYING
LGPL-2.1
COPYING.LIB
Notifications You must be signed in to change notification settings

ahnniu/meshd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3361671 · Nov 28, 2019
May 25, 2018
May 19, 2015
Mar 1, 2015
May 29, 2018
May 28, 2018
Apr 26, 2018
Mar 1, 2018
May 23, 2018
May 23, 2018
Nov 28, 2019
May 24, 2018
May 24, 2018
Mar 26, 2018
Nov 30, 2017
May 28, 2018
Sep 18, 2019
May 29, 2018
May 23, 2018
Mar 26, 2018
Aug 29, 2019
May 20, 2015
Dec 22, 2017
Aug 14, 2008
Aug 14, 2008
Jun 1, 2018
Mar 6, 2018
Oct 29, 2005
May 29, 2018
Mar 22, 2018
Nov 11, 2017
Nov 15, 2019
Mar 8, 2002
Jan 17, 2017
Sep 19, 2019
Mar 14, 2016
Jan 2, 2015
Aug 18, 2006
Apr 24, 2018
Jun 1, 2018

Repository files navigation

meshctld

A Bluetooth mesh gateway daemon based on meshctl of [email protected]

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