Thursday, January 19, 2017

Adventures in Raspberry Pi

I got my pi3 and the starter kit including a 16gb microSD card with NOOBS installed. I hooked it up to my home TV and let it install Raspbian. Then I set up the locale, enabled SSH, enabled VNC, and set a new password, all using sudo raspi-config. And then I shut it down with a sudo halt -h and walked it over to my office where the router lives.

Now it's wired to my home router (the cable didn't reach to the living room) and I can ssh into it from my laptop.  First I look at the router config to see which IP address it got assigned. In this case 192.168.1.25

I want to generate a key for ssh with this information:
 ssh-keygen -R 192.168.1.25

And now ssh in using ssh 192.168.1.25 -i pi

The authenticity of host '192.168.1.25 (192.168.1.25)' can't be established.
ECDSA key fingerprint is SHA256:3F54ujxVlzKIv6JwQ19/iD3gosKW93Fkdtk+8GiEqEw.

Are you sure you want to continue connecting (yes/no)? yes

And now ssh in using ssh 192.168.1.25 -i pi

And check that the pi can see the router using a ping command:
pi@raspberrypi:~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.403 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.353 ms

64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.366 ms


Update the software by running 
 sudo apt-get update
 sudo apt-get upgrade

 sudo reboot

Download a VNC and have it connect to the pi3 on the same address 192.168.1.25 

Let's try to get wireless working. Sadly I have a very old router that only supports WEP. So this part is not going to work. I'll disable WIFI for now by entering the following line into the /etc/rc.local file

ifconfig wlan0 down

I'm going to let that run overnight and see if anything happens with the ping ability to hit the router.  The problem I've been having is that after I install pi-hole, and some time passes, it seems to stop working.

I'll pick this up around noon tomorrow

---

Now I'll install pi-hole, going to the pi-hole site for easy instructions.