kiloleader
Posts: 10
Joined: Tue Oct 14, 2014 9:02 am

PIGPIO raspbian 31-01-2015

Wed Feb 11, 2015 11:40 am

Hi all,

Does anyone know if PIGPIO runs on the latest raspian. I am using a model B+ (not a 2) and have had pigpio running quite happily. I have now upgraded to the 31-01-2015 release of Raspian and I get the following error when trying to run my program:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio on localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment
variables PIGPIO_ADDR/PIGPIO_PORT?
E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the
pigpio.pi() function? E.g. pigpio.pi('soft', 8888))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Traceback (most recent call last):
File "/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/IR_bit_bash_v1.1.py", line 13, in <module>
from IR_hashread_V1 import gather # The IR_hashread.py script interfaces with the pigpiod deamon. The gather() function returns any received IR pulses. See IR_hashreah.py for more information
File "/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/IR_hashread_V1.py", line 46, in <module>
ir = ir_hasher.hasher(pi, 21, callback, 5) # Set the GPIO pin as an instance of the 'hasher' class. See the 'IR_hasher.py' script for the class details.
File "/home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/ir_hasher.py", line 31, in __init__
pi.set_mode(gpio, pigpio.INPUT) # Initialises a GPIO pin of the RPi as an input.
File "/usr/local/lib/python2.7/dist-packages/pigpio.py", line 945, in set_mode
return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode))
File "/usr/local/lib/python2.7/dist-packages/pigpio.py", line 753, in _pigpio_command
sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))
AttributeError: 'NoneType' object has no attribute 'send'


I have tried typing in the terminal:
export PIGPIO_ADDR=soft
export PIGPIO_PORT=8888
sudo pigpiod
to start the deamon before running my program but same result.

I have changed my program from:
pigpio.pi()
to:
pigpio.pi('soft', 8888)
with no avail.

Any thoughts?

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: PIGPIO raspbian 31-01-2015

Wed Feb 11, 2015 11:45 am

The 31-01-2015 firmware may be the one which had timing problems although I wasn't aware that confused pigpio.

I'd try a sudo rpi-update to get the most recent firmware.

kiloleader
Posts: 10
Joined: Tue Oct 14, 2014 9:02 am

Re: PIGPIO raspbian 31-01-2015

Wed Feb 11, 2015 11:55 am

Update:

I have tried:
pigs t
pigs pigpv
pigs hwver
in the terminal, all return socket connection failed.

Also, cat /dev/pigerr& returns:
[1] 18077

I then tried:
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod

sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod

after which typing:
./x_pigs
./x_pipe
both returned
bash: ./x_pigs (or pipe): no such file or directory.

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: PIGPIO raspbian 31-01-2015

Thu Feb 12, 2015 12:09 am

kiloleader wrote:Update:

I have tried:
pigs t
pigs pigpv
pigs hwver
in the terminal, all return socket connection failed.

Also, cat /dev/pigerr& returns:
[1] 18077

I then tried:
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod
sudo killall -USR2 pigpiod

sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod
sudo killall -USR1 pigpiod

after which typing:
./x_pigs
./x_pipe
both returned
bash: ./x_pigs (or pipe): no such file or directory.
I'm not sure what you are doing.

To use pigs and the Python module the daemon need to be running.

To start the daemon try these commands

sudo killall pigpiod # just in case it's already running, won't do any harm

sudo pigpiod

Then try

pigs pigpv
pigs hwver

Cole128
Posts: 1
Joined: Wed Apr 26, 2017 9:46 pm

Re: PIGPIO raspbian 31-01-2015

Wed Apr 26, 2017 9:50 pm

I am having the same error, I have posted a question on the stackexchange forum for rpi here:https://raspberrypi.stackexchange.com/q ... al-rpi3%20

Return to “Beginners”