todbot/blink1 — pull request #145 by dogshoes (2014-07-25 07:06:29+00:00)
Title: Patching hiddata.c to claim the usb interface before sending control mes...

Hello,

Executing the golang example under linux resulted in the following errors:

Error sending message: Input/output error
2014/07/25 01:05:40 error writing data: Communication error with device

And these entries in /var/log/messages:

Jul 25 01:05:40 localhost kernel: [ 2220.123509] usb 2-2.1: usbfs: process 5064 (goBlink) did not claim interface 0 before use
Jul 25 01:05:40 localhost kernel: usb 2-2.1: usbfs: process 5064 (goBlink) did not claim interface 0 before use

It seems like Linux in particular needs first to detach the kernel driver from the interface before claiming it.

The example seems to work great after these changes. I don't have access to an OS X machine to verify that things still work under that environment.