PhidgetSBC with docker

Supporting 2.6 and up
Post Reply
ouzarf
Fresh meat
Posts: 2
Joined: Tue Jul 09, 2024 10:57 am
Contact:

PhidgetSBC with docker

Post 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!
ouzarf
Fresh meat
Posts: 2
Joined: Tue Jul 09, 2024 10:57 am
Contact:

Re: PhidgetSBC with docker

Post 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?
User avatar
Patrick
Lead Developer
Posts: 631
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: PhidgetSBC with docker

Post 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
maxdvdt
Phidgetsian
Posts: 7
Joined: Mon Aug 28, 2023 10:03 am
Contact:

Re: PhidgetSBC with docker

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests