I'm currently implementing a gotmc/VISA package to send SCPI commands to my multimeter.
But every time I try to connect to the device, it gets me the same message:
libusb: device or resource busy [code -6].
Is there a way to handle this problem? From one source I read, I need to detach the kernel from the device, but can I do it from this package?
If there is another package that support SCPI commands over USB I would be grateful of hearing about it.
Here is my example code:
package main
import (
"fmt"
"io"
"log"
"time"
_ "github.com/gotmc/usbtmc/driver/google"
"github.com/gotmc/visa"
_ "github.com/gotmc/visa/driver/usbtmc"
)
const (
usbAddress string = "USB0::10893::4610::MY58130019::INSTR"
)
func main() {
fg, err := visa.NewResource(usbAddress)
usbtmc.De
if err != nil {
log.Fatal("Couldn't open the resource for the function generator")
}
}