Once relegated to the proverbial Linux loving Firefox user, ad blocking has moved into public view among increased awareness of privacy and the mechanisms of advertising on the internet. At the annual family gathering, when That Relative asks how to setup their new laptop, we struggle through a dissertation on the value of ad blockers and convince them to install one. But what about mediums besides the internet? Decades ago Tivo gave us one button to jump through recorded TV. How about the radio? If available, satellite radio may be free of The Hated Advertisement. But terrestrial radio and online streams? [tomek] wasn’t satisfied with an otherwise sublime experience listening streaming Polish Radio Three and decided to build a desktop tool to detect and elide ads from the live audio stream.
[tomek] was aware of this hip knowledge domain called Digital Signal Processing but hadn’t done any of it themselves. Like many algorithmic problems the first step was to figure out the fastest way to bolt together a prototype to prove a given technique worked. We were as surprised as [tomek] by how simple this turned out to be. Fundamentally it required a single function – cross-correlation – to measure the similarity of two data samples (audio files in this case). And it turns out that Octave provides it in the box. After snipping the start-of-ad jingle out of a sample file and comparing it to a radio program [tomek] got the graph at the left. The conspicuous spike is the location of the jingle in the audio file.
At this point all that was left was packaging it all into a one click tool to listen to the radio without loading an entire analysis package. Conveniently Octave is open source software, so [tomek] was able to dig through its sources until they found the bones of the critical xcorr() function. [tomek] adapted their code to pour the audio into a circular buffer in order to use an existing Java FFT library, and the magic was done. Piping the stream out of ffmpeg and into the ad detector yielded events when the given ad jingle samples were detected.
[tomek] packaged that tool into a standalone executable, but the gem here is the followup post. After removing ads in the online stream they adapted a RaspberryPi to listen to an FM receiver and remote control their Yamaha tuner over the network. So when the tuner is playing Radio Three the Pi notices and ducks the audio appropriately to avoid those pesky ads. Video of this after the break.
Continue reading “Cross-Correlation Makes Quick Work Of Ads”
Chances are you have at least one radio that can receive FM stations. Even though FM is becoming less used now with Internet and satellite options, it still is more popular than the older AM radio bands. FM was the brainchild of an inventor you may have heard of — Edwin Armstrong — but you probably don’t know the whole story. It could make a sort of radio-themed soap opera. It is a story of innovation, but also a story of personal vanity, corporate greed, stubbornness, marital problems, and even suicide. The only thing missing is a long-lost identical twin sibling to turn it into a full telenovela.
Armstrong grew up in New York and because of an illness that gave him a tic and caused him to be homeschooled, he was somewhat of a loner. He threw himself into his interest in electric and mechanical devices. By 1909 he was enrolled in Columbia University where professors noted he was very focused on what interested him but indifferent to other studies. He was also known as someone more interested in practical results than theory. He received an electrical engineering degree in 1913.
Unlike a lot of college graduates, Armstrong didn’t go work for a big firm. Instead, he set up a self-financed independent lab at Columbia. This sounded good because it meant that he would own the patents on anything invented there. But it would turn out to be a two-edged sword.
Continue reading “Edwin Armstrong’s Battle for FM Radio”
The phase locked loop, or PLL, is a real workhorse of circuit design. It is a classic feedback loop where the phase of an oscillator is locked to the phase of a reference signal using an error signal in the same basic way that perhaps a controller would hold a temperature or flow rate in a physical system. That is, a big error will induce a big change and little errors induce little changes until the output is just right. [The Offset Volt] has a few videos on PLLs that will help you understand their basic operation, how they can multiply frequencies (paradoxically, by dividing), and even demodulate FM radio signals. You can see the videos below.
The clever part of a PLL can be found in how it looks at the phase of two signals. For signals to be totally in phase, they must be at the same frequency and also must ebb and peak at the same point. It should be clear that if the frequency isn’t the same the ebbs and peaks can’t line up for any length of time. By detecting how much the signals don’t line up, an error voltage can be generated. That error voltage is used to adjust the output oscillator so that it matches the reference oscillator.
Of course, it wouldn’t be very interesting if the output frequency had to be the same as the reference frequency. The clever trick comes by dividing the output frequency. For example, a 100 MHz crystal oscillator is difficult to design. But taking a voltage-controlled oscillator at 100 MHz (nominal) and dividing its output by 100 will give you a signal you can lock to a 1 MHz crystal oscillator which is, of course, trivial to build.
Continue reading “Learn Something About Phase Locked Loops”
Taking a vintage radio and cramming it full of modern, Internet-connected, guts has long been a staple of the hacking and making scene. While some might see it as a crime to take what’s arguably a legitimate piece of history and turn it into nothing more than a slipshod case for the Raspberry Pi, we have to admit there’s a certain appeal to the idea. Taking the beauty of classic design and pairing it with more modern capabilities is getting the best of both worlds.
But this project by [Nick Koumaris] is a somewhat unique take on the concept. Rather than sacrificing a real vintage piece of hardware to house the electronics, he’s designed a 3D printable case that looks like a classic 1936 AWA Radiolette. But what’s really interesting to us is that he then puts a basic FM radio inside of it.
That’s right, no Internet radio streaming or smartphone Bluetooth compatibility here. It’s just a regular FM radio, not entirely unlike the kind of hardware you’d expect to be inside of a classic radio. Of course, it’s much more modern, and [Nick] actually built it himself from a TEA5767 FM radio module and an Arduino Pro Mini.
While functionally it might not be terribly exciting, we do appreciate that he went through the trouble to make a vintage-looking user interface for the radio. While physical buttons would arguably have been more appropriate given the era, the art deco inspired font and graphics that show on the device’s Nokia 5110 LCD do look really slick.
Purists will surely be happy to see another project where a piece of vintage piece of audio equipment wasn’t sacrificed at the Altar of Hack, but we’ve also played host to many projects which weren’t nearly as concerned with historical preservation.
Continue reading “Art Deco Radio Gets FM Reception”
Inspiration can come from many places. When [Veronica Valeros] and [Sebastian Garcia] from the MatesLab Hackerspace in Argentina learned that it took [Ai Weiwei] four years to discover his home had been bugged, they decided to have a closer look into some standard audio surveillance devices. Feeling there’s a shortage of research on the subject inside the community, they took matters in their own hands, and presented the outcome in their Spy vs. Spy: A modern study of microphone bugs operation and detection talk at 34C3. You can find the slides here, and their white paper here.
Focusing their research primarily on FM radio transmitter devices, [Veronica] and [Sebastian] start off with some historical examples, and the development of such devices — nowadays available off-the-shelf for little money. While these devices may be shrugged off as a relic of Soviet era spy fiction and tools of analog times, the easy availability and usage still keeps them relevant today. They conclude their research with a game of Hide and Seek as real life experiment, using regular store-bought transmitters.
An undertaking like this would not be complete without the RTL-SDR dongle, so [Sebastian] developed the Salamandra Spy Microphone Detection Tool as alternative for ready-made detection devices. Using the dongle’s power levels, Salamandra detects and locates the presence of potential transmitters, keeping track of all findings. If you’re interested in some of the earliest and most technologically fascinating covert listening devices, there is no better example than Theremin’s bug.
Continue reading “34C3: Microphone Bugs”
[Eric Brasseur] built a radio-detecting snake that consists of a LED that lights up when around reasonably strong radio waves. Near an FM radio mast you’ll find a huge amount of waste energy being dumped out in the 88 to 108 MHz range.
[Eric]’s rig consists of a pair of 1N6263 Schottky diodes, flip-flopped with one set of ends soldered to the antenna and the other ends soldered to the leads of the LED with about a foot of wire in between. The antenna can be a single wire as the diodes are soldered together. This one is around 4 feet in length for a total length of around 160 cm or a little over 5 feet. He went with a red LED just to give it a greater chance of being seen when illuminated by a distant or weak source of radio waves.
Hackaday loves its radio hacks; check out our posts on improving WiFi throughput with FM radio and building a modern DIY FM radio.
NRSC-5 is a high-definition radio standard, used primarily in the United States. It allows for digital and analog transmissions to share the original FM bandwidth allocations. Theori are a cybersecurity research startup in the US, and have set out to build a receiver that can capture and decode these signals for research purposes, and documented it online.
Their research began on the NRSC website, where the NRSC-5 standard is documented, however the team notes that the audio compression details are conspicuously missing. They then step through the physical layer, multiplexing layer, and finally the application layer, taking apart the standard piece by piece. This all culminates in the group’s development of an open-source receiver for NRSC-5 that works with RTL-SDR – perhaps the most ubiquitous SDR platform in the world.
The group’s primary interest in NRSC-5 is its presence in cars as a part of in-car entertainment systems. As NRSC-5 allows data to be transmitted in various formats, the group suspects there may be security implications for vehicles that do not securely process this data — getting inside your car through the entertainment system by sending bad ID3 tags, for instance. We look forward to seeing results of this ongoing research.
[Thanks to Gary McMaster for the tip!]