Open paulvanbladel opened 6 years ago
The above was a connection problem which I could solve on bluetooth level. Getting other error now
from morseapi import MorseRobot No handlers could be found for logger "robots.position.ros" bot = MorseRobot("D0:FA:D0:59:57:89") 2018-01-18 13:52:28,233 robots.robot: WARNING - No action packages specified when creating an instance of GenericRobot. Likely an error! bot.reset() WARNING:pygatt.device:No characteristic found matching af230003-879d-6186-1f49-deca0e85d9c1 Traceback (most recent call last): File "
", line 1, in File "morseapi/robot.py", line 117, in reset self.command("reset", bytearray([mode])) File "morseapi/robot.py", line 103, in command if self.connection: File "morseapi/robot.py", line 86, in connection self.sense.start() File "morseapi/sensors.py", line 34, in start self.subscribe() File "morseapi/sensors.py", line 51, in subscribe self.connection.subscribe(CHARACTERISTICS["dot_sensor"], self._dot_sensor_decode) File "/home/paul/.local/lib/python2.7/site-packages/pygatt/device.py", line 144, in subscribe self._notification_handles(uuid) File "/home/paul/.local/lib/python2.7/site-packages/pygatt/device.py", line 120, in _notification_handles value_handle = self.get_handle(uuid) File "/home/paul/.local/lib/python2.7/site-packages/pygatt/device.py", line 208, in get_handle raise exceptions.BLEError(message) pygatt.exceptions.BLEError: No characteristic found matching af230003-879d-6186-1f49-deca0e85d9c1
this did the trick :) https://github.com/peplin/pygatt/issues/161
I think best option is actually ditch pygatt dependency. Other options include: https://github.com/getsenic/gatt-python https://bitbucket.org/OscarAcena/pygattlib
adding pip install pygatt==3.1.1
to the readme will solve a lot of people's problems :)
@IlyaSukhanov thanks a lot for the library! my daughter was super impressed we can use python on the dash and my dog was extremely upset at it haha
@jackdoe Glad you find it useful. Was the problem that the later version of pygatt >4 does not work?
ah sorry i should've been more specific, with pygatt > 3.2 i couldnt connect at all after following https://github.com/peplin/pygatt/issues/161 and downgrading to 3.1.1 everything was fine
First of all, thanks a lot for sharing this library. Great work. When trying the clock.py, I'm getting following error. Any idea how to proceed?
Thanks in advance
I believe that the bluetooth connection is ok?
[bluetooth]# info D0:FA:D0:59:57:89 Device D0:FA:D0:59:57:89 Name: Dash Alias: Dash Appearance: 0x1234 Paired: yes Trusted: yes Blocked: no Connected: no LegacyPairing: no UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: Vendor specific (af237777-879d-6186-1f49-deca0e85d9c1) [bluetooth]# quit [DEL] Controller 28:C6:3F:B5:86:C2 nuc [default]