Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.05 KB

File metadata and controls

35 lines (22 loc) · 1.05 KB

BLE_Peripheral

create BLE peripheral using BlueZ, Dbus and python3 on Linux

usage:

Demo1

python3 app.py

Demo2

(require MPU6050 sensor)

sudo apt-get install -y python3-dbus python3-smbus

python3 motionSensorApp.py

stop bluetooth pairing request on iPhone

solution, stop Bluez Battery plugin from loading at boot.

modify Bluez service at /lib/systemd/system/bluetooth.service, then reboot system.

ExecStart=/usr/lib/bluetooth/bluetoothd -P battery

source

credit

BLE code is modified from GitHub: PunchThrough / espresso-ble

a very good article about BLE with BlueZ, python3 Creating a BLE Peripheral with BlueZ

more BLE example BlueZ examples

MPU6050 (Accelerometer+Gyroscope) Interfacing with Raspberry Pi