Bluetooth LE Programming On Raspberry Pi
I'm looking at building up some Bluetooth LE programming expertise on Linux, specifically for use with Raspberry Pi 3 B+ and Pi Zero W models.
This is a compendium of libraries and tools that I'm looking at to build that skill on.
On the Raspberry Pi Zero W, a user must be a member of the
bluetooth group to work with tools like
bluetoothctl. Set this up with:
$ usermod -aG bluetooth [username]
- Everything You Need To Know to Set Up Bluetooth on the Raspberry Pi 3
- BlueZ - core Bluetooth support for Linux
- Ubuntu Core BlueZ documentation
- An Intro to Bluetooth Programming - MIT CSAIL notes on developing for Bluetooth using BlueZ.
pybluez installed, I had to increase the size of the system swapfile (the
gattlib dependency wouldn't compile). See this for info on how to change the swapfile size.
Also has to fix a
gattlib dependency, as described here: https://stackoverflow.com/questions/41463847/got-error-while-download-gattlib-via-pip3/52271293#52271293
pybluez requires root access, and because of the aforementioned issues, here's how I installed everything:
pip3 download gattlib cd gattlib-0.20150805 sed -ie 's/boost_python-py34/boost_python-py35/' setup.py sudo pip3 install . sudo pip3 install pybluez\[ble\]
This ensures that root can see the packages, and that we get
gattlib installed before