Anytime you need a computer to do many things, there are challenges. The Pi Collector doesn’t have to scale to support a high connection volume or stream video, or handle high transaction rates. It just needs to work – and work reliably. It has to do its job unattended, headless and flawlessly. This mission has no time for failures or the unexpected. So our challenge is to make sure we use apps that are stable, and reliable.
We chose the Raspbian build because we had more experience with it (and Debian Linux), and good experiences at that. And while many will tell you that you should not rely on binary builds in the repository, we did not feel compelled to build our own binaries because of our previous experience with those modules. I started this project with the baseline configuration that is described in the First Steps post and the WAP post.
The Pi has ssh support in the native build and its mandatory for this project. That said, I don’t expect the operators using this network to touch ssh once the platform is operational on site.
Python is the core of the applications built for this project. Its used for the data collection application (UDP socket server) that receives, processes and writes data to the local database. Its also used for the periodic data file uploads, and for client simulation during development.
Applications We Used
The data entry application on the operator PC’s uses XML to package the data being sent to the collector (ADIF standard). We needed an XML parser and chose lxml because the method to pull the data from the packet for insertion into the database was very easy to implement with lxml. Less work is an awesome thing.
mysql-server & mysql-client
Having worked with mysql for many, many years, this was an obvious choice for me.
Every Pi I build has this installed with a WiFi adapter to allow me to connect via Wi-Fi to work on the Pi. This way I only need power, and an Internet connection to it as I work on the development.
The Pi’s will use DHCP services from a Wi-Fi enabled ethernet switch for the wired LAN connection. The DHCP server installed on the Pi collectors is strictly for the WiFi AP service.
This is used for serving up local web pages for tech support, the pi-web-agent application, and the reports needed.
php5, php5-mysql, libapache2-mod-php5
The reports we need to pull from mysql are easy to create with PHP.
Since the operators on the expedition are likely more adept at graphical interfaces, combined with the fact that the Pi’s are headless, it makes sense to leverage a Remote Desktop Connection to interact with the Pi – if necessary.
The pi-web-agent was installed for easy monitoring of the condition of the servers. Using a browser on the local system via X-Windows, or from a remote PC, many operating characteristics can be monitored.
Installing the Commercial Applications
Initial installation went like this
sudo apt-get install lxml
sudo apt-get install apache2 mysql-server mysql−client
sudo apt−get install php5 php5−mysql libapache2−mod−php5
sudo apt-get install isc−dhcp−server hostapd xrdp
Configuring the applications
I am working on this part so please be patient and stop back later…