Skip to main content


My Year in Books (2022)

Recent posts

AQI Monitor with the Raspberry Pi (2022 Edition)

 There are lots of projects on the web about Air Quality Index (AQI) monitoring with a Raspberry Pi. I recently went through the exercise of setting this up again after a few years and wanted to capture the 2022 version of the implementation.  The first step is of course choosing the PM2.5 sensor. For this project I used the cheapy and widely available SDS011 PM2.5 sensor . ( AliExpress , <$20; Datasheet ).  The sensor usually comes with a serial-to-USB converter. The ikalchev/py-sd011 package ( Github ) implements an easy-to-use Python 3 interface to query the SDS011 sensor.  I have written an AQI monitoring service in Python 3 that builds on top of the sensor interface to run continuous monitoring and reporting of AQI: arunkv/aqi_monitor ( Github ). The reporting is done via Adafruit's IO service . Here's a screenshot of my live AQI dashboard : Give the code a shot and let me know if you run into any issues. 

Getting Mailvelope on Chrome to use GnuPG on macOS

Mailvelope is a browser add-on that helps use GPG encryption and signing on webmail systems like Gmail. Here are the steps on macOS (tested with "Big Sur") to get Mailvelope to use the GnuPG backend. Install gpgme via Homebrew: brew install gpgme This will install gpgme-json in /usr/local/bin by default.  Create a file called gpgmejson.json in  "~/Library/Application Support/Google/Chrome/NativeMessagingHosts" with the following contents: {     "name": "gpgmejson",     "description": "Integration with GnuPG",     "path": "/usr/local/bin/gpgme-json",     "type": "stdio",     "allowed_origins": [         "chrome-extension://kajibbejlbohfaggdiogboambcijhkke/"     ] } Now in Mailvelope > Options > General , GnuPG will show up as the encryption backend.   

Getting an A+ Score on Qualys' SSL Server Test

On a lark, to get some experience with configuring HTTPS servers, I decided to host the Flightware frontends on my RaspberryPi on an HTTPS endpoint instead of the default HTTP. The broad steps to do this were: Getting a certificate for my site via LetsEncrypt's certbot Enabling the HTTPS endpoint on Lighttpd Testing the security of the setup via the Qualys SSL Server Test It took some trial and error to get an A+ rating for my server's SSL setup . The two key steps involved in improving the security of the setup were: Starting with a strong SSL configuration generated by Mozilla's SSL Configuration Generator . This means no SSL v2, SSL v3 or anything below TLS v1.2, and setting up HSTS Configuring DNS CAA records for the domain. Here's how my CAA record is configured on Google Domains: ➜ dig caa +short 0 issue "" 0 issue "" 0 iodef "" 0 issue "" I haven't

RTL-SDR, Raspberry Pi and Plane Spotting via ADS-B

Most modern aircraft carry an ADS-B ( Automatic Dependent Surveillance - Broadcast ) transmitter that puts out information about the aircraft's identification, geospatial location, speed, and heading. This information is received by ground stations and air traffic control and used as a replacement for radar-based tracking. ADS-B relies on line-of-sight communication via signals transmitted at 1090 Mhz and has a range of up to 250 nautical miles. Sites such as FlightAware , FlightRadar24 , Plane Finder , RadarBox24 , etc. collect ADS-B information using a vast array of ADS-B receivers, some of which are run by hobbyists, and present this information on maps with near-real-time updates. With the advent of cheap software-defined-radio (SDR) dongles, over the past few years, it has become extremely cheap and easy for amateurs to receive ADS-B signals, upload data to these sites and, in exchange, get access to premium features from these sites. This guide will walk you through a simila

How to look at modern art in America

Creator: Ad Reinhardt (1913-1967) Description: The 1946 version of the cartoon was originally printed in the newspaper P.M. and reprinted in ARTnews in 1961 with the new version. Source: Archives of American Art