I'm trying to write a python backend for the Wii Remote using lightblue on OS X. Sometimes I get a very strange error that I can't figure out:
Traceback (most recent call last):
File "wiipy_backend.py", line 634, in <module>
File "wiipy_backend.py", line 254, in connect
File "wiipy_backend.py", line 432, in setled
File "wiipy_backend.py", line 571, in _led_command
File "wiipy_backend.py", line 612, in _send_command
self.cx.send(chr(cmd) + chr(report) + "".join([chr(d) for d in data]))
File "/Library/Python/2.5/site-packages/lightblue/_bluetoothsockets.py", line 530, in send
raise _socket.error(result, "Error sending data")
Sometimes, everything works as exptected, but I couldn't even find out when this is the case.
Could someone point me into the right direction?
The complete Python-code can be found here:
Use it with:
./wiipy_backend.py -a bt-address-of-wiimote
I found the error: It was not in the code, but a bug in OS X. I installed OSCulator from osculator.net, that includes a patch for OSX to fix the problem!
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.