Skip to content

python library to interface with ESP32 Blufi using python (on a host PC)

Notifications You must be signed in to change notification settings

GeneKong/pyBlufi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyBlufi

NOTE: This is a WIP. Feel free to clone and try it out, but not installable with pip yet.

Python utility to interface with esp32 Blufi component. Mimics EspBlufiForAndroid and EspBlufiForiOS.

Why

Useful for testing/debugging Blufi commands without having to use a phone. Thus making it easier to implement new features, build on top of Blufi and not having to design apps and protocols from scratch.

MTU

On some platforms, negotiated MTU is not accessible via API. On Linux, bluez does not provide a way (yet?) to get negotiated MTU via dbus. For this reason, payloads must be artificially capped using the setPostPackageLengthLimit method. Using setPostPackageLengthLimit(256) should work in most cases. If the client PC has a requirement for lower MTU, then this must be set lower. Or if/when bleak can correctly obtain MTU for a given platform, it can be removed.

Requirements

# bleak - develop branch
pip install https://github.com/hbldh/bleak/archive/refs/heads/develop.zip
# cryptography
pip install cryptography

About

python library to interface with ESP32 Blufi using python (on a host PC)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%