USB Reverse Engineering: A Universal Guide

Every hacker knows what it is to venture down a rabbit hole. Whether it lasts an afternoon, a month, or decades, finding a new niche topic and exploring where it leads is a familiar experience for Hackaday readers.

[Glenn ‘devalias’ Grant] is a self-proclaimed regular rabbit hole diver and is conscious that, between forays into specific topics, short-term knowledge and state of mind can be lost. This time, whilst exploring reverse engineering USB devices, [Glenn] captured the best resources, information and tools – for his future self as well as others.

His guide is impressively comprehensive, and covers all the necessary areas in hardware and software. After formally defining a USB system, [Glenn] refers us to [LinuxVoice], for a nifty tutorial on writing a linux USB driver for an RC car, in Python. Moving on to hardware, a number of open-source and commercial options are discussed, including GoodFET, FaceDancer, and Daisho – an FPGA based monitoring tool for analysing USB 3.0, HDMI and Gigabit Ethernet. If you only need to sniff low speed USB, here’s a beautifully small packet snooper from last year’s Hackaday prize.

This is a guide which is well-informed, clearly structured, and includes TL;DR sections in the perfect places. It gives due credit to LibUSB and PyUSB, and even includes resources for USB over IP.

If you’re worried about USB hacks like BadUSB, perhaps you should checkout GoodUSB – a hardware firewall for USB devices.

Header image: Ed g2s (CC-SA 3.0).

 

Dig Into The Apple Device Design Guide

Millions of people worldwide have just added new Apple gadgets to their lives thanks to the annual end of December consumerism event. Those who are also Hackaday readers are likely devising cool projects incorporating their new toys. This is a good time to remind everybody that Apple publishes information useful for such endeavors: the Accessory Design Guidelines for Apple Devices (PDF).

This comes to our attention because [Pablo] referenced it to modify an air vent magnet mount. The metal parts of a magnetic mount interferes with wireless charging. [Pablo] looked in Apple’s design guide and found exactly where he needed to cut the metal plate in order to avoid blocking the wireless charging coil of his iPhone 8 Plus. What could have been a tedious reverse-engineering project was greatly simplified by Reading The… Fine… Manual.

Apple has earned its reputation for hacker unfriendliness with nonstandard fasteners and liberal use of glue. And that’s even before we start talking about their digital barriers. But if your project doesn’t involve voiding the warranty, their design guide eliminates tedious dimension measuring so you can focus on the fun parts.

Dimensioned drawing of Apple iPad Pro

This guide is packed full of dimensioned drawings. A cursory review shows that they look pretty good and aren’t terrible at all. Button, connector, camera, and other external locations make this an indispensable tool for anyone planning to mill or print an interface for any of Apple’s hardware.

So let’s see those projects! Maybe a better M&M sorter. Perhaps a time-lapse machine. Or cure your car’s Tesla envy and put a well-integrated iPad into the dashboard.

A Detailed Guide For 3D Printing Enclosures

We’ve all have projects that are done, but not complete. They work, but they’re just a few PCBs wired together precariously on our desks. But fear not! A true maker’s blog has gifted us with a detailed step-by-step guide on how to make a project enclosure.

Having purchased an MP Select Mini 3D Printer, there was little to do but find something practical to print. What better than an enclosure for a recently finished Time/Date/Temperature display Arduino based device?

The enclosure in this guide, while quite nice, isn’t the main attraction here. The real feature is the incredibly detailed instructions for how to design, model and print an enclosure for any project. For the veterans out there, it seems simple. Sketch something on the back of a napkin and take a nap on your keyboard with OpenSCAD open. When you wake, BAM: perfect 3D model. However, for newcomers, the process can seem daunting. With incredibly specific instructions (an example is “Open up a new workspace by clicking CREATE NEW DESIGN,” notice the accurate capitalization!), it should ease the barrier of the first enclosure, turning the inexperienced into the kind-of-experienced.

If you’ve been printing enclosures since the dawn of time or plastic simply isn’t your style, boy, do we have you covered. Why not check out FR4 (aka PCB) enclosures? Or what about laser cut enclosures from eagle files? Maybe two-piece boxes are more your thing.

