As I continue to work on the Autonomous Satellite Antenna Tracking System (ASATS), to changes need to be made to setup the RPi so things happen automatically on power-up. This requires two changes to the RPi:
- Setup for Automatic Login on bootup
- Setup to Automatically Run desired tools
Automatically Login:
Edit the /etc/inittab to comment out the original gettty tty1 line, then add a new line immediately below it to automatically login the “pi” default user. (By the way, all the spacing is absolutely critical, and making any typo can result in a RPi that will no longer boot correctly — guess how I know!):
#1:2345:respawn:/sbin/getty --noclear 38400 tty1 1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
Automatically Run GPS Daemon:
Edit the /etc/rc.local files, and add the following immediately before the final line of the file (‘exit 0’):
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
This will ensure that the GPS Daemon is loaded at boot time (and configured to use the serial port on the RPi). After booting up, use the console cgps -s command to verify operation. Just keep in mind it can take several minutes for the GPS to obtain a fix on a cold powerup.
Remote SSH using a MacBook:
I noted that the SSH services are already installed in the RPi OS. Since I often use a MacBook for other tasks, it is very simple to use the built-in Terminal application in OS X. Just start Terminal, and type “SSH pi@192.168.1.20”. You will then be asked for a password. (Note because it is still set for DHCP, my RPi address will change periodically. Eventually I will set the Pi to use a static address that is reserved by my router).
Pingback: Setting the RPi System Clock via GPS | WB4SON