Comments (6)
BTW Mac has same problem but it hasn't udev rules
from gousb.
Please send the output with ctx.Debug(4) added before a call to OpenDevices. What platform are you running on?
from gousb.
development environment is Ubuntu 64. Please find the output below
--------------------------------------------------------------------------------
[ 0.732632] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.732665] [0000199a] libusb: debug [handle_events] poll fds modified, reallocating
[ 0.732691] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[ 0.733536] [000019a0] libusb: debug [linux_udev_event_thread_main] udev event thread entering.
[ 3.806486] [0000199a] libusb: debug [handle_events] poll() returned 0
[ 4.822469] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 4.822494] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[ 4.822474] [00001993] libusb: debug [libusb_get_device_list]
[ 4.822594] [00001993] libusb: debug [libusb_get_device_descriptor]
[ 4.822637] [00001993] libusb: debug [libusb_get_config_descriptor] index 0
[ 5.399340] [0000199a] libusb: debug [handle_events] poll() returned 0
[ 5.916213] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 5.916229] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[ 7.147556] [0000199a] libusb: debug [handle_events] poll() returned 0
[ 7.147578] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 7.147582] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[ 7.147745] [00001993] libusb: debug [libusb_open] open 1.5
[ 7.147822] [00001993] libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/005: Permission denied
[ 7.147827] [00001993] libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
[ 7.147829] [00001993] libusb: debug [libusb_open] open 1.5 returns -3
[ 9.406398] [0000199a] libusb: debug [handle_events] poll() returned 0
[ 9.406423] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 9.406426] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[ 9.409305] [00001993] libusb: debug [libusb_get_device_descriptor]
[ 9.409330] [00001993] libusb: debug [libusb_get_config_descriptor] index 0
[10.896267] [00001993] libusb: debug [libusb_get_device_descriptor]
[10.896296] [00001993] libusb: debug [libusb_get_config_descriptor] index 0
[10.898191] [0000199a] libusb: debug [handle_events] poll() returned 0
[10.898284] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[10.898293] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[11.809498] [0000199a] libusb: debug [handle_events] poll() returned 0
[11.809520] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[11.809525] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[14.275903] [0000199a] libusb: debug [handle_events] poll() returned 0
[14.275981] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[14.275985] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[16.427548] [0000199a] libusb: debug [handle_events] poll() returned 0
[16.427600] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[16.427606] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
[17.309986] [0000199a] libusb: debug [handle_events] poll() returned 0
[17.310024] [0000199a] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[17.310028] [0000199a] libusb: debug [handle_events] poll() 2 fds with timeout in 100ms
2017/10/01 13:08:02 list: libusb: bad access [code -3]```
from gousb.
This is the relevant part:
[ 7.147822] [00001993] libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/005: Permission denied
[ 7.147827] [00001993] libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
[ 7.147829] [00001993] libusb: debug [libusb_open] open 1.5 returns -3
The user you're running as does not have permissions to access that USB device. You'll need to update the udev rules or change device permissions in some other way.
from gousb.
Thanks for your prompt response issue fixed!
Kindly give me example / source code, how to write & read data on USB interface.
In this regards, waiting for your response.
Best Regards,
from gousb.
See https://godoc.org/github.com/google/gousb#pkg-examples and https://github.com/google/gousb/tree/master/rawread for examples.
from gousb.
Related Issues (20)
- Clear installation of Gosub on the Windows 10 - using msys64 HOT 3
- Latest package not picked up by go get HOT 9
- I can't open hp printer device with gousb HOT 7
- why connect printer return code -5? HOT 1
- Linux: How to get block devices list provided by usb stick? HOT 1
- incorrect device class HOT 2
- WinUSB drivers HOT 3
- libusb: bad access [code -3] HOT 8
- Windows: go build github.com/google/gousb: C:\Program Files\Go\pkg\tool\windows_amd64\cgo.exe: exit status 2 HOT 1
- Can't detach kernel driver. Invalid param [code -2] for iOS 16 devices HOT 5
- How to use in a Docker container without --privileged HOT 1
- CDC device HOT 5
- A lot of interrupted errors on MacOSX: handle_events: error: libusb: interrupted [code -10] HOT 8
- Failed to claim interface 0 HOT 1
- Errors on install; macos HOT 3
- Error when WriteContext is called HOT 10
- Device detach: libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access HOT 3
- Memory Leak in CGO part HOT 1
- Memory Leak HOT 4
- Android Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gousb.