! bluez , bluez Pi. bluez raspbian.
sudo apt-get update
sudo apt-get upgrade
mkdir bluez
cd bluez
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.43.tar.xz
tar xvf bluez-5.43.tar.xz
cd bluez-5.43/
sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
./configure
sudo make
sudo make install
. Bluez v5.23, .
cd
sudo nano /lib/systemd/system/bluetooth.service
- "ExecStart =/usr/local/libexec/bluetooth/bluetoothd"
ExecStart=/usr/local/libexec/bluetooth/bluetoothd --experimental
bluetooth
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
, :
sudo hciconfig hci0 up
sudo hciconfig hcio leadv 0
Pi3 "raspberrypi", BLE ( LiteBlue iOS), .
, LEAdvertisingManager1,
dbus-send --system --dest=org.bluez --print-reply / org.freedesktop.DBus.ObjectManager.GetManagedObjects
, . . , , .
cd bluez/bluez-5.43/tests
dbus-python :
sudo apt-get install python-dev libdbus-1-dev libdbus-glib-1-dev
sudo apt-get install python-pip
sudo apt-get install
sudo python2.7 -m pip install dbus-python
- script python2.7 ( ), -
import gobject
from gi.repository import GObject as gobject
, example-gatt-, .
, iPhone Pi3 . bluetooth.
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
!