Menu

#2 New IOBluetoothDevicePairDelegate Protocol on Yosemite OSX 10.10

Unstable (example)
closed
nobody
5
2014-09-22
2014-09-22
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.