Git Product home page Git Product logo

Comments (7)

matthewrankin avatar matthewrankin commented on June 7, 2024

@brandondube

  1. Do you have the libusb driver installed (e.g., brew install libusb on macOS)?
  2. Did you run your Go program with root privileges (e.g., sudo myprog)?

from usbtmc.

brandondube avatar brandondube commented on June 7, 2024

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.

matthewrankin avatar matthewrankin commented on June 7, 2024

Have you tried running as sudo?

from usbtmc.

matthewrankin avatar matthewrankin commented on June 7, 2024

@brandondube — A few more questions:

  1. What test equipment are you trying to communicate with?
  2. What hardware and O/S are you using?
  3. What version of libusb are you using?

from usbtmc.

matthewrankin avatar matthewrankin commented on June 7, 2024

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.

brandondube avatar brandondube commented on June 7, 2024

The typo is probably the cause. I'm not back at work until the week after next, but to the 1,2,3 above:

  1. test equipment - Thorlabs ITC4001

  2. 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.

  3. 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.

matthewrankin avatar matthewrankin commented on June 7, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.