A collection of articles, mostly technical notes to self that might be useful others. The occasional bit of random commentary can also be found. You are welcome to share your thoughts in the comments section or directly by email.

  • LXD eMail, SMTP/IMAP/WebMail with OpenSMTPD, Dovecot, and Roundcube.
    Email is one of those conceptually simple things that are a lot more complex in practise – get it wrong and you miss incoming mail, or your mail gets lost or junked, or spammers exploit your server. This post is intended for technical people who want to run their own personal mail server, and describes the steps required to get a basic server setup that can be run safely and reliably. The approach I have taken is to run everything in a single LXD container, so that the entire system can be backed up and restored, or even recreated, with … Read more
  • VirtualBox VMDK for Raw Disk Access on a Windows Host
    Do not act on this article unless you are prepared to trash your disks, or if you are absolutely sure you understand what you are doing. Messing with raw disk sectors is risky! VirtualBox allows us to use a disk device directly, rather than using a file as a virtual volume. For me, since I have two SSDs in my laptop, it meant I could tinker with virtual machines without risking my Windows 7 partition, while also being able to boot the VMs on real hardware if I wanted. I never fully got my head around VMDK formats for RAW … Read more
  • The MOS 6502’s Parallel Binary/BCD Adder patent
    The patent for the 6502's ALU adder circuits, now expired, I found while writing a BCD adder in Verilog to go with a toy 6502ish CPU I am designing. So, I thought I'd re-implement it loosely based on the MOS solution. U.S. Patent Nov. 9, 1976 Sheet 1 of 3 3,991,307 The following schematic is unlikely to be needed, but might shed some light on the details. The scans have been pasted together, but don't quite align towards the bottom. Some squinting will be required to make sense of it. There are a few lines that look unconnected, which I … Read more
  • Arduino Yun Reading WH1080 using AUREL RX-4MM5
    Here's the sketch, it just reads and dumps to the console, the bridge can be used to send the data to the GNU/Linux side of the Yun. See the other post on doing this with a Raspberry Pi for some code to turn the data into something useful. I'm using the MCU of the Yun to do the RF stuff, and using the AUREL RX-4MM5 (a proper OOK receiver), it seems a lot more dependable than the Raspberry Pi + RFM01 (or RFM12B). No I2C pressure sensor readings are currently supported, should be easy to implement from existing Arduino examples … Read more
  • Raspberry Pi reading WH1081 weather sensors using an RFM01 and RFM12b
    This article describes using an RFM01 or RFM12b FSK RF transceiver with a Raspberry Pi to receive sensor data from a Fine Offset WH1080 or WH1081 (specifically a Maplin N96GY) weather station's RF transmitter. I originally used the RFM12b, simply because I had one to hand, but later found that the RFM01 appears to work far better – the noise immunity and the range of the RFM01 in OOK mode is noticeably better.  They're pin compatible, but the SPI registers differ between the modules, in terms of both register-address and function. This project is changing to be microcontroller based, and … Read more
  • PIC/MOSFET PWM Model Train Controller
    Having been unable to resist buying some old Hornby OO Gauge bits from the second hand cabinet in a model shop, justification came from the educational value it would offer my son if I could make a speed controller, perhaps adding a sensor or two – the essence of industrial control and feedback mechanisms. Being three and a half, he just wanted to make the train fly off the track, but at least he enjoyed it. This is a project to create a model train speed controller using the Pulse Width Modulation (PWM) output of a PIC16F690 microcontroller, to drive … Read more
  • Braun ThermoScan Fix – Low Battery Warning Switch Off
    We have a Braun Thermoscan infra-red (IR) thermometer that has been working perfectly for about five years. It started complaining about low batteries and shutting off, despite me replacing with new batteries that I checked had plenty of charge. When I opened it, I discovered that the batteries connect to the circuit board via simple metal clip contacts, and that the contacts had some corrosion on them, which was preventing power from getting to the board, hence why it was complaining of low batteries. So a very simple fix is to just clean the corrosion from the battery terminals inside … Read more
  • LXD now runs my WordPress
    Here are some notes on how I used LXD to run a container for WordPress. This is (a lot) more convenient than using Docker, which was my original approach to getting my WordPress site into a container. The main advantage for me is that a single container runs all the components together – no need for the 'wiring' between containers for each process. There is a bash script that automates this at https://github.com/Kevin-Sangeelee/lxd-wordpress, and is a more complete description of the process since it automatically configures SSL/TLS and Exim. Getting LXD onto Debian Stretch LXD is installed on Debian via … Read more
  • Atech Postal – notes on the Fast Server
    Atech's Postal is an SMTP server and web management interface that's geared towards transactional and bulk mailing (e.g. for application to user communication, and for marketing respectively). It's quite well documented, but more importantly it's open source (MIT license), and also seems well written – elegant, self-documenting code that's easy to follow, useful comments, well structured. A bit of a joy really. The Fast Server is a web server process that's separate from the management interface server, that's used to handle requests from click and open tracking links. However, the documentation on the Fast Server process, which is used for … Read more
  • Something’s wrong with the Internet
    Looking for a present for a four-turning-five year old who loves numbers, I figured I'd find some ideas around number cubes. Let's see what maths cube toys I can find… Where them cubes gone? None in the top hits were even cube related, even those with 'cube' in the title did not actually refer to anything remotely cuboid in shape, nor characteristics. The irony of these search results tempers my frustration with at least a little humour. The rest of the results were no better. I thought that Google images would give me a broader view that might help me … Read more