Comments (7)
- Do you have the libusb driver installed (e.g.,
brew install libusb
on macOS)? - Did you run your Go program with root privileges (e.g.,
sudo myprog
)?
from usbtmc.
Libusb1.0-dev is installed (and the lib is on the path), I didn’t run with sudo but lsusb-vvv doesn’t complain about permissions / cant open devices.
‘Bare’ google/gousb context succeeded but usbtmc panics.
from usbtmc.
Have you tried running as sudo?
from usbtmc.
@brandondube — A few more questions:
- What test equipment are you trying to communicate with?
- What hardware and O/S are you using?
- What version of libusb are you using?
from usbtmc.
I just noticed that there had been a typo in the README if you were trying to use the google/gousb driver. The correct import statement should be:
import (
"github.com/gotmc/usbtmc"
_ "github.com/gotmc/usbtmc/driver/google"
)
Prior to running that, make sure you install the google/gousb driver using
$ go get -v github.com/google/gousb
from usbtmc.
The typo is probably the cause. I'm not back at work until the week after next, but to the 1,2,3 above:
-
test equipment - Thorlabs ITC4001
-
hardware / OS -- a supermicro server (or at least one in a supermicro case, not sure who the mfg is) in a standard ATX chassis, USB 2.0 connection over the Thorlabs provided cable. Ubuntu 16.04 LTS.
-
libusb-dev 1.0.12
I did not try sudo, my user account on the server has permissions to access USB devices, but I don't have (and definitely can't get) sudo -- our IT manages that.
If it is the typo, checking if the driver is nil before the first call that uses it and bailing then would be a sensible fix. Perhaps the valid/usable import statements (_ "..."
) could be included in a fmt.Errorf
.
In the interim, I have already made a very bare-bones impl of usbtmc for that thorlabs controller on top of google/gousb
with hardcoded vid/pid, endpoint nos, etc, and bulk transfer r/w only, though it is owned by my employer so I cannot share.
from usbtmc.
Closing due to inactivity. Let me know if this is still an issue, and I'll reopen.
from usbtmc.
Related Issues (8)
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 usbtmc.