Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ pip install gattlib
```

this requires Bluez 5.37 or higher to be installed as well.
Gattlib requires libbluetooth-dev and libboost-python-dev to be available as well.
Gattlib dependencies:
```
sudo apt-get install libboost-python-dev
sudo apt-get install libboost-thread-dev
sudo apt-get install libglib2.0-dev
```

To run this as non-root run the following
```
Expand Down
3 changes: 2 additions & 1 deletion miflora.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
requester = GATTRequester(address, True)
#Read battery and firmware version attribute
data=requester.read_by_handle(0x0038)[0]
battery, firmware = unpack('<xB5s',data)
battery, firmware = unpack('<B6s',data)
firmware = firmware.replace('\'', '')
msgs.append({'topic': topic + 'battery', 'payload':battery})
msgs.append({'topic': topic + 'firmware', 'payload':firmware})
#Enable real-time data reading
Expand Down