After update to OSx10.10 Yosemite, the library stopped working with the following Error:
File "<string>", line 4, in <module>
File "/Library/Python/2.7/site-packages/lightblue/init.py", line 160, in <module>
from _lightblue import *
File "/Library/Python/2.7/site-packages/lightblue/_lightblue.py", line 401, in <module>
class _AsyncPair(Foundation.NSObject):
TypeError: Error when calling the metaclass bases
class _AsyncPair does not fully implement protocol IOBluetoothDevicePairDelegate: no implementation for deviceSimplePairingComplete:status:
And i found the following solution:
At the line 444 of the _lightblue.py add the following lines:
# - (void) deviceSimplePairingComplete:(id)sender # status:(BluetoothHCIEventStatus)status; def deviceSimplePairingComplete_status_(self, sender, status): print "deviceSimplePairingComplete_status_: %lu" % status deviceSimplePairingComplete_status_ = objc.selector( deviceSimplePairingComplete_status_, signature="@v:@I")
Be careful with the indentation and remember to recompile the .py file before use.
Regards,
Ricardo