peplin/pygatt

pygatt does not connect to Raspberry Pi 4 BLE peripherals

Opened this issue · 0 comments

'patterns': [r'Connection successful.*\[LE\]>']

pygatt can not connect to Raspberry Pi 4 BLE peripheral on account of a connected callback string compare error in gattool.py

If you change the callback string in gattool.py

From THIS:

'connect': {
	                'patterns': [r'Connection successful.*\[LE\]>']
	            },

To THIS:

	'connect': {
	                'patterns': [r'Connection successful']
	            },

.... it will work.

( if pip installed you can edit the installed file rather than the source library to test: ~lib/python3.9/site-packages/pygatt/backends/gatttool/gatttool.py )

$ cat /sys/firmware/devicetree/base/model
Raspberry Pi 4 Model B Rev 1.5

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"