Aqualisa Quartz A2 Shower Leaks

I have an Aqualisa Quartz A2 Pumped electric shower. This is the model with the long grey case. There are four ‘O’ Rings that will perish over time, causing dripping leaks, in which case they will need to be replaced.

I used O-rings that were around 3mm thick, with an inside diameter of around 22mm. You probably have +/- 0.5mm leeway on thickness, and maybe 1-2mm on diameter. Use the old O-rings as a guide, but bear in mind they’ll have compressed and hardened or perished. The new O-rings should stretch a little when positioning them.

Make sure the mains electricity and the water supplies are isolated before beginning.

The first three are easy. The hot/cold inlets and the outlet each have a plastic finger-screw nut holding each short brass pipe (called a spigot) in place. All you need to do is unscrew these, remove the brass pipes, pull out the old O-ring, fit a new O-ring over the wide end of the pipe before repositioning, and then tightening the plastic nut again.

The fittings are designed to compress the O-rings into place as you tighten the holding nut. It’s worth cleaning the brass pipe with some wire wool or a scourer while it’s removed, since a smooth surface will give a better seal.

The fourth O-ring is inside the case, and sits between the pump assembly and the mixer-valve assembly (I’ve seen this referred to as the ‘cartridge’).

You need to remove three screws to get these assemblies apart. Two are on the clamp that holds the pump in place, the third is on the left-hand side of the mixer-valve assembly. The screws are marked with the yellow arrows on the image above. So loosen the screws on the pump clamp and lift the clamp out (with the screws still in, this helps avoid them dropping into the case.

Then loosen the screw at the far side of the mixer-valve assembly, and lift the pump motor. You’ll see the assemblies separate, it may take a little wiggling because the inlets/outlets need to also come loose.

You’ll see that there’s an O-ring that sits at the junction between these two assemblies. Remove the old O-ring, and clean the joints with a cloth and/or an old toothbrush. Fit the new O-ring to the pump-assembly and gently twist the pump-assembly back into the mixer-valve assembly.

It’s normal to have to push and twist the assemblies to get them back together, since the new O-ring has to squash in a little, but they should go together without too much force. There should be no more than around 0.5mm gap left between them when everything has been re-seated. If there’s a gap of a couple of millimetres or so, then the O-ring has not seated properly. Re-do by pulling them apart, repositioning the O-ring and trying again, though it’s possible that your chosen O-ring is too thick, so try a thinner one or a smaller one so that it stretches thinner.

When they are both snugly together and seated in the case, then re-attach the pump clamp and the screw on the mixer-valve assembly.

The pump clamp should fit snugly to the pump. Wiggle the motor to ensure it’s properly seated, and support the motor while re-screwing. This is because the joint between assemblies should be lined up properly.

I’m hoping to add photos to this, to show details for replacing the internal O-ring in particular.

A few notes

Before re-attaching the case lid, make sure all wires are out of the way. I accidentally squashed the black temperature sensor wires between the bottom and top cases. They seem to have survived okay, but it was careless of me. I should have checked properly before fixing the cover in place.

The motor brushes create a lot of carbon dust. It takes some scrubbing to get it off, so latex gloves will help protect your skin and keep some kitchen roll close to hand to wipe things down.

While the motor assembly is out, I used the opportunity to oil the spindles. I just used 3 in 1 bike oil, I don’t know how optimal this is, but I’ve seen a heating engineer use similar on a kerosene pump in my boiler, and it worked really well to reduce noise.

Android, Google, Bluetooth, Location, and Privacy

I recently bought a Lego Technic set for my son. It has motors controlled via Bluetooth Low Energy (BLE), using an Android app (Lego Technic Control+).

The Lego app informed me that it needs to have both Bluetooth and location services enabled in order to work. So, obviously Bluetooth needs to be enabled, but why Location Services?

At first I assumed that Lego were being sneaky with permission requirements, even though it seemed counter to their general company ethos. A little digging on the Internet revealed that Google started to make Location Services a pre-requisite for using BLE. It’s not just Lego’s app that required this. Any app that needs to scan for BLE devices has to require Location Services.

In order for me to use a childs toy, Google requires me to enable fine-grained location tracking, and to agree to share MAC addresses and other information that’s associated with my location.

There is no reasonable explanation for this, except that Google will use whatever lever they can in order to track as much information about you as they possibly can. If anyone can provide a less creepy explanation (that actually makes sense!), then please leave a comment.

Otherwise, it cements my opinion that Google has become a truly shitty company.

Why do I even care?

I’m not sure I can articulate this succinctly.

Tracking data is clearly very valuable to some people, because they go to great lengths to get it. These efforts get hidden behind the scenes, but you can see them if you know how to look. The goal is to build as detailed a picture as possible of us, by piecing together many thousands of bits of data. That’s immensely powerful data, and I’m wary of how it is, or could be, being used.

A mobile phone is a particularly personal device, pretty much nobody but me uses it, and it goes most places with me. As a matter of principle, I should be in control of that device. Yet, for example, if I deny Google permission to track my biometric data, my phone starts raising intrusive alerts when I send or receive SMS, or receive phone calls. It doesn’t need biometric data to send an SMS. Google just wants this data. This irks me quite a lot!

So the issue of Bluetooth requiring my location data to operate is another example of Google using their control of my phone to gain the data that they want. In this case, I have no real option but to comply, and that also irks me quite a lot!

In any other setting, this level of personal intrusion would never be tolerated. If someone was literally following you around with a notebook, recording every detail they observed, it would get very annoying very fast! Yet that is what’s happening, it’s just that you don’t easily see it.

My Testo 875-1i Battery (0515 1100) Fix

I have a Testo 875-1i Thermal Imaging camera that, as a daft expensive toy, had been sitting unused for a while. When I needed it, I noticed that the battery (marked 0515 1100) was no longer working at all. It would not power the camera, and the camera wouldn’t charge it.

The camera has had little use compared to the levels it was designed for, so the battery was not degraded due to discharge cycles. I suspected that the charge controller was refusing to charge it because the cell voltage had fallen too low.

The cells themselves were registering just over 1.55V each, so they were pretty much fully drained. The lower threshold for a deep-discharged cell is typically 1.5V, below which the cell should be discarded, so I figured if I could push a surface charge into the cells, then I could persuade the charging circuit to activate.

And it worked! So I don’t have to throw out a serviceable battery, or fork out £130 or so for a new one.

Warning: This article is not a recommendation that you should do this yourself. Lithium Ion batteries can be dangerous. They hold a lot of charge, and can deliver a lot of energy in a short amount of time. If you suspect the battery is actually faulty or has been depleted through use, then just replace it. Certainly do not try to revive a cell that has fallen below 1.5V, because conductive bridges may have formed internally. In my case, the cells were very likely still above the safe pre-charge level, and I took the precautions of checking for signs of overheating repeatedly during charging. If you are not confident you know what you are doing, play safe and buy a new battery.

Summary of what I did

In short, I removed the battery and opened the casing to reveal two cells with positive terminals at each end, and negative terminals in the centre (the batteries operate in parallel). The negative terminal can be reached easily on the underside of the charge controller PCB, which is accessible without removing anything, though it may need to be edged up a couple of millimetres to get a clean view.

I then took a 12V power supply that had stripped ends, and used my voltmeter to verify which wire was negative. I then held the negative wire to the negative terminal of the cells and repeatedly touched the positive wire to one of the positive terminals – just a fraction of a second each time, with half a second or so inbetween. Within a minute or two, the cells were reading 2.6V, so I reassembled the casing, powered up the camera, and then inserted the battery. The on-screen icon that had only been showing the ‘DC-Mains’ icon soon changed to a ‘battery’ icon, and within a few seconds it was showing the ‘charging bars’ animation.

It’s vitally important that the battery is inserted only when the camera is powered up! The battery only has a surface charge, not nearly enough to run the camera on its own.

So, with the camera powered up, the system reads an acceptable (but still too low) voltage from the cells, and starts to charge the battery as normal. I removed the battery after 15 seconds or so to check it wasn’t getting warm, and again after a minute, then after 5 minutes and so on. It remained cool, and charged fully (to 4.16V) within a few hours.

Some notes on the battery

The label on the battery states it’s 3.7V 5000mAh, and since it contains two cells, each cell must be 2500mAh.

To open the battery case, I first popped off the snap-on foot by holding in my hands and pushing up at either corner of the flat edge with my thumbs. From there, I could slide a watch-opener knife into the seal that runs all around the casing – it seems to be glued lightly, so the blade only needs to be a couple of millimetres into the seal.

The casing shell could then be prised gently apart to reveal the two cells and the charge-controller PCB. The battery contacts come through the PCB to the underside, which provides a useful contact point for the negative terminals.

On the charge controller’s PCB, I could see that the two outer pins are marked positive and negative, and the inner two pins are marked I2C, we can see below SDA and SCL. It might be fun to probe the address space and see what comes back.

A note on safety

The cells in my battery back have no markings, so it wasn’t possible to find a datasheet for them. This means I was taking a risk recharging them, because I don’t know what the safe thresholds are for this particular cell’s chemistry. The chemistry in Lithium Ion cells varies a lot, and therefore the data parameters vary too.

My only real concern was if short-circuits had developed inside the cells, but this would be easy to detect in the form of heat generated when a voltage was applied. Also, the fact that the cells happened to be just above the ‘typical’ lower discharge threshold of 1.5V, I guessed that this was not a coincidence and that discharge was purposefully stopped at this level by the charge controller (which would itself otherwise consume power).

So, when giving the cells the initial boost with 12V, I would check them periodically to make sure they were not getting at all warm (this would suggest there was a short circuit inside the cells). At no point did the cells feel warm. I also checked the voltage of the cells periodically to make sure it was rising as expected.

I read that cells require a pre-charge if they’re between 1.5V and 2.5V, whereby the current flowing to the battery should be limited (i.e. it should not be fast-charged). Pre-charging a cell should typically not exceed 0.5C, and for 2 cells each 2500mAh, I figured that the power-supply, which provides a maximum of 4A at 5V, would struggle to get much above that anyway when the camera is running.

In any case, the current is limited electronically by the charge controller, and the camera is not particularly fast to charge. I doubt it charges above 0.5C in normal operation. Therefore, as long as I periodically remove the battery pack to check it’s not getting warm during the first charge, then the pre-charge stage should proceed safely.

As it turned out, the battery pack was cool to the touch at all times. I have no concerns at all; the battery operates as it did when the camera was new.

In Pictures

The dead battery is ejected.

The foot on the battery pack has to be removed.

It’s off!

The case is opened by sliding a small blade carefully under the lip that joins the two halves. The first long side shown below wasn’t actually sealed on my battery pack.

The opposite long edge, shown below, had been glued but only with a small amount of soft adhesive. The blade easily slid under the lip on this edge, as well as on the short edges which were also glued.

The pads marked below are visibly connected directly to the cells we want to charge, so these are the pads I used to push 12V into the cells.

The PCB with cells can be gently prised up and removed completely if necessary to get adequate access to the metal pads.

To apply 12V, I connected the PSU negative wire to the negative terminal shown above, and then tapped the positive wire to one of the positive terminals shown. It doesn’t make any difference which positive terminal is used. I periodically checked the voltage until it got above 2.5V.

BBC Micro SRAM Upgrade

I was recently gifted an old 8-bit computer, an unloved BBC Micro that had gone up in a puff of smoke. As it turns out, the fault was a common problem with the X capacitors in the PSU, and easily fixed. Four keys also needed to have their switches dismantled and repaired, but after a good clean it was literally looking and working as new.

This was a well designed and well built computer, in fact I’m really quite blown away by just how impressive this computer is. The modern enhancements that people have come up with is, I think, testimony to just how well thought-out the design was. I suppose that, given many of the designers were also the people behind the ARM CPU, I shouldn’t be so surprised.

The hardware I was gifted included a dual 5.25″ floppy disk unit. This thing is heavy! A metal case, two PSUs, two drives, and all the magnetics that they required back in time. Surprisingly, all the disks in the two boxes I was given still work. My first instinct was to back them up somehow, so I bought a Turbo MMFS card, which drives a MicroSD card by bit-banging SPI on the BBC’s User Port. It comes with a custom filing system EPROM that contains MMFS. This is all pretty much enthusiast-developed stuff, and it works flawlessly.

The Turbo MMFS card came with lots of docs, one of which describes how to fit an 32K SRAM chip to an EPROM socket to provide two banks of ‘sideways’ ROM that can be loaded from disk files. This is handy for things like language ROMs, assemblers, monitors, word processors, etc. where you typically need the machine’s main RAM to work with.

I wanted to fit this chip, and while it’s a simple modification, all the docs I could find simply described what has to be done, but no explanations of ‘why’. So I decided to get my multimeter out and probe about, with the help of the original schematics.

I have since found more detailed documentation that I will link at the end – it was written by people more knowledgable than me, so it should be taken as canonical over what I have written here.

Making SRAM look like ROM

So, an SRAM can be written to by the CPU, while a ROM can not. The EPROM chip supplied with the TurboMMC card was of type 27256, and the SRAM chip suggested in the docs is a 62256. Both are 32K devices, and differ only at pins 1 and 27. The docs tell us to simply connect Pin 1 to IC76 Pin 11 or 12, and connect Pin 27 to IC77 Pin 8. So here’s why.

Compare the pinouts below. Pin 1 is Vpp on the EPROM, but A14 on the SRAM. Also, on SRAM, we have Write-Enable on pin 27, which is A14 on the SRAM.

These chips are very similar in terms of their pin arrangements. The SRAM has no need for a programming voltage (i.e. 12.5V on Vpp), and the EPROM has no need for a Write-Enable, since in operation it’s a read-only device.

27256 EPROM
62256 SRAM

Provide Write Enable (WE#)

The most important thing we need to do is provide the SRAM chip with a Write-Enable signal, otherwise there would be no way to get data onto the chip. We can see that the SRAM has an active-low write-enable (Pin 27), so this pin should be high when reading, low when writing. The suggested place to pick up R/W seems to be IC77 Pin 8, which is the NAND of R/W and the 2MHz clock. There are two other suggested points for a suitable signal, IC78 Pin 10 and IC73 Pin 24.

I think that the reason the WE# signal isn’t taken directly from R/W is because OE# is synchronised to toggle on the rising edge of the 2MHz clock, and the suggested pins give the synchronised inversion of this signal for WE#. Therefore, read and write are never activated simultaneously, because they can never both be pulled low at the same time.

Provide A14

We could simply patch SRAM Pin 1 to the EPROM socket’s A14; this would pull it high directly from Vcc. However, since the SRAM chip is actually 32K, and not 16K, instead of simply pulling A14 high, it can be connected to the chip that determines bank-selection (IC20, below) so that A14 is high or low depending on which bank is selected. Two banks from one chip.

IC76 is a 74LS163 (TTL Synchronous binary counter with preset). Although it is described as a counter, it’s configured to be used only as a register. It can hold four bits. Two of these bits (Q0 and Q1) are connected to IC20, which is a 74LS139 (TTL dual 2-to-4 decoder/latch) which takes a 2-bit input (A0b and A1b), and sets one of four output bits accordingly (e.g. 01 -> 0100). Each of these IC20 outputs (O0b to O3b) is connected to the chip-enable pin on each of the ROM sockets.

74LS163 ROM Select Register
74LS139 ROM Chip Select Decoder

The 74LS139 is split into (a) and (b), each having 2 A-inputs, and 4 O-outputs. The (b) side is used for decoding the ROM socket. Each O output is connected to CE/E on the SRAM/EPROM (Pin 20).

So, only two bits of the four bit register are used to select the ROM socket (since there are only four sockets). Therefore to switch between the upper and lower 16K of our 32K SRAM, we can wire A14 to either of Pin 11 or Pin 12 (Q2 or Q3), and set the ROM selection value (0x0 – 0xf) such that our Q2 or Q3 value will determine A14.

As a side note, the four ‘sideways ROM’ sockets hold chips that can address 32K of memory, but because pin A14 is normally always pulled high (continuity with Vcc), any chip inserted without any of these modifications will only be able to address 16K (A0-A13 – 14 useable address bits, 2^14 == 16384).

My One Last Mod

I mentioned that the EPROM supplied with the TurboMMC is a 32K chip, and the MMFS filing-system ROM image is written to the upper 16K. The vendor (Steve Picton) was kind enough to write the BASIC 2 ROM image to the lower 16K. This is normally ignored, but using a similar technique to the one above, I bent out and wired the EPROM A14 (Pin 27) to IC76, rather than having it pulled high. This meant that the lower 16K was made addressable as a BASIC 2 ROM, and so I could free up the ROM socket that contained the original ROM (and lower power consumption too!).

I see no reason why all ROM sockets can’t share the same Q output (i.e. Q2 or Q3) of IC76, but for simplicity I chose to wire one to Q2 and one to Q3. This just affects which ROM number the chip banks respond to.

No Really, the Very Last Mod

It’s hard to know when to stop. What I want to finally do (and a big part of why I wanted to understand how this wiring worked) is to add a battery-backup to the SRAM chips. This is provided by some of the dedicated ROM expansion boards, but I reckon that a few AA batteries and judicious use of diodes and resistors should be enough to keep the chip going in standby while the BBC is powered off.

I might describe that here, or link to source material if I find a guide on the Internet.

Links

So all mods have worked perfectly so far. My BBC Micro setup is leaner, yet more functional, that it was before. All credit goes to the enthusiasts who figured out and produced all these great mods. This article was simply about satisfying my curiosity about what these folks came up with.

Most of these links were discovered after this article was written. If there are discrepancies between what I have written and the content of the links below, consider the the articles below as authoritative, rather than mine! Not all links relate directly to this post, some are just a place for my future reference.

Inside the BBC B Issue 7 – lists all the chips and their functions.

Sideways RAM 101 – stardot.org forum thread with lots of details.

http://beebwiki.mdfs.net/Paged_ROM – Wiki entry on Paged ROMS on BeebWiki.

Schematics for BBC Micro as a JPEG – there are also schematics available in at least PDF format, probably lots more.

DIY 32K Sideways RAM – detailed retroclinic.com article on sideways RAM.

Michelle Knight’s article on sideways RAM – lots of details including commands to load ROMS.

Another good stardot.org forum thread – posted by forum member ‘holmes’.

A Hardware Guide For The BBC Microcomputer – a great book from 1983, in HTML format. Chapter 3 summarises the main circuits in the BBC.

https://www.stairwaytohell.com/articles/cr-BBCMicro-CToday.html – a review of the BBC Micro, as reviews should be done. Informative!

Acornsoft Graphics Extension ROM Manual – This ROM looks fun!

http://www.bbcmicro.co.uk/ – Complete BBC Micro Games Archive

http://www.flaxcottage.com/ – Educational Software Archive (an awesome collection, thanks!)

https://stardot.org.uk/forums/ an active community of all things Acorn.

http://archive.retro-kit.co.uk/bbc.nvg.org/software.php3.html Archive of a now obsolete website (bbc.nvg.org).

MMFS Command Reference on GitHub also MMB Utils for manipulating disk images from GNU/Linux/Unix systems

https://github.com/stardot/beebasm BeebAsm, a portable 6502 assembler with BBC assembly syntax.

http://wouter.bbcmicro.net/bbc/hardware/index.html

Google, get your paws off my kids!

What I see is a naive education system being led astray by a hugely influential data harvesting company. Leaving aside my huge reservations about giving Google access to my kids, to harvest their data and keep it for their entire lives, I’ll simply talk about one tiny issue that I see as the first hurdle they fell at. The very first thing I looked into regarding Google in the Classroom set off alarm bells.

They partner with Kahoot, a Google Education Partner, Google Classroom. Even at a glance, Kahoot looks to me like a shady company. The Common Sense Privacy Report sort of backs up my gut feeling, 66% with an amber ‘Warning’ badge is way below the standard I expect in my child’s education.

As an example of what looked shady to me, if I search Google for ‘Kahoot Data Harvesting’ I get the following URL: –

(http://) (cervinotechworkshop.weebly.com) (/kahoot-collecting-data.html)

I have broken up the above URL because I don’t want to add to its value by linking to it. That’s marketing spam! Worse still, it has been deliberately designed to shadow legitimate questions being asked about ‘Kahoot data harvesting’. Instead of talking about privacy issues, the article purports to be advising teachers on how best use Kahoot in classrooms. There is no doubt in my mind that this is driven by Kahoot. It’s shady and it’s deceptive.

The entire first page of search results, even on non-Google search engines, is either from the Kahoot website directly, or ‘shadowed’ content from them that’s masquerading as ‘articles’.

Straight off the bat, I do not trust this company with access to my child, so why should schools be pushing this?

The subject of data exploitation and privacy abuse is huge. So big, so insidious, and only so widely accepted because of public naivety, which is pretty much unavoidable due to the complexities involved. It’s impossible to convey in a few words, or even a few sentences or paragraphs. However, since I originally wrote this, a documentary team have had a good stab at the issue, so…

Here’s some Unsolicited AdviceTM

Start by watching The Social Dilemma – it’s a documentary with some dramatisation, and it provides a gentle introduction to the subject. If you don’t have Netflix, then find someone you know who does, and go round with sandwiches and a cake to enjoy while watching it together. If you don’t know anyone with Netflix, then ‘pirate’ it with BitTorrent!

I think it is crucial that we all lose our naivety, and make decisions and demands based on sound rational judgement. The revelations in The Social Dilemma are already quite well understood within many sectors of the tech industry. Lots of people have been warning about this stuff for years, but it’s all so opaque, abstract, and complex, all at once, that unless you are immersed in the tech world, it’s an uphill struggle to properly convey. And Netflix, to their credit, have managed to do a really good job – I’m genuinely surprised that they got away with it.

Enriching, or just engaging? – Why advertising destroys your web.

Advertising is destroying the web, some say it is already destroyed. Most people who work in the tech industry know this, but only because we get to see the web evolve. For everyone else, it’s hard to get any visibility into what’s going on, so I’ll try to explain it.

Every time you visit a web page, absolutely any page, there’s an opportunity to make money. That’s because when you’re looking at a screen, you could also be looking at an advert. Advertisers will pay money to have their ad on your screen at that moment.

The ad-tech industry is complex, but most of that complexity is internal to the industry. Really, there’s just the advertiser, the publisher, and the reader. The publisher creates interesting stuff, and we read it. Advertisers who want to reach people like us will pay publishers to get their message in front of our eyes.

On the web, there are billions of people with a web browser, and every page you view is opportunity to make a tiny amount of money. These tiny amounts add up. An advertiser somewhere will be willing to pay some tiny sum for even a slim chance of profit.

If you think email spam is bad, then realise that spam represents the lower bound of internet advertising, and the worst web advertising is little better than email spam.

Advertisers demand places to show their ads, and internet publishers need to produce content to satisfy that demand. In principle, good content attracts many interested readers (page-views), and therefore lots of advertising revenue.

In practice however, publishers have realised that good content is not really necessary, and that more money can be made from ‘seemingly’ good content or ‘otherwise tempting’ content. In short, it’s cheaper to buy or copy existing content, and it’s enough to just write an effective headline. They get paid as you look at their page, there’s little value in your opinion of what they publish.

In other words, publishers profit more from syndicated content and click-bait than they do from creating original, informed, and objective writing.

noun: clickbait – content whose main purpose is to attract attention and encourage visitors to click on a link to a particular web page.Oxford University Press

Historically, the model used in magazines had a targeted advertising component. Magazines would be sold at a cover price, and further revenue would come from advertising. The magazine articles would have to cater to our interests, or we’d simply stop buying the magazine. There was a strong incentive to not mess with readers, though ‘adutorial content’ (adverts disguised as articles) was rife in the more mainstream publications.

Today, there are comparatively vast numbers of online publishers, all competing to get you to look at their pages, because as well as traditional publishers, there are now also bloggers and social media ‘influencers’. There are even sites that make no effort to conceal their motives, and produce nothing but click-bait headlines, carefully calculated to result in your click, that lead nowhere substantial. In fact many established publishers also do exactly this.

This is unavoidable where the goal is to make money in an environment with no enforced rules, where customer loyalty no longer exists, and where tiny payments accumulate simply by getting you to look at something. Inevitably, sites offer as little as they can get away with, while still getting you to click their links.

“I’ve noticed that a lot of news articles take a few examples of something outrageous, but never say anything about how widespread the practice is.“bleah1000 observing examples of sensational click-bait (one of its many forms).

So, who controls what gets in front of your eyes? It’s whoever controls your starting point on the web. When you launch a web browser, what’s the first thing you see? When you open your phone, what notifications are waiting for you? Who is asking you to install their app ‘for a better experience’? What do you see in these apps?

The web has changed from an enriching experience to a frantic, exploitative clamour for your eyeballs on some advertiser’s copy.

As an aside, you can improve your experience to some extent by using either Firefox + uBlock Origin, or Brave (which is Google Chrome with ad-block built in). The industry is already gunning for these products, because they conflict with commercial greed. However, for the time being they’re available to use and they’re effective.

A/B Testing and Pursuit of ‘Engagement’

Here’s how to exploit people’s precious time and attention. Show a million people variation A, and another million people variation B. Which variation won – which got the highest ‘engagement’? Vary the best one slightly and repeat. Forever!

That’s how to hone in on what works best with your audience – at any scale, at any level of detail – it’s the kind of thing that traditional market researchers drool over – it’s totally beyond their wildest dreams.

I used the word ‘engagement’, yet the web should really be bringing you ‘enrichment’. Engagement is how the ad-tech industry measures performance – in other words, how long did you spend looking at their stuff.

An ‘enriching’ experience really doesn’t figure in their reasoning about any of this. Only engagement counts. There may be co-incidental overlap – an enlightening bit of comedy, or some well-explained science might leave you enriched in some small way, but these discoveries happen in spite of the system rather than because of it.

The very notion of ‘engagement’ as a measure is intimately tied to the ideas around ‘tracking’. You have a unique identity, such as email, your Facebook/Insta/TikTok/whatever name, your phone number. You also have many more unique identifiers that you will probably be oblivious to, such as your browser’s ‘fingerprint’, tracking cookies, and a whole slew of more technical stuff.

These unique identifiers allow the industry to measure your engagement, and without them it’s much harder to exploit your attention.

The next time you pick up your phone, or tablet, or laptop, ask yourself if the experience is ‘enriching’, or just ‘engaging’, and take a moment to consider just putting the device down.

Gemini Protocol Markup

The Gemini project defines a protocol and markup for serving documents. The server runs on port 1965 by default, it responds to gemini:// URLs, it uses TLS with client certificates, and it has a simple markdown that fixes the shortcomings of Gopher pages without adding much extra. There are GUI, terminal, and command line clients already available.

The protocol has been designed with just enough features to allow publishing of simple documents, small files, and it also allows for rudimentary input handling. The bare simplicity of Gemini is a deliberate design choice. Client and server software is easy to write, as are Gemini documents. There are no features that could meaningfully aid tracking and advertising, so it’s unlikely to ever gain commercial interest. This is itself a key feature.

My own Gemini server is at gemini://gemini.susa.net/. In order to read any content there, it’s first necessary to install Gemini client (just as you need a Web browser to read content on the World Wide Web). There are a number of web-based proxies that have been made available by members of the community, and while these can be used to access Gemini ‘capsules’ (the Gemini equivalent of a web-site), I’d recommend using a proper client instead.

Gemini is overwhelmingly text-based. Not even inline images are supported, and although some clients do offer inline image loading, you generally have to choose to download an image, e.g. by clicking a link just like any other link. Again, this is a matter of principle in the protocol design; that is, it’s you who’s in charge of what you view, not the page author or site owner, nor any advertiser.

So, if you want to publish stuff somewhere that’s separate from the world wide web, then this seems like a good alternative. The markdown is simple, yet gives headings, paragraphs, pre-formatted blocks, lists, and links. You can simply type some words in a text file, and that’s your document ready to serve to the world. The immediacy and accessibility is refreshing (more so as I type this in WordPress, which is lagging in a browser on a fast 8-core Intel i7 laptop with 16GB of RAM).

There are barriers to entry – the most direct access for editing is via a shell, using a command line editor (I use Vim). I think this is well within the abilities of most people, but it will likely be daunting. The tilde communities seem to do a good job of making these things accessible, perhaps some of this could be applied to the fledgling Gemini community.

Below is a summary, but the full specification is at https://gemini.circumlunar.space/docs/specification.html (it’s brief; it can be read in the time it takes to drink a coffee!)

# This would be an H1
## This would be an H2
### This would be an H3

=> https://www.susa.net Click me, I always exist on my own line.

> This line will show as a block-quote

* This is the first list item.
* This is another list item.

Pre-formatted blocks start and end with lines containing three back-ticks (```)

Anything else is just normal paragraph text, blank lines are always preserved.

The simplest Gemini client is Bash

Using ncat, it’s possible to make a request to a Gemini server with the following: –

echo -ne 'gemini://gemini.susa.net/index.gmi\r\n'|ncat --ssl gemini.susa.net 1965

This results in the following on stdout. The first line is the server’s response code, the rest is my index.gmi content: –

20 text/gemini
Hello from Gemini dot Susa dot Net

=> lua_api.txt The Official Minetest Lua API for modding.
=> lua_api.gmi The Official Minetest Lua API in Gemini markup.
=> xtract_lua_api.awk My awk script to extract sections of the API.

=> petz_functions.gmi a list of member functions in the Petz mod.
=> minetest_pointed_thing.gmi my explanation of above and under nodes.

=> hexchat_no_such_device_or_address.gmi Fix HexChat Disconnected (No such device or address)

My web site is at: -

=> https://www.susa.net/wordpress/

I can be reached via SMTP at kevin@susa.net

So simple, this is a great initiative; decisions seem to have been well considered. I’m grateful! For more, see https://gemini.circumlunar.space/

A more featureful client: GemiNaut

A gemini (.gmi) page viewed in the GemiNaut browser.

For a server, I use agate gemserv:

I have tried agate, which serves static files (and is still being actively developed). I then spent ages getting GLV-1.12556 running, which has lots of well considered features, but it required a lot of fiddling and hacking to get it to compile and run, so it might be too much of an admin hassle.

I have currently switched to gemserv, which seems to have similarly useful features (virtual hosts, CGI, home directories), but runs as a single binary like agate, and the Rust project builds easily with cargo. There are a couple of links to CGI examples at gemini://gemini.susa.net if you want to see the server in action.

My server needs a private key and certificate (just issued locally using openssl).

# This command created a key and certificate that's valid for any host on susa.net.
openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem -days 3650 -nodes -subj "/CN=*.susa.net"

# This command lets you view your server's certificate as human-readable text for troubleshooting.
openssl x509 -in cert.pem -text

The following is some server output, including the command line that launched the server (in this case agate).

kevin@kakapo:~/gemini$ ./agate.x86_64-unknown-linux-gnu 0.0.0.0:1965 ./content/ cert.pem key.rsa
Got request for "gemini://www.susa.net:1965/"
Got request for "gemini://www.susa.net/"
Got request for "gemini://gemini.susa.net/"
Got request for "gemini://gmi.susa.net/"
Got request for "gemini://gmi.susa.net/favicon.txt"
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Got request for "gemini://gmi.susa.net:1965/"
Got request for "gemini://gmi.susa.net:1965/petz_functions"
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Got request for "gemini://gmi.susa.net:1965/petz_functions.gmi"

My index.gmi file to show a little markdown.

Hello from Gemini

=> petz_functions.gmi a list of member functions in the Petz mod.

You may check out my website at: -
=> https://www.susa.net/wordpress/

```
-- Lua code to log my name minetest.log("Kevin")
```
Kevin said:
> This is quite a useable format to document Minetest mods. I think I'll use this in future.

### I'm signing off now
Good day to you sir. I bid you farewell.

If you have a Gemini client, you can view this at gemini://gemini.susa.net/

Personal Search Engine

I’ve been playing with the idea of Commerce Filtered Search, which is essentially a search engine of stuff that doesn’t exist simply to get you to click it. Sort of like how the Internet used to be, a place for those with boundless curiosity by those who just like to share what interests them.

My original plan was to ‘seed’ a web crawler with high-quality links, and fan out from there. The seed links were extracted from Hacker News, Reddit was on my radar. I also wrote an add-on for Firefox that lets me record links that I happen to find for subsequent crawling. The resulting search engine (with an outdated index) can be found here. I find it hugely promising, but each iteration seems to yield more complexity – search is hard.

So, I’m paring back. My goal right now is for a personal search engine that I can throw URLs from various good sources and have them fed into the index. I’m keeping a record of useful tools to help with this, and this page is currently a repository of information that should evolve into a more coherent post.

Interesting stuff to consider:

Sonic describes itself as “Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.” https://github.com/valeriansaliou/sonic

This seems promising because it claims to work well with limited resources, which is something I’d trade some of Lucene’s flexibility for.

Linkalot is a basic (at the time of writing) self-hosted link manager, and can be used to accumulate interesting links. It works well with Send-Tab-URL extension. https://gitlab.com/dmpop/linkalot

jusText is used for boilerplate removal. It has many implementations and forks of the original unmaintained algorithm. You will likely find things like cookie consent and image captions among your text. https://pypi.org/project/jusText/

The nghttpx Reverse Proxy

I want to expose different containers on specific URL paths, possibly on different hosts, and nghttpx, from the nghttp2 library by Tatsuhiro Tsujikawa, does this in an intuitive way, and does a lot more besides.

    sudo apt-get install nghttp2-proxy

An example configuration is installed in /etc/nghttpx/nghttpx.conf, which configures nghttpx to listen for cleartext http on port localhost:3000 and proxies (e.g. forwards to) localhost:80.

    frontend=127.0.0.1,3000;no-tls
    backend=127.0.0.1,80
Continue reading →

uBlock Origin: exporting the blocked hosts

I’ve been working on and off on the Commerce Filtered Search Engine (CFS), essentially a survey of the web to find sites that are not commercially driven, in order to index them for searching. The idea is that if we can filter out all the click-bait and commercial stuff, what’s left might actually be interesting, novel, and informative (and a fair bit of rubbish, I expect, but perhaps it’ll at least be honest and sincere rubbish).

Up until now, I’ve been using Puppeteer with uBlock Origin. I was able to handle request failures and check for the error net::ERR_BLOCKED_BY_CLIENT, which indicates that a request was deemed to be ad or tracking related. The more hits per page I survey, the more spammy I rank the site.

Continue reading →

Longan Nano (GD32VF103)

This was an impulse purchase, because for some unfathomable reason I really wanted a RISC-V CPU to play with. Sipeed’s Longan Nano, a small board based on the GigaDevice GD32VF103 SoC is just that; a RISC-V CPU with a bundle of decent peripherals. There are links below if you want details on this board.

The GD32V implements an RV32IMAC CPU, where ‘RV32I’ refers to a 32-bit CPU with the Base Integer Instruction Set, the ‘M’ denotes the Standard Extension for Integer Multiplication and Division, the ‘A’ denotes the Extension for Atomic Instructions, and the ‘C’ refers to the Extension for Compressed Instructions (i.e. 16-bit opcodes for commonly used instructions, useful for this memory constrained device).

Continue reading →

Seeed, 4PX, and Yodel – Really Quite Good

So Seeed finally dispatched my Sipeed Longan Nano, a little RISC-V SoC that was too interesting to resist. I say finally not because they were tardy, but because it was on back order. I had to write a few words about the delivery, because while I’ve always been impressed by Chinese suppliers, the ability to track with the level of detail shown below, from Shenzhen to just south of Edinburgh, is particularly impressive.

Here’s the tracking from Shenzhen, China to Livingson, Scotland

Continue reading →

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.

Continue reading →

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.

Continue reading →

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).

Continue reading →

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 using an AM receiver module (Aurel RX-4MM5) – a much more effective approach – arduino-yun-reading-wh1080-using-aurel-rx-4mm5. Currently testing on Arduino Yun, but will probably move to a more platform agnostic design to support Dragino and Carambola etc.

Continue reading →

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.

Continue reading →

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 a MOSFET that ultimately controls the voltage on the tracks. The train will automatically switch into reverse when the control is turned anti-clockwise through the zero point. Continue reading →

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 the thermometer. You’ll need a Torx T9 screwdriver (Maplin, eBay, Amazon, maybe pound shops).
Continue reading →

Raspberry Pi Power Controller

This article is a work in progress to create a power-controller for the Raspberry Pi based on a PIC microcontroller and MOSFET. The PIC implements an I2C slave to allow power control, and also to approximate the registers of a PCF8563 Real Time Clock (RTC) chip, to allow timed wake-up of the Pi.

  • Power the Raspberry Pi off and on with a push-button.
  • Fully shut down the Raspberry Pi on ‘shutdown -h’.
  • Wake-up at a specified time (one-off or periodic).
  • Monitor the supply voltage.
  • Log glitches in the power-supply (e.g. caused by USB device activity).
  • Maintains the time from a CR2032 button cell.

During power-down, the circuit currently consumes around 5μA of power, useful where a battery is being used to power the Pi (remote solar-power applications, or in-car systems, for example).

The Pi is able to instruct the PIC to power it down using a short I2C command sequence. Wake up events include a push-button, or other voltage-sense on an input pin. Continue reading →

Raspberry Pi – Driving a Relay using GPIO

There’s something exciting about crossing the boundary between the abstract world of software and the physical ‘real world’, and a relay driven from a GPIO pin seemed like a good example of this. Although a simple project, I still learned some new things about the Raspberry Pi while doing it.

There are only four components required, and the cost for these is around 70p, so it would be a good candidate for a classroom exercise. Even a cheap relay like the Omron G5LA-1 5DC can switch loads of 10A at 240V. Continue reading →

Fighting Click-Bait

The Internet seems awash with ‘click-bait’ and sponsored content – articles created primarily to generate money, sometimes plagiarised, misleading, exaggerated, or provocative just to get views. The good stuff – articles often written simply because it’s good to share knowledge and ideas – is getting harder to find.

My proposal is to create a search engine that, rather than systematically crawl the web, starts with a seed corpus of high quality links, and fans out from there, stopping when the quality drops. The result will hopefully be a searchable index of pages that were created to impart information rather than to earn cash from eyeballs.

Continue reading →

Docker WordPress in a subdirectory

Moving a standard WordPress installation to a different host is a minor pain – I only do this occasionally, so every time I need to consider the configuration of the original environment and how this translates to the new server. Nothing too challenging, but tedious and prone to error.

So I figured Docker containers are the way to go and, sure enough, Docker Hub has more than enough images for my needs. The only issue is that I don’t dedicate my server to WordPress – it’s in a ./wordpress subdirectory of the web root. Docker’s official WordPress image keeps reinstating the WordPress files if they’re not found in the web root. Continue reading →

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 logging email Open and Click events, seems to be at least partially out of date, so I thought I’d dig into the code to understand and document the bits that I was unsure of. Continue reading →