Raspberry 3 Buster can't find 0/16/16

Supporting 2.6 and up
Post Reply
khun
Phidgetly
Posts: 30
Joined: Tue Oct 27, 2020 8:44 am
Contact:

Raspberry 3 Buster can't find 0/16/16

Post by khun »

Hi!

I followed the instructions in: https://www.phidgets.com/?view=articles ... ialStartPi

on a totally new installation of Buster on a Raspberry Pi 3 model B v1.2

and have an external power supply attached to a hub between the Pi and the Phidget. I can do lsusb and get:
Bus 001 Device 009: ID 06c2:0044 Phidgets Inc. (formerly GLAB) PhidgetInterface Kit 0-16-16
Bus 001 Device 008: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

but when I go to Thonny python and run:

from Phidget22.Phidget import *
from Phidget22.Devices.DigitalOutput import *
import time

def main():
testOut = DigitalOutput()
testOut.setHubPort(1)
testOut.openWaitForAttachment(5000)

testOut.setDutyCycle(1)
try:
input("Press <Enter> to stop!\n")
except (Exception, KeyboardInterrupt):
pass
testOut.close()

main()

I just get a timeout in the openWaitForAttachment saying no phidget was found! I tried adding the serial number before the attach, changing hub port, but still no luck.

I have unplugged from the Raspberry and plugged into the pc and the Phidget control board there works fine, so the Phidget in itself is OK.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Raspberry 3 Buster can't find 0/16/16

Post by Patrick »

try running as root or installing the udev rules

-Patrick
khun
Phidgetly
Posts: 30
Joined: Tue Oct 27, 2020 8:44 am
Contact:

Re: Raspberry 3 Buster can't find 0/16/16

Post by khun »

Hi!

I'm not quite sure how to run a python script as root in Thonny?

The udev rules are installed, meaning there is a file:

/etc/udev/rules.d/99-phidget22.rules

with (among others) the following line:

SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="06c2", ATTRS{idProduct}=="00[3-a][0-f]", MODE="666"
gregwa
Fresh meat
Posts: 1
Joined: Fri Nov 13, 2020 6:21 pm
Contact:

Re: Raspberry 3 Buster can't find 0/16/16

Post by gregwa »

Step 4 of the Configure Device sections says that you need to reboot the Pi.

Since you have added the UDEV rules, that should take care of the issue.
khun
Phidgetly
Posts: 30
Joined: Tue Oct 27, 2020 8:44 am
Contact:

Re: Raspberry 3 Buster can't find 0/16/16

Post by khun »

Would have been nice, but I had rebooted lot's of times before I asked here, so that's not the problem...
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Raspberry 3 Buster can't find 0/16/16

Post by Patrick »

You should enable logging - this will likely point to the issue.

-Patrick
khun
Phidgetly
Posts: 30
Joined: Tue Oct 27, 2020 8:44 am
Contact:

Re: Raspberry 3 Buster can't find 0/16/16

Post by khun »

Hi again!

Thank you so much! I wasn't aware of the logging possibility. This (shown below) showed me that the Phidget _was_ actually found, but couldn't attach, so the attach timed out.

So some googling later I realized that the old 0/16/16 Phidget shouldn't set any hub port. I removed that code and voila!

Nice thing is that now I can affirm my suspicion that you do _not_ need an external power source to run this Phidget from a Raspberry Pi Model B version 1.2. I can plug it right into the usb on the Raspberry.

Let the fun begin!

------

2020-11-17T14:45:50 <Info> phidget22usb[PhidgetUSBScanDevices()] : Initializing libusb
2020-11-17T14:45:50 <Info> phidget22usb[PhidgetUSBScanDevices()] : New Phidget found in PhidgetUSBBuildList: 1/5
2020-11-17T14:45:50 <Info> phidget22[deviceAttach()] : 1012 (PhidgetInterfaceKit 0/16/16) v605 S/N:346483
2020-11-17T14:45:55 <Info> phidget22[deviceDetach()] : 1012 (PhidgetInterfaceKit 0/16/16) v605 S/N:346483
2020-11-17T14:45:55 <Info> phidget22usb[PhidgetUSBUninit()] : Deinitializing libusb
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests