Hackaday Links Column Banner

Hackaday Links: January 10, 2021

You know that feeling when your previously niche hobby goes mainstream, and suddenly you’re not interested in it anymore because it was once quirky and weird but now it’s trendy and all the newcomers are going to come in and ruin it? That just happened to retrocomputing. The article is pretty standard New York Times fare, and gives a bit of attention to the usual suspects of retrocomputing, like Amiga, Atari, and the Holy Grail search for an original Apple I. There’s little technically interesting in it, but we figured that we should probably note it since prices for retrocomputing gear are likely to go up soon. Buy ’em while you can.

Remember the video of the dancing Boston Dynamics robots? We actually had intended to cover that in Links last week, but Editor-in-Chief Mike Szczys beat us to the punch, in an article that garnered a host of surprisingly negative comments. Yes, we understand that this was just showboating, and that the robots were just following a set of preprogrammed routines. Some commenters derided that as not dancing, which we find confusing since human dancing is just following preprogrammed routines. Nevertheless, IEEE Spectrum had an interview this week with Boston Dynamics’ VP of Engineering talking about how the robot dance was put together. There’s a fair amount of doublespeak and couched terms, likely to protect BD’s intellectual property, but it’s still an interesting read. The take-home message is that despite some commenters’ assertions, the routines were apparently not just motion-captured from human dancers, but put together from a suite of moves Atlas, Spot, and Handle had already been trained on. That and the fact that BD worked with a human choreographer to work out the routines.

Looks like 2021 is already trying to give 2020 a run for its money, at least in the marketplace of crazy ideas. The story, released in Guitar World of all places, goes that some conspiracy-minded people in Italy started sharing around a schematic of what they purported to be the “5G chip” that’s supposedly included in the SARS-CoV-2 vaccine. The reason Guitar World picked it up is that eagle-eyed guitar gear collectors noticed that the schematic was actually that of the Boss MetalZone-2 effects pedal, complete with a section labeled “5G Freq.” That was apparently enough to trigger someone, and to ignore the op-amps, potentiometers, and 1/4″ phone jacks on the rest of the schematic. All of which would certainly smart going into the arm, no doubt, but seriously, if it could make us shred like this, we wouldn’t mind getting shot up with it.

Remember the first time you saw a Kindle with an e-ink display? The thing was amazing — the clarity and fine detail of the characters were unlike anything possible with an LCD or CRT display, and the fact that the display stayed on while the reader was off was a little mind-blowing at the time. Since then, e-ink technology has come considerably down market, commoditized to the point where they can be used for price tags on store shelves. But now it looks like they’re scaling up to desktop display sizes, with the announcement of a 25.3″ desktop e-ink monitor by Dasung. Dubbed the Paperlike 253, the 3200 x 1800 pixel display will be able to show 16 shades of gray with no backlighting. The videos of the monitor in action are pretty low resolution, so it’s hard to say what the refresh rate will be, but given the technology it’s going to be limited. This might be a great option as a second or third monitor for those who can work with the low refresh rate and don’t want an LCD monitor backlight blasting them in the face all day.

Continue reading “Hackaday Links: January 10, 2021”

The Shell And The Microcontroller

One of the nicest amenities of interpreted programming languages is that you can test out the code that you’re developing in a shell, one line at a time, and see the results instantly. No matter how quickly your write-compile-flash cycle has gotten on the microcontroller of your choice, it’s still less fun than writing blink_led() and having it do so right then and there. Why don’t we have that experience yet?

If you’ve used any modern scripting language on your big computer, it comes with a shell, a read-eval-print loop (REPL) in which you can interactively try out your code just about as fast as you can type it. It’s great for interactive or exploratory programming, and it’s great for newbies who can test and learn things step by step. A good REPL lets you test out your ideas line by line, essentially running a little test of your code every time you hit enter.

This is your development environment

The obvious tradeoff for ease of development is speed. Compiled languages are almost always faster, and this is especially relevant in the constrained world of microcontrollers. Or maybe it used to be. I learned to program in an interpreted language — BASIC — on computers that were not much more powerful than a $5 microcontroller these days, and there’s a BASIC for most every micro out there. I write in Forth, which is faster and less resource intensive than BASIC, and has a very comprehensive REPL, but is admittedly an acquired taste. MicroPython has been ported over to a number of micros, and is probably a lot more familiar.

But still, developing MicroPython for your microcontroller isn’t developing on your microcontroller, and if you follow any of the guides out there, you’ll end up editing a file on your computer, uploading it to the microcontroller, and running it from within the REPL. This creates a flow that’s just about as awkward as the write-compile-flash cycle of C.

What’s missing? A good editor (or IDE?) running on the microcontroller that would let you do both your exploratory coding and record its history into a more permanent form. Imagine, for instance, a web-based MicroPython IDE served off of an ESP32, which provided both a shell for experiments and a way to copy the line you just typed into the shell into the file you’re working on. We’re very close to this being a viable idea, and it would reduce the introductory hurdles for newbies to almost nothing, while letting experienced programmers play.

Or has someone done this already? Why isn’t an interpreted introduction to microcontrollers the standard?

