I have the following udev rule installed in /etc/udev/rules.d/99-libphidget22.rules:
Code: Select all
#All current and future Phidgets - Vendor = 0x06c2, Product = 0x0030 - 0x00a
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="06c2", ATTRS{idProduct}=="00[3-a][0-f]", MODE="666"
This comes from the documentation at
https://www.phidgets.com/docs/OS_-_Linux
Running this bit of code
Code: Select all
using Phidget22;
Console.WriteLine("Hello, World!");
DigitalOutput digitalOutput0 = new DigitalOutput();
digitalOutput0.IsHubPortDevice = true;
digitalOutput0.HubPort = 4;
digitalOutput0.Open(1000);
Console.WriteLine("Connected!");
produces this output, whether i run it as root nor not:
Code: Select all
Hello, World!
Unhandled exception. Phidget22.PhidgetException: PhidgetException 0x03 (Timed Out)
No matching devices were found to open. Make sure your device is attached, and that your addressing parameters are specified correctly. If your Phidget has a plug or terminal block for external power, ensure it is plugged in and powered.
at Phidget22.Phidget.Open(Int32 timeout)
at Program.<Main>$(String[] args) in /home/esbeeen/Documents/phidgetstest/Program.cs:line 11
Aborted (core dumped)
If I unplug the phidget from USB, i get
Code: Select all
Hello, World!
Unhandled exception. Phidget22.PhidgetException: PhidgetException 0x03 (Timed Out)
No Phidgets were detected at all. Make sure your device is attached.
at Phidget22.Phidget.Open(Int32 timeout)
at Program.<Main>$(String[] args) in /home/esbeeen/Documents/phidgetstest/Program.cs:line 11
Aborted (core dumped)
libphidget22 is installed via packagemanager (dnf)