matthewelse / pygattosx

A pygattlib compatible wrapper around pyxpcconnection for BLE
Apache License 2.0
3 stars 0 forks source link

Example (and device.connect()) from bleep fail with TypeError #2

Open dsully opened 7 years ago

dsully commented 7 years ago
$ python ../examples/tree.py e3740ada-8230-489b-9d08-f12d22ee75d8
Attempting to connect to e3740ada-8230-489b-9d08-f12d22ee75d8
No scheduled event for kCBMsgId53
<class 'bleep.device.BLEDevice'>
bleep.requester.Requester
Traceback (most recent call last):
  File "../examples/tree.py", line 38, in <module>
    device.connect()
  File "/Users/dsully/dev/anova/bleep/bleep/device.py", line 172, in connect
    serv = GATTService(self, uuid, start, end)
  File "/Users/dsully/dev/anova/bleep/bleep/gatt/service.py", line 55, in __init__
    self._characteristics = self._discover_characteristics()
  File "/Users/dsully/dev/anova/bleep/bleep/gatt/service.py", line 78, in _discover_characteristics
    characteristic = GATTCharacteristic(self.device, handle, value_handle, end_handle, BLEUUID(uuid), properties)
  File "/Users/dsully/dev/anova/bleep/bleep/gatt/characteristic.py", line 147, in __init__
    self._descriptors = self._discover_descriptors()
  File "/Users/dsully/dev/anova/bleep/bleep/gatt/characteristic.py", line 162, in _discover_descriptors
    discovered = self.device.requester.discover_descriptors(self.value_handle + 1, self.end_handle)
TypeError: discover_descriptors() takes exactly 2 arguments (3 given)

It's unclear what type discover_descriptors():

def discover_descriptors(self, characteristic, **kwargs):

Is characteristic a GATTCharacteristic from bleep?

dsully commented 7 years ago

FYI, this is fixed if @matthewelse/bleep PR #6 is applied.

matthewelse commented 7 years ago

Hi Dan,

Thanks for the bug report and sorry for the delay responding - I'll have a look at merging this PR later this week (I'm on holiday currently). On Sun, 4 Dec 2016 at 21:33, Dan Sully notifications@github.com wrote:

FYI, this is fixed if @matthewelse/bleep PR #6 is applied.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matthewelse/pygattosx/issues/2#issuecomment-264728986, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuXkYnplmkK-Kf2XZrg2YYz_EZT3wl7ks5rEyOWgaJpZM4LDq9o .

dsully commented 7 years ago

Hey Matt - just a reminder on this.