Page 2 of 3
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Thu Nov 12, 2020 11:52 am
by khun
Hi, Mastiff!
Still going strong, I see? We have discussed Girder previously, I think, you are Norwegian too, right?
I have the exact same problem and made a thread on this yesterday! So you might want to follow "Raspberry 3 Buster can't find 0/16/16". Strange thing is I got an email today saying somehow has posted a reply, but I can't see any...
I also have a powered USB hub, the phidget works fine when connected to a laptop, but the Raspberry can't connect.
Best regards,
Knut
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Tue Nov 17, 2020 6:07 am
by Mastiff
Hi, Knut! Yep, Mandal calling. I see in my archive that we were both using this 0/16/16 board with Girder in 2008!
And I'll follow it. I have almost given up getting this to work, but if you can manage, then I may be able to use your method, so thanks for the heads up!
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Tue Nov 17, 2020 8:07 am
by khun
Hi!
I finally got my Raspberry Pi model B v1.2 working with the old 0/16/16 Phidget board. The problem was the "addressing" (see:
https://www.phidgets.com/docs/Addressing_Phidgets) of the board in my python code. I had a call: testOut.setHubPort(1) (copied from some example). This seems to be valid only for the new VINT type boards.
As soon as I removed that, the Pi found the Phidget nicely, also without external power supply.
I couldn't quite decipher what happens in your code, but I'd bet the problem is something similar.
Good luck!
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Tue Nov 17, 2020 10:36 am
by Patrick
Hi,
I actually recently fixed this issue for old 1012s on Linux. Releasing new Phidget22 now.
-Patrick
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Thu Nov 19, 2020 5:11 am
by Mastiff
Great, I'll try that in the weekend and see if it helps my issue too! Which is probably the same thing.
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Tue Nov 24, 2020 8:25 am
by Mastiff
Well, it may help, but I have done something wrong somewhere. Because I get
libphidget22extra.so.0: cannot open shared object file: No such file or directory
Here are the commands I used:
Code: Select all
cd libphidget22-1.6.20201117
./configure && make && sudo make install
cd /home/pi/Phidget-biblioteker/libphidget22extra-1.6.20201117
./configure && make && sudo make install
cd /home/pi/Phidget-biblioteker/phidget22networkserver-1.6.20201117
./configure && make && sudo make install
I'm not sure if it worked for the extra lib because I got this whe I did make:
Code: Select all
make
make: Nothing to be done for 'all'.
The problem seems to be the file ld.so.conf. I tried to add to path:
Code: Select all
sudo echo /usr/local/lib >> /etc/ld.so.conf && sudo ldconfig
bash: /etc/ld.so.conf: No access
Help would be appreciated, I'm totally confused...
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Wed Nov 25, 2020 6:41 am
by Mastiff
I went back to my previous backup to see what I had done differently, and that was a lot...
So now I used this:
Code: Select all
wget -qO- http://www.phidgets.com/gpgkey/pubring.gpg | sudo apt-key add - && sudo bash -c "echo 'deb http://www.phidgets.com/debian stretch main' > /etc/apt/sources.list.d/phidgets.list"
sudo apt-get update
sudo apt-get install libphidget22
npm install node-red-contrib-phidget22
sudo apt-get install phidget22networkserver -y
sudo apt-get install phidget22admin -y
sudo mousepad /lib/systemd/system/phidgetsserver.service
sudo chmod 644 /lib/systemd/system/phidgetsserver.service
sudo systemctl enable /lib/systemd/system/phidgetsserver.service
It got me further, but not all the way. Is it possible that the respositorys aren't updatede and I need to do something manually?
Edit: It's alive! (Picture me as Gene Wilder's "Fronkensteen" shouting...) I have the Hello world example working, it says "Hello to Device PhidgetInterfaceKit 0/16/16, Serial Number: 15593" 32 times, which is one per input and one per output!
So now I have hope again. If I could only get the server working, so I can use it by Node-RED I would be a happy camper!
I get this string on restart of Node-RED (after a reboot and an attempt to open port 2, which gave me "Unsupported message topic")
Code: Select all
Attempting to Connect to Server (127.0.0.1:5661)
Attempting to Open DigitalOutput (SN:15593, Ch:2)
Connect Success (127.0.0.1:5661)
DigitalOutput Opened (SN:15593, Ch:2)
setLEDForwardVoltage (in onAttach) not supported
setLEDCurrentLimit (in onAttach) not supported
Open failed:PhidgetError: Open timed out
This is when using the Node-RED node, and injecting into a Digital Output node, with the values:
LED Forward Voltage: volts_1_7
LED Current Limit: 0.02
Channel: 2 (I assume this is the port to open, but I'm not sure)
Serial #: 15593
Using a VINT Port in DigitalOutput mode? Tried both on and off
Also, I can't get to phidget22admin on the Pi. If I use "sudo phidget22admin -s" it says "bash: could not find command phidget22admin" (well, that's translated from Norweigan, so it may not be word for word what it would say in English). Is there something I have forgotten to install? I know the server runs, since I can connect to it.
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Wed Nov 25, 2020 12:32 pm
by Patrick
Hi,
Maybe you need to run /usr/local/bin/phidget22admin if /usr/local/bin isn't on your default path? Or, just run it directly from the source folder where it's built.
I'm not familiar with Node-RED - where is this module published? Can you see any errors in the network server logfile? Make sure that you are using the newest version of the Phidget Node.js library.
-Patrick
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Wed Nov 25, 2020 2:06 pm
by Mastiff
Thanks! I didn't build, as I show above I used the apt-get-install, and it isn't under /usr/local/bin. Which package should the phidget22admin be under?
As for the log there's nothing there. Only "Logging enabled". The node for Node-RED is on the regular Node-RED collection, and it's made by the Phidgets company, @mparadis announced it in January:
viewtopic.php?f=56&t=8499&start=10
Re: Trying to get 0/16/16 board up and running on Pi
Posted: Wed Nov 25, 2020 3:58 pm
by Patrick
The network server log is here: /var/log/phidget22networkserver.log
phidget22admin from a package install should be in /usb/bin - did it install without errors?
-Patrick