Static IP on a Raspberry Pi running Jessie

Raspberry Pi

I know this is out there already in the Googlesphere, this post is more for me in the future than it is for you. I have a few Raspberry Pies and I like to run static IPs. It just makes things easier and I like having my network “all fancy”.

I went to setup a static IP the other day and it wasn’t working. I rebooted a few times until I figured out something was up. In my Googling I found out that the standard linux way of assigning a static IP address won’t work with the new version of Jessie for a Raspberry Pi. They made some updates and the old configuration now gets ignored. So editing the interfaces at  /etc/network/interfaces is a no go. I mean you can, but it’s pointless. Not to worry the new way is just as easy as before it is just located in a different file now. Now you need to edit  /etc/dhcpcd.conf, and the way you set the address is slightly different.

The old way of doing things:

And the new way of doing things:

It has become a little easier if you ask me, you just need to know where the new file to edit is.

All thanks to this page:
https://www.jeffgeerling.com/blog/2016/setting-static-ip-address-raspbian-jessie-lite-on-raspberry-pi

RPI Jessie and Ping

I was having some issues the other day with SD Card corruption, just after a few hours use and a few reboots the card was done. So I opened ApplePi-Baker and got ready to re-flash the card. Then I thought it had been a while so I went to see if there was a new distro, I don’t really keep up. In fact yes there was, Jessie was now available. Sweet.

So far I have not really noticed any issues (other than this one) with Jessie. It even has Node-RED out of the box. But I couldn’t figure out why my presence detection flow wasn’t working. It was working just fine before I switched from Wheezy to Jessie and yes I did install the Ping node required. I could ping my phone so what was up? I decided to try and ping my phone from the RPi. AHA! That was the problem.

Trying to run a ping resulted in ping: icmp open socket: Operation not permitted

Say wuh? Some quick Googling and I found this thread at the Ubuntu forums.

Run command ls -l `which ping`. If it does not look like this -rwsr-xr-x 1 root root 30856 2007-07-06 02:40 /bin/ping then that is why. The important part is the “s”.

-rwsr-xr-x 1 root root 30856 2007-07-06 02:40 /bin/ping

If you don’t have an “s” run this command to fix it: sudo chmod u+s `which ping`. You should be able to ping away to your hearts content now.