carglglz / upyble Goto Github PK
View Code? Open in Web Editor NEWCommand line tool for Bluetooth Low Energy MicroPython devices
License: MIT License
Command line tool for Bluetooth Low Energy MicroPython devices
License: MIT License
I get the following error on Ubuntu 22.04
upyble brepl
Traceback (most recent call last):
File "/home/user/.local/bin/blerepl", line 315, in <module>
basedev.connect(show_servs=args.v, log=args.v)
File "/home/user/.local/lib/python3.10/site-packages/upyble/upybledevice.py", line 381, in connect
self.get_services(log=show_servs)
File "/home/user/.local/lib/python3.10/site-packages/upyble/upybledevice.py", line 391, in get_services
for service in self.ble_client.services:
File "/home/user/.local/lib/python3.10/site-packages/bleak/__init__.py", line 613, in services
raise BleakError("Service Discovery has not been performed yet")
bleak.exc.BleakError: Service Discovery has not been performed yet
And I get the same error with other recommended commands:
upyble get_service -r
Traceback (most recent call last):
File "/home/user/.local/bin/upyble", line 1067, in <module>
bdev.connect(log=False)
File "/home/user/.local/lib/python3.10/site-packages/upyble/upybledevice.py", line 381, in connect
self.get_services(log=show_servs)
File "/home/user/.local/lib/python3.10/site-packages/upyble/upybledevice.py", line 391, in get_services
for service in self.ble_client.services:
File "/home/user/.local/lib/python3.10/site-packages/bleak/__init__.py", line 613, in services
raise BleakError("Service Discovery has not been performed yet")
bleak.exc.BleakError: Service Discovery has not been performed yet
So basically it's seeming like it's unusable at the moment.
Also FWIW there's lots of deprecation warnings interfering with the UI right now:
upyble tscan
Scanning...
/home/user/.local/lib/python3.10/site-packages/upyble/upybledevice.py:24: FutureWarning: The discover function will removed in a future version, use BleakScanner.discover instead.
devices = await discover()
BLE device/s found: 16
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ NAME ┃ UUID ┃ RSSI (dBm) ┃ Services ┃
┣━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
/home/user/.local/bin/upyble:328: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
if hasattr(dev, 'metadata'):
/home/user/.local/bin/upyble:329: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
if isinstance(dev.metadata, dict):
/home/user/.local/bin/upyble:330: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
if 'uuids' in dev.metadata.keys():
/home/user/.local/bin/upyble:332: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead
services = [ble_services_dict[serv.upper()] for serv in dev.metadata['uuids']]
/home/user/.local/bin/upyble:337: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead
int(dev.rssi), ','.join(services)))
<cut successful scan results>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.