DeviceTree For Hackers: Intro

Raspberry Pi has just leaked information on the Pi Zero 3W. They did it by publishing a DeviceTree file that describes the hardware of the Pi Zero. This is how we know it has the BCM2711 (Pi 4 CPU), makes use of PCIe (maybe it’s even exposed!), has an onboard power button, an extra power LED, and an eMMC option. If I were to guess, this will be the first dual-sided Pi Zero board, and if I were to have hope, it finally has USB-C.

Don’t believe it? Go read the DeviceTree file for yourself — it’s exceptionally easy to read it between the lines. DeviceTree files tell the Linux kernel, or other OS kernels, what CPU to expect, what drivers to load, which interfaces are exposed on your board, and the devices connected to those interfaces. Sometimes a proper DeviceTree file is the only thing you need to make a modern Linux OS run on a neglected SBC you own.

There are DeviceTree files powering technology all around you. Your phone has one, so does your router, your ARM laptop, and not even to speak of your SBCs. Some DeviceTree files are evil, being merely a thin layer between the Linux kernel and proprietary drivers; you will find these in phones with CPUs made by evil corporations. Most DeviceTree files are simply there to do their job.

Continue reading “DeviceTree For Hackers: Intro” →

Radon Active

When you think about nuclear radiation, you often think about power plants, but it turns out there’s radioactive stuff all over the place: smoke detectors, granite counters, bananas, and potatoes can all be mildly radioactive. Even some old tape dispensers. But those are all puny sources.

Radon is a colorless, odorless gas that is heavier than air. It is a byproduct of uranium decay, amonth other pathways, decays by emitting an alpha particle, and has a half-life of just about four days. As a gas, it escapes from rocks or soil. Usually, there isn’t much of it, so it vents harmlessly to the atmosphere. But it can easily get trapped in a house and accumulate. You might think your house is solid, but there are plenty of cracks, joints, and pipes where gas can weasel through, especially if your inside pressure is slightly lower than the pressure in the soil below, which is common.

As the radon decays, it can produce more radioactive material, including tiny amounts of polonium. With or without dust particles, these tiny bits of radioactive material can go airborne and end up in your lungs. There, they can further decay, and alpha particles damage cells and DNA. According to the EPA, radon exposure is the second leading cause of lung cancer in the United States, next to smoking.

Not So Speedy

If you get enough carbon monoxide in your home, you probably won’t see the next sunrise. But radon works very slowly. It is odorless and colorless. You won’t show any general symptoms to warn you that you might get lung cancer.

The effect can take years or decades. Of course, you can also have a house that has very little radon. However, nearly all homes have some radon. The EPA estimates that about 7% of homes have elevated radon levels.

Some areas are more prone to radon than others, but even if your area has low risk, there’s no guarantee that your house is safe. If you are lucky enough to not have a radon problem, you have nothing to worry about. But how do you know? Like anything, you need to test.

Continue reading “Radon Active” →

The Depiction Of Amateur Radio In The Movies And TV

A constant in film and TV if you work with technology is to continually see wildly inappropriate depictions of it on screen. Whether it’s all those hacking scenes in which the teen wizard mashes a keyboard and instantly gains access to the military grade computer system, the infamous NCIS sequence in which two people work simultaneously on the same keyboard, or CSI‘s magical video enhancement technology, we’ve seen it all. But there’s one area of technology which surprisingly has had a few accurate portrayals on screen, and that’s amateur radio. Yes, just sometimes, film crews do their homework.

Comedy, Hero, or Excentric. Which Are You?

Tony hancock in black and white, holding a microphone, electronic equipment visible behind him.
Tony Hancock, radio amateur.

Writing this from the rainy edge of Europe, the depiction of a radio amateur non screen that first comes to mind dates from the early 1960s. The British comedian Tony Hancock devoted a whole episode of his series to it, in which he plays an inept operator with hilarious consequences. It’s not in any way accurate and some of the comedy is … dated, but it’s interesting to watch. There’s a whole genre of comedic episodes featuring the hobby, in researching this piece I found a 1965 episode of The Munsters in which Herman minstakes some kids at play for real Martians, and a Simpsons episode in which Principal Skinner is revealed to have a licence.

But amateur radio as a source of comedy isn’t the only genre at play. Radio amateurs are often depicted as heroic rescuers or communicators. alternately sending help to shipwrecked mariners, solving crimes, or providing emergency comms. In 1969’s The Red Tent starring Sean Connery for example a Russian radio amateur picks up a distress call from an airship crash, while in 2008’s The Bank Job is based on the true story of a London robbery in which a radio amateur heard the radio comms of the criminals. I’m sure many of you meanwhile will have seen Independence Day, in which radio amateurs use Morse code as a last ditch global communication system.

Probably the most frequent depiction though is through science fiction. 1996’s Phenomenon for example has amateur radio associated with paranormal events, and in a more comedic vein, 1980s TV’s ALF follows an amateur radio signal to Earth. Meanwhile The X Files has multiple episodes peripherally featuring the hobby, after all, us radio amateurs know the truth is out there, right?

There Are More Radio Amateurs In The Movie Business Than Hackers

