Skip to content

Rallynet: Proof of Concept guidance

The first question was what to do with this thing (the Raspberry Pi or just pi). The NOOBS (new out of box software) install process worked well and provided a multi-boot pi with Raspbian, LibreELEC, and OSMC. Nice. Worked. Made a nice media center for the RV. Now what? How about a web services host so RV rally participants could upload their pictures to share? That led to Rallynet as a honeypot LAN installed on the Raspbian system. It worked, too. Now what?

That was a successful Proof of Concept so now the question became one of how to simplify and enhance. That meant being able to run both the media center and the Rallynet at the same time. It meant being able to dispense with the need for external USB storage. It meant looking into easier methods of file sharing.

First on the list was the host operating system. This came down to the recently announced Ubuntu Mate for the pi or Raspbian. There are a lot of other options and all are available to test and try out at the Raspberry Pi Download site. I decided to stick with Raspbian as it boots fast, has an established and vigorous community supporting it, puts a focus on development and maker needs, and is more directly customized for the hardware. The proprietary graphics in the pi are better accommodated with Raspbian although effective optimization to be able to show HD video requires re-building VLC or using an independent repository to get a special build of Kodi.

The latest release of Raspbian with all the latest bells and whistles was a nice clean install and it left near 30 GB of free space on its 32 GB micro SD card. Some of my favorite utilities installed with no hassle. To get the Rallynet services and GPS dongle tools, I installed from a terminal command prompt:

sudo apt install gpsd gpsd-clients python-gps hostapd dnsmasq nginx droopy photofloat gkrellm gkrellm-leds gkrellm-cpufreq gkrelltop lm-sensors gkrelltopd vim vim-gnome

This idea is to use GPS to set date and time on the pi. That project is quite a can of worms. It turns out that GPSd is an Eric Raymond (a long time well known FOSS advocate and activist) headed project with deep roots. It’s purpose is to take the device connection and message format issues and present them as a consistent and known API to facilitate GPS based utility development. GPSd can use shared memory to communicate with NTPd for a very accurate time service. Modern GPS devices intended for items such as drones provide barometric sensors and 9 axis motion sensing as is common in cell phones. That brings up the idea of using the device as the basis of a weather reporting service.

hostapd, dnsmasq, and nginx provide the base for Rallynet as a honeypot LAN and a post on the Rallynet CONF soup will be up shortly to show how these were set up.

droopy is a Python script providing html based service on port 8000 to upload files. That means rally participants who take pictures with their cell phones can use their phone browser to upload their pictures to the Rallynet. If it works, I won’t need to install Windows file sharing services.

photofloat is a photo gallery that uses the standard file system for its data store. It includes a Python script will scan the photo folders to create thumbnails and JSON format descriptions in a cache for a simple web page photo gallery service. Eric Raymond has a good rundown on JSON in his story about the development of GPSd. The format came out of the programming language that started as a simple scripting  capabilities in web browsers and is now a massive part of website presentation and web apps.

One project is to either use a Python system monitoring script that detects file system changes or a modification of droopy to call the pictures scan after an upload has occurred. That will keep the photo galleries up to date with submissions.

So now it’s on to phase II.