“Reversing Shorts” Demystify Phone Security

Ever wonder what makes a cellphone’s operating system secure, or what that app you just installed is saying about you behind your back? In a brand new video series, [Jiska] gives us a peek into different topics in smartphone software reverse engineering.

For instance, her latest video, embedded below takes us through some steps to poke at Apple’s RTKit OS, which is the realtime OS that runs inside most of their peripheral devices, including AirPods, but also on their bigger devices too.  We don’t know much about RTKit OS, but [Jiska]’s trick in this video is to get a foothold by looking through two different RTKit OS versions and noting which symbols are common — these are probably OS function names. Now you’ve got something to look for.

Each of the videos is short, to the point, and contains nice tips for perhaps the intermediate-to-advanced reverser who is looking to get into phones. Heck, even if you’re not, her demonstrations of the Frida dynamic tracing tool are worth your time.

And if you want a longer introduction into the internals of cellphones, we heartily recommend her talk, “All Wireless Stacks Are Broken“.

Continue reading ““Reversing Shorts” Demystify Phone Security”

Bare-Metal STM32: Setting Up And Using SPI

The Serial Peripheral Interface (SPI) interface was initially standardized by Motorola in 1979 for short-distance communication in embedded systems. In its most common four-wire configuration, full-duplex data transfer is possible on the two data (MOSI, MISO) lines with data rates well exceeding 10 Mb/s. This makes SPI suitable for high-bandwidth, full-duplex applications like SD storage cards and large resolution, high-refresh displays.

STM32 devices come with a variable number of SPI peripherals, two in the F042 at 18 Mb/s and five in the F411. Across the STM32 families, the SPI peripheral is relatively similar, with fairly minor differences in the register layout. In this article we’ll look at configuring an SPI peripheral in master mode.

Continue reading “Bare-Metal STM32: Setting Up And Using SPI”

Get Clear Insights Into Cloudy Water With The Open Colorimeter

A basic scientific tool for chemistry and biology is a colorimeter device used to measure which wavelengths of light a particular sample solution absorbs. Some applications of colorimeters are measuring pH or chlorine levels, measuring pollutants, such as oil or pesticides, and, in some cases, can even be used to measure RNA/DNA concentrations. Even most washing machines today have a specialized colorimeter sensor, of sorts, to measure turbidity (cloudiness) to provide feedback on the cleaning process. To help in building your home scientific lab, [IORodeo] has released an Open Colorimeter.

A blown out diagram of the Open Colorimeter showing the 3d enclosure, the PyBadge, the LED board and sensor along with text describing each element

The Open Colorimeter is a self-contained device that accepts cuvettes filled with liquids for testing. The basic structure is an LED mounted onto a board that shines through the cuvette filled with a sample that is then measured at the other end by a TSL2591 color sensor. The Open Colorimeter has separate specialized LED boards for a range of wavelengths from 470nm to 630nm and incorporates a PyBadge that serves as the main microcontroller, as well as display and input.

[IORodeo] has done extensive documentation on the assembly, usage, and testing of the device. They have also provided protocols for the measurement of Ammonia, Nitrate, Nitrite, and Phosphates in addition to providing resources for absorption profiles of many other substances. All files relating to the 3D enclosure, firmware source code, schematics and Gerbers are provided under an open source hardware compatible license. For those not wanting to build it themselves, [IORodeo] is offering them for sale.

This isn’t the first time we’ve featured colorimeters, with some building a DIY version and others using it in a Tricorder project. The Open Colorimeter is a nice addition to this list and is ready for hacking and extending!

Dancers Now Help Power Glasgow Nightclub

Humanity thus far has supplied most of its electricity needs by burning stuff, mostly very old stuff that burns great but is hard to replace. That stuff is getting increasingly expensive, and the pollution is a bother too, so renewable sources of energy are becoming more popular.

While wind or solar power are commonly used at the grid level, one Glasgow nightclub has taken a different tack. It’s capturing energy from its patrons to help keep the lights on.

Continue reading “Dancers Now Help Power Glasgow Nightclub”

How The Image-Generating AI Of Stable Diffusion Works

