Share

LightBlue

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Sometimes strange error sending socket data

You are viewing a single message from this topic. View all messages.

  1. 2009-04-25 11:31:55 UTC
    Hey,

    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>
    w.connect()
    File "wiipy_backend.py", line 254, in connect
    self.setled(self.number)
    File "wiipy_backend.py", line 432, in setled
    self._led_command()
    File "wiipy_backend.py", line 571, in _led_command
    self._send_command(CMD_SET_REPORT,RID_LEDS,[self.ledmask])
    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:
    http://klasseonline.dyndns.org/hg/?raw-file/ee1f06740ab8/wiipy/wiipy_backend.py

    Use it with:
    ./wiipy_backend.py -a bt-address-of-wiimote

    Thanks
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.