Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install Problems
#1
I'm sure this can't be normal otherwise SIP would have died long ago. My son gave me a Raspberry Pi that is now about a year old. He never loaded an OS until a week ago when he gave it to me so it has a very recent release of Linux. His friend who has a similar RP running SIP sent me the install instructions. 

sudo apt-get install git

git clone https://github.com/Dan-in-CA/OSPi
cd OSPi
sudo python ospi.py


As I already had git I skipped the first line. When I tried running ospi.sy I got the following error message which I have since found a work around for. 



pi@raspberrypi:~/OSPi $ sudo python ospi.py
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at 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 "ospi.py", line 16, in <module>
    import gv
  File "/home/pi/OSPi/gv.py", line 48, in <module>
    from helpers import password_salt, password_hash, load_programs, station_names
  File "/home/pi/OSPi/helpers.py", line 26, in <module>
    from gpio_pins import GPIO, pin_rain_sense, pin_relay
  File "/home/pi/OSPi/gpio_pins.py", line 71, in <module>
    pi.set_mode(pin_rain_sense, pigpio.INPUT)
  File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1053, in set_mode
    return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode))
  File "/usr/lib/python2.7/dist-packages/pigpio.py", line 848, in _pigpio_command
    sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))
AttributeError: 'NoneType' object has no attribute 'send'
pi@raspberrypi:~/OSPi $

Now that that has a work around everything was looking up. Now when I try running ospi I get the following message. 

pi@raspberrypi:~/OSPi $ sudo pigpiod
pi@raspberrypi:~/OSPi $ pigs pigpv
50
pi@raspberrypi:~/OSPi $ pigs hwver
10620993
pi@raspberrypi:~/OSPi $ sudo python ospi.py
plugins loaded:
  mobile_app
  plugin_manager
  relay_board
  signaling_examples
  system_update
http://0.0.0.0:80/
 Starting timing loop

Thought I was in the money until I figured out http://0.0.0.0:80 wasn't going to get me anywhere. My friend told me I needed to set up a static IP address. Well according to the "Internet" there are about as many opinions on how to do that as there are so called "Linux experts". Something about the number of stars comes to mind. Sorry for the digression. 

It appears that in the before time (in Linux speak that was before the latest release) you made changes to the /etc/network/interfaces file, which I did. It was at that point something very special happened, I started getting not one but two IP addresses (told you it was special), the static address I configured and one from DHCP. Well I thought progress and maybe SIP would use the static IP, NO JOY.

One thing I've found about SCE's (so called experts) is they all seem a bit vague on specifics. They seem to assume they're talking to another one of there kind. I've now found many sites professing to know how to set up a static IP in the now time, in the now time you have to configure a static IP address in the /etc/dhcpcd.conf file. They might give some general info on what that might look like but so far none has made the magic work so here I am. HELP!    

Not sure what is going on with the fount size       
p.s.  Interesting at least to me, the before and now time was a construct I got from my son. They can both be almost infinite in size (big and small) just not at the same time. Scotty you can beam me up now Scotty...............SCOTTY?
Reply
#2
Setting a static IP address is usually done in your router's configuration.

Not sure why you are seeing the OSPi and the pigpio references. Looks like the setup instructions you used are very old.

Perhaps the documentation on the SIP wiki will help:
https://github.com/Dan-in-CA/SIP/wiki

Dan
Reply
#3
Thank you so much for the reply. The pigpio thing as I understand it which is not much is due to the latest OS release. I got the workaround here. https://www.raspberrypi.org/forums/viewt...jXE7pCMmzA. As you can see from the screen shot I still had to apply the "fix" even following your instructions. Am I missing something like having to set up WEB services before running SPI? I can set my router to always hand out the same IP address I just thought SIP needed to see a static IP set up in the OS. As you can see I'm still getting an IP address of 0.0.0.0:80 from SPI. I did see something new. After running SPI at the end you see a port number of 8080.

pi@raspberrypi:~ $ hostname -I
192.168.0.200 192.168.0.29
pi@raspberrypi:~ $ cd SIP
pi@raspberrypi:~/SIP $ sudo python sip.py
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at 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 "sip.py", line 16, in <module>
import gv
File "/home/pi/SIP/gv.py", line 48, in <module>
from helpers import password_salt, password_hash, load_programs, station_names
File "/home/pi/SIP/helpers.py", line 26, in <module>
from gpio_pins import GPIO, pin_rain_sense, pin_relay
File "/home/pi/SIP/gpio_pins.py", line 71, in <module>
pi.set_mode(pin_rain_sense, pigpio.INPUT)
File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1053, in set_mode
return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode))
File "/usr/lib/python2.7/dist-packages/pigpio.py", line 848, in _pigpio_command
sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))
AttributeError: 'NoneType' object has no attribute 'send'
pi@raspberrypi:~/SIP $ sudo pigpiod
pi@raspberrypi:~/SIP $ pigs pigpv
50
pi@raspberrypi:~/SIP $ pigs hwver
10620993
pi@raspberrypi:~/SIP $ sudo python sip.py
plugins loaded:
mobile_app
plugin_manager
relay_board
signaling_examples
system_update
http://0.0.0.0:80/
Starting timing loop

8080
Reply
#4
It's working had to enable GPIO access over the network. Thanks for the help.
Reply
#5
(2016 Jun 09, 11:10 PM)RWoerz Wrote: It's working had to enable GPIO access over the network. Thanks for the help.

Could you expand on this a little, please.  This is a recurring problem and I (for one) have no idea how to enable GPIO access over the network.
Help?

Thanks,

- K
Reply
#6
I want to start by saying I'm not a Linux expert but I'll share what I know. When my RP boots it boots into a gooey with a menu button in the upper left hand corner. When you right click on the Menu button you're presented with a list of categories, Programming, Office, Games etc. one of the chooses is Preferences. Right clicking on Preferences you're presented with a "Raspberry Pi Configuration" window with four taps. If you select the Interfaces tab there's a list of thing you can enable or disable i.e. Camera, SSH, etc. the bottom device is "Remote GPIO" which is what I enabled to make my system work. Hope that helps.


Attached Files Thumbnail(s)
   
Reply
#7
IMHO you should install a lite version of raspbian without graphical interface and work with console only. After you finish installing SIP you will work from a web page and rpi will be lighter in general. I did my install this way and everything worked well without issues.
Reply
#8
What little I knew of Unix left me 30 or more years ago. Definitely in my before time. Even though I spent the last 15 years of my career as a sys-admin linux was never part of it.
Reply
#9
From what you describe you have more contact with Linux than myself. Smile I don't know much, but google is my best friend in difficult times. I just suggested you this way for a lighter machine and because it takes 6-7 commands in console and system is up and running.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)