Remoticon Video: Basics Of RF Emissions Debugging Workshop

These days we’re surrounded by high-speed electronics and it’s no small feat that they can all play nicely in near proximity to each other. We have RF emissions standards to thank, which ensure new products don’t spew forth errant signals that would interfere with the data signals traveling through the ether. It’s long been the stuff of uber-expensive emissions testing labs, and failure to pass can leave you scratching your head. But as Alex Whittimore shows in this workshop from the 2020 Hackaday Remoticon, you can do a lot of RF emissions debugging with simple and inexpensive tools.

Professionally-made probes in several sizes
Build your own probes from magnet wire

You can get a surprisingly clear picture of what kind of RF might be coming off of a product by probing it on your own workbench. Considering the cost of the labs performing FCC and other certifications, this is a necessary skill for anyone who is designing a product headed to market — and still damn interesting for everyone else. Here you can see two examples of the probes used in the process. Although one is a pack of professional tools and other is a bit of enameled wire (magnet wire), both are essentially the same: a loop of wire on which a magnetic field will induce a very small current. Add a Low-Noise Amplifier (LNA) and you’ll be up and measuring in no-time.

I really enjoyed how Alex started his demo with “The Right WayTM” of doing things — using a proper spectrum analyzer to visualize data from the probes. But the real interesting part is “The Hacker WayTM” which leverages an RTL-SDR dongle and some open-source software to get the same job done. Primarily that means using SDRAngel and QSpectrumAnalyzer which are both included in the DragonOS_LTS which can be run inside of a virtual machine.
Continue reading “Remoticon Video: Basics Of RF Emissions Debugging Workshop”

Bare-Metal STM32: Universal, Asynchronous Communication With UARTs

One of the most basic and also most versatile communication interfaces on an MCU is the UART, or Universal Asynchronous Receiver/Transmitter. Usually found in the form of either a UART or USART, the former allows for pure asynchronous serial communication, whereas the latter adds flow control. When working with MCUs, they’re also one of the most common ways to output debug information.

While somewhat trickier to set up and use than a GPIO peripheral, the U(S)ART of ST’s STM32 families is fairly uncomplicated to use, and immediately provides one with an easy way to communicate in a bi-directional fashion with a device. In this article we’ll see what it takes to get started with basic UART communication on STM32 microcontrollers.

Continue reading “Bare-Metal STM32: Universal, Asynchronous Communication With UARTs”

Hackaday Podcast 100: Arduino Plays CDs, Virtual Reality In The 60s, And Magical Linear Actuators

Hackaday editors Elliot Williams and Mike Szczys kick off the first episode of the new year with the best hacks the internet has to offer. There’s a deep dive into water-level sensing using a Christmas tree as an excuse. We ooh and ah over turning a CD-ROM drive into a CD player (miraculous tech of the previous century?). Do you have any use cases for ATtiny oscillator calibration registers? We look in on a hack that makes it dead simple to measure and set their values. The episode finishes up with a discussion of the constantly moving goal posts of virtual reality.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (~65 MB)

Places to follow Hackaday podcasts:

Continue reading “Hackaday Podcast 100: Arduino Plays CDs, Virtual Reality In The 60s, And Magical Linear Actuators”

This Week In Security: Android Bluetooth RCE, Windows VMs, And HTTPS Everywhere

Android has released it’s monthly round of security updates, and there is one patched bug in particular that’s very serious: CVE-2021-0316. Few further details are available, but a bit of sleuthing finds the code change that fixes this bug.

Fix potential OOB write in libbluetooth
Check event id if of register notification command from remote to avoid OOB write.

It’s another Bluetooth issue, quite reminiscent of BleedingTooth on Linux. In fact, in researching this bug, I realized that Google never released their promised deep-dive into Bleedingtooth. Why? This would usually mean that not all the fixes have been rolled out, or that a significant number of installations are unpatched. Either way, the details are withheld until the ramifications of releasing them are minimal. This similar Bluetooth bug in Android *might* be why the BleedingTooth details haven’t yet been released. Regardless, there are some serious vulnerabilities patched this in this Android update, so make sure to watch for the eventual rollout for your device. Continue reading “This Week In Security: Android Bluetooth RCE, Windows VMs, And HTTPS Everywhere”

The Day The Russians And Americans Met 135 Miles Up

If you watched the original Star Trek series, you’d assume there was no way the Federation would ever work with the Klingons. But eventually the two became great allies despite their cultural differences. There was a time when it seemed like the United States and Russia would never be friends — as much as nations can be friends. Yet today, the two powers cooperate on a number of fronts.

One notable area of cooperation is in spaceflight, and that also was one of the first areas where the two were able to get together in a cooperative fashion, meeting for the first time in orbit, 135 miles up.  The mission also marks the ultimate voyage of the Apollo spacecraft, a return to space for the USSR’s luckiest astronauts, and the maiden flight of NASA’s oldest astronaut. The ability to link US and Soviet capsules in space would pave the way for the International Space Station.  The Apollo-Soyuz mission was nothing if not historic, but also more relevant than ever as more nations become spacefaring. Continue reading “The Day The Russians And Americans Met 135 Miles Up”