Through all of this, when compared to hacking scenes in movies and TV, amateur radio gets off lightly when it comes to accuracy. Tony Hancock’s performance may be more comedy than radio, but frequently there have been real radio amateurs involved in the production somehow. Principal Skinner’s callsign is one previously held by the show’s executive producer David Mirkin for example, and the ARRL have some comments on the accuracy of 2011’s Super 8. Perhaps this is because people with the skills to be thought of as hackers by movie production crews tend to have jobs in allied fields and never come near a movie set, while radio amateurs are more widely spread among the population. The chances of a radio amateur being in proximity to a film set are high, while the chances of a hacker? No chance, the lights are too bright.

How Bad Is That Bridge: A Government Database

Bridges! We kind of expect them to just be there and do their job, ad infinitum. They are built into the landscape, and we often take them and the routes they open up for granted.

The reality, as any civil engineer will tell you, is that bridges are living, breathing things that require endless maintenance and monitoring to keep them safe, standing, and functional. A great example of this is found in the US Department of Transportation, and its publicly accessible register of bridge health reports.

Continue reading “How Bad Is That Bridge: A Government Database” →

What’s A Nonius?

If you already know what a nonius is, you can probably skip this post. But, if like us, you would have to look it up, we’ll tell you what we found out. It turns out, a translation mistake taught us a new word and some history we weren’t aware of.

In the manual, this is captioned: Figure 4-7 Nonius Display (Standard Mode)

Have a look at the adjacent graphic from a waveform display. What would you call the vertical red lines at positions 139 and 200?

We’d probably call them markers. Or maybe cursors. The manual, however, calls each one a “nonius”. It refers to them that way multiple times.

Oddly, the manual also has sentences like “Select one nonius and right-click, and then select ‘Remove Marker’ in the next window to delete the nonius.”

So, clearly, a nonius is the vertical line marker or cursor. But that, of course, begs a question…

What is a Nonius?

“Nonio originale” by [Henrique Leitão]
Have you ever heard of the vernier scale? If you’ve done navigation, used a traditional caliper, or tuned an old shortwave receiver, you probably have. [Pierre Vernier] developed it in 1631 as a way to better interpolate values on a scale.

However, there was an earlier version used to improve measurements on astrolabes. A Portuguese navigator named [Pedro Nunes] created this type of astrolabe in 1542. The Latinized version of his name is [Petrus Nonius]. What are the odds of him inventing… oh wait, they named it after him. That does make more sense.

The nonius is a series of concentric circles traced on the instrument. Working towards the center, each circle has fewer divisions than the previous one. In fact, if the outer ring had 90 marks for 90 degrees, the next ring would have 89, and the following one would have 88.

Continue reading “What’s A Nonius?” →

Your Computer Memory Is A Lie

When you first learn to program, memory seems pretty straightforward. You have a bunch of bytes, each with an address. If you want to read or write something, you specify the address, and the computer goes to that place and does your bidding. Sure, some addresses might be reserved for hardware or the operating system, but the general idea is simple: memory is a big array of bytes.

Just like we pretend that a wire is a perfect conductor, the big array of memory model used to be a slight twisting of the truth. On a modern computer, however, it is almost entirely a lie. The address you use probably isn’t a physical address. The data you read might not come from RAM at all. Even if it does, it might be sitting in one of several caches. And if you follow the rabbit hole far enough, you discover that your SSD is arguably just another level in the memory hierarchy.

The Need For Speed

The fundamental problem is that processors have gotten much faster than memory. A modern processor can execute several instructions per clock cycle, but accessing ordinary DRAM can take hundreds of cycles. If the processor had to wait for RAM every time it needed data, much of that impressive computing power would go to waste.

The solution is caching. Keep copies of frequently used data in smaller, faster memories closer to the processor. Most modern desktop processors have at least three levels of cache. The L1 cache is tiny but extremely fast, and often split between instructions and data. L2 is larger and somewhat slower, while L3 is even larger and usually slower as well.

Continue reading “Your Computer Memory Is A Lie” →

Lead A Discord Exodus With A Matrix Server

The Internet, and large groups of people in general, tend to have a remarkably short collective memory. Whether it’s the nature of algorithms or the people themselves to always be chasing the next novelty, maintaining long-term engagement for even relatively small changes can be challenging. Distractions abound, and motivation tends to fade over time. This past spring, Discord’s unpopular decision to force age verification resulted in a brief flash-in-the-pan of outrage that dissipated when they promised to delay its roll-out. Rather than backtrack on unpopular policies, they’ve been slowly boiling the frog with incremental changes towards this same goal in the meantime. One of the options to deal with this is to migrate over to something like a Matrix server, which has a number of benefits over Discord including being open-source and self-hostable.

Unlike Discord, a closed platform subject to the whims of a private company, Matrix is a communications protocol and open standard. Its major server and client implementations are open source, so anyone can build tools around it and integrate it with other systems that also use this protocol. This protocol-vs-platform comparison mirrors email, which is another protocol that isn’t locked down by any one company, and which can easily be used to send messages across various providers. The most commonly used server-side software for Matrix is called Synapse and the most prominent general-purpose clients are the various implementations of Element, and my exploration uses these defaults.

Continue reading “Lead A Discord Exodus With A Matrix Server” →