[Jay Alammar] has put up an illustrated guide to how Stable Diffusion works, and the principles in it are perfectly applicable to understanding how similar systems like OpenAI’s Dall-E or Google’s Imagen work under the hood as well. These systems are probably best known for their amazing ability to turn text prompts (e.g. “paradise cosmic beach”) into a matching image. Sometimes. Well, usually, anyway.

‘System’ is an apt term, because Stable Diffusion (and similar systems) are actually made up of many separate components working together to make the magic happen. [Jay]’s illustrated guide really shines here, because it starts at a very high level with only three components (each with their own neural network) and drills down as needed to explain what’s going on at a deeper level, and how it fits into the whole.

Spot any similar shapes and contours between the image and the noise that preceded it? That’s because the image is a result of removing noise from a random visual mess, not building it up from scratch like a human artist would do.

It may surprise some to discover that the image creation part doesn’t work the way a human does. That is to say, it doesn’t begin with a blank canvas and build an image bit by bit from the ground up. It begins with a seed: a bunch of random noise. Noise gets subtracted in a series of steps that leave the result looking less like noise and more like an aesthetically pleasing and (ideally) coherent image. Combine that with the ability to guide noise removal in a way that favors conforming to a text prompt, and one has the bones of a text-to-image generator. There’s a lot more to it of course, and [Jay] goes into considerable detail for those who are interested.

If you’re unfamiliar with Stable Diffusion or art-creating AI in general, it’s one of those fields that is changing so fast that it sometimes feels impossible to keep up. Luckily, our own Matthew Carlson explains all about what it is, and why it matters.

Stable Diffusion can be run locally. There is a fantastic open-source web UI, so there’s no better time to get up to speed and start experimenting!

DIY Bike Wheels Welded With Rebar

[Liebregts] is working on a trike design, and needed a pair of wheels to go up front. Regular bicycle wheels wouldn’t do, as they’re not designed to work with a single-sided support. They also wanted to be able to mount disc brakes. Thus, they set about building a set of custom wheels to do the job.

The build began with a regular set of 20″ bike wheel rims with all the spokes taken out. A ring of steel rebar welded on the inner perimeter gave the rims more strength. A set of hubs and axles were then fabbed up with a welder and lathe, with provisions for bolting on disc brake components. Lengths of rebar were then welded in as non-adjustable spokes. Next, it was time for a coat of paint. Finally [Liebregts] mounted the tires and brakes, and called the job done.

Obviously, it is possible to buy wheels specifically for trike builds. However, [Liebregts] found it difficult to find exactly what they wanted, particularly where the disc brake option was concerned. The best option was a custom build.  The resulting wheels are obviously much heavier than traditional bike wheels, but they’re also likely a fair bit stronger, too. If you need to weigh down a tarpaulin, for example, these wheels might just do the trick.

We’ve seen some other crazy wheels on trikes before, too! Oh, and who says wheels need to be a full circle, anyway? Creativity will never cease to amaze!

Arduino hearing test device overview

DIY Arduino Hearing Test Device

Hearing loss is a common problem for many – especially those who may have attended too many loud concerts in their youth. [mircemk] had recently been for a hearing test, and noticed that the procedure was actually quite straightforward. Armed with this knowledge, he decided to build his own test system and document it for others to use.

audiogram showing the results of the arduino hearing test device
Resultant audiogram from the device showing each ear in a different color

By using an Arduino to produce tones of various stepped frequencies, and gradually increasing the volume until the test subject can detect the tone, it is possible to plot an audiogram of hearing threshold sensitivity.  Testing each ear individually allows a comparison between one side and the other.

[mircemk] has built a nice miniature cabinet that holds an 8×8 matrix of WS2812 addressable RGB LEDs.  A 128×64 pixel OLED display provides user instructions, and a rotary encoder with push-button serves as the user input.

Of course, this is not a calibrated professional piece of test equipment, and a lot will depend on the quality of the earpiece used.  However, as a way to check for gross hearing issues, and as an interesting experiment, it holds a lot of promise.

There is even an extension, including a Class D audio amplifier, that allows the use of bone-conduction earpieces to help narrow down the cause of hearing loss further.

There’s some more information on bone conduction here, and we’ve covered an intriguing optical stimulation cochlear implant, too.

Continue reading “DIY Arduino Hearing Test Device”