Garage Distance Sensor Kicks Tennis Ball To Curb

Those with small garages might be familiar with the method of hanging a tennis ball from a ceiling to make sure they don’t hit the back wall with their car. If the car isn’t in the garage, though, the tennis ball dangling from a string tends to get in the way. To alleviate this problem, [asaucet] created a distance sensor that can tell him when his car is the perfect distance from the garage wall.

At the heart of the distance sensor is an HC-SR04 ultrasonic rangefinder and a PIC16F88 microcontroller. [asaucet] uses a set of four LEDs to alert the driver how close they are to the garage wall. [asaucet] also goes into great detail about how to use an LCD with this microcontroller for setting up the project, and the amount of detail should be enough to get anyone started on a similar project.

While this isn’t a new idea, the details that [asaucet] goes into in setting up the microcontroller, using the distance sensor, and using an LCD are definitely worth looking into. Even without this exact application in mind, you’re sure to find some helpful information on the project page.

Continue reading “Garage Distance Sensor Kicks Tennis Ball To Curb”

Bessel Filter Design

Once you fall deep enough into the rabbit hole of any project, specific information starts getting harder and harder to find. At some point, trusting experts becomes necessary, even if that information is hard to find, obtuse, or incomplete. [turingbirds] was having this problem with Bessel filters, namely that all of the information about them was scattered around the web and in textbooks. For anyone else who is having trouble with these particular filters, or simply wants to learn more about them, [turingbirds] has put together a guide with all of the information he has about them.

For those who don’t design audio circuits full-time, a Bessel filter is a linear, passive bandpass filter that preserves waveshapes of signals that are within the range of the filter’s pass bands, rather than distorting them in some way. [turingbirds]’s guide goes into the foundations of where the filter coefficients come from, instead of blindly using lookup tables like he had been doing.

For anyone else who uses these filters often, this design guide looks to be a helpful tool. Of course, if you’re new to the world of electronic filters there’s no reason to be afraid of them. You can even get started with everyone’s favorite: an Arduino.

Life On Contract: How To Have A Meeting

Meetings can actually be useful. It’s hard to believe, but they can actually save time if done right. While most of us are in a perpetual state of torture by Kevin in marketing holding another three-hour meeting during lunch hours, there are a few of us who know their hidden power when put in the right hands.

Working as a contractor, wasted meetings mean wasted billable hours. Even wasted meeting time is covered in the cost of the contract it runs the risk of giving the client the impression that you’re not as productive as originally thought. Organized, productive meetings show that you know what you’re doing and that the cost of your services as a whole is a good value. Yeah, some meetings suck but they are necessary and should be productive.

A meeting needs three things to be worth the time spent on it.

  1. A well prepared for, simple, and clear agenda.
  2. A time limit.
  3. Something needs to be written down at the end of it.

I’ll start with the third item as it shapes the rest. The point of a meeting is to have something to write down at the end of the meeting. Any meeting that ends up in anything requiring fallible human memory was a waste of everyone’s time. This includes, verbal agreements, handshake agreements, ideating (pronounced idioting), brainstorming, think tanking, and the like.

Continue reading “Life On Contract: How To Have A Meeting”

Diodes With Hats: Zener And Schottky

For beginners, diode types can sometimes be a bit of mental gymnastics. If all it does is act like a magic pixie check valve, why are there so many kinds? Schottky diodes are typically  hard to mentally set apart from the standard when described by a data sheet. Zener diodes can be downright baffling for beginners, especially when mistakenly thrown in a circuit in place of a regular 1N4001. [Afrotechmods] put together a great video explaining their difference and use cases.

In both videos he does an excellent job of describing the pros and cons while setting up experiments to exhibit each. For the Schottky it’s the faster switching and lower voltage drop. For Zener it’s less about the cons and more about exploiting its strange configuration for voltage clamps, regulators, and making expensive guitars sound bad with audio distortion circuits.

He finishes both videos with good design tips for selecting and using the parts as a burgeoning circuit designer. Diode data sheets should be less of a mystery afterwards.

Continue reading “Diodes With Hats: Zener And Schottky”