Page 1 of 1

PhidgetSBC with docker

Posted: Tue Jul 09, 2024 10:59 am
by ouzarf
Hello,
I'm trying to use Docker to control my phidgets on the PhidgetSBC, after installing the phidget drivers and python library on the docker container and trying to read from a voltage Input, I'm getting this message:
"No Phidgets were detected at all. Make sure your device is attached."
When I run the python script without docker it works fine, I am attaching the /dev folder to the container and using the --privileged mode to access devices on the host but it didn't change much, what do you think I am missing?

Thanks!

Re: PhidgetSBC with docker

Posted: Wed Jul 10, 2024 7:58 am
by ouzarf
Update:

I ran it on debug mode and this the log:


****************************** Logging Enabled ******************************
* Phidget22 - Version 1.19 - Built Jul 10 2024 02:52:24 *
* Release 1.19.20240411 - Linux (32-bit) * *******************************************************************************
2024-07-10T13:50:13.945 <Info> phidget22usb[PhidgetUSBScanDevices()] : Initializing libusb

Increasing the timeout to 30000 didn't change anything,
wdyt?

Re: PhidgetSBC with docker

Posted: Thu Jul 11, 2024 12:18 pm
by Patrick
You will have to attach the Phidget USB device to the docker container somehow, if that is possible, or alternatively you could run the Phidget network server and connect to the Phidget via the network.

-Patrick

Re: PhidgetSBC with docker

Posted: Mon Oct 14, 2024 10:44 am
by maxdvdt
If you move to a networked scenario:

Over the network, "device discovery" is based on mDNS which is the local subnet only.

If you need to access network devices outside your subnet (and they are reachable) you need to access them explicitly using IP addresses, you can't do a discovery

For example I was VPN'ing into my environment and I could ping my phidget by IP, but because my VPN server gave me an IP in a different range to the phidget, I could not discover it, however with its IP I could control it directly.