Giter Club home page Giter Club logo

upyble's People

Contributors

carglglz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

upyble's Issues

Cannot enter REPL + depreciation warnings

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.