dpavlin / quintic-ble

NXP/Quintic QN902x BLE python MQTT server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This turns cheap Quintic based wrist band into MQTT button.

Example usage:

	./quintic.py # runs mqtt for wristband
	mosquitto_pub -t quintic/cmd -m button

This code is based on gist: https://gist.github.com/ali1234/ac9170132e5abfc5381353428e70f1d9
which is linked from web post at https://www.schlafhacking.de/blog/?p=97


NXP site:

QN9021: Ultra low power Bluetooth LE system-on-chip solution
http://www.nxp.com/products/microcontrollers-and-processors/more-processors/application-specific-mcus-mpus/bluetooth-low-energy-ble/ultra-low-power-bluetooth-le-system-on-chip-solution:QN9021?


Dependencies:

sudo apt-get install python-pip libglib2.0-dev
sudo pip install bluepy


Troublesooting:

On Raspberry Pi 3 if you get follwing error:

	bluepy.btle.BTLEException: Failed to connect to peripheral 08:7C:BE:92:85:23, addr type: public

Try

	sudo systemctl restart hciuart
	sudo systemctl restart bluetooth

To reset all current connections to bluetooth devices.


For serial access see:

https://github.com/Informatic/qn902x-tools

About

NXP/Quintic QN902x BLE python MQTT server


Languages

Language:Python 98.9%Language:Shell 1.1%