-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: Unable to write to blink(1) #9
Comments
Are you using |
Very fast reply. Thank you. |
Hmm, well I tried the simple example on the README on my Ubuntu 22 x86 box and while it doesn't panic, it also doesn't seem to actually do anything. This library does seem to be using the much older libusb-0.1 API instead of the current libusb-1.0 API. Also in general on Linux, it's better to use the hidraw API instead of libusb. It looks like there is a (Go wrapper on hidapi](https://pkg.go.dev/github.com/karalabe/hid), which would be the preferred way of interfacing with blink(1), or any HID device. As a work-around, I recommend creating a function that abstracts away your blink(1) calls and for now uses the package main
import "fmt"
import "os/exec"
func main() {
stdout,err := exec.Command("blink1-tool", "--rgb", "FF00FF").Output()
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Print(string(stdout))
} |
Thank you. Compiled the program. Ran it. blink turns purple. |
This is how I do it today. I wanted to get rid of using ugly exec calls. |
On Ubuntu Ubuntu 22.04.1 LTS (x86_64) I get the err "panic: Unable to write to blink(1)".
Building the tool worked fine.
Blink works well with blink1-tool
Any idea were I could investigate ?
The text was updated successfully, but these errors were encountered: