With more and more manufacturers moving to USB-C, it seems as though the trusty USB port is getting more and more entrenched. Not that that’s a bad thing, either; having a universal standard like this is great for simplicity and interconnectability. However, if you’re still stuck with USB 2.0 ports on your now completely obsolete one-year-old phone, there’s still some hope that you can at least get rapid charging. [hugatry] was able to manipulate Qualcomm’s rapid charging protocol to enable it to work with any device.
[Mitxela] wanted to build a different kind of mouse, one that worked like an Etch-a-Sketch toy with one X knob and one Y knob. Armed with some rotary encoders and a microcontroller, that shouldn’t be hard. But when you use a pin-limited ATtiny85, you are going to need some tricks.
The encoders put out a two-bit Gray code and close a button when you depress them. Plus you need some pins for the V-USB stack to handle the USB interface. [Mitxela] decided to convert the encoders to output analog voltages using a simple resistor DAC. That would only require two analog inputs, and another anlaog input could read both switches.
One problem: there still wasn’t quite enough I/O. Of course, with AVRs you can always repurpose the reset pin as an analog pin, but you lose the ability to program the device at low voltage. And naturally, there’s a workaround for this too, allowing you to keep the reset pin and still read its analog value. You just have to make sure that value doesn’t go below about 2.5V so the device stays out of reset. Once that was in place, the rest went easy, as you can see in the video below.
[Geeksmithing] wanted to respond to a challenge to build a USB hub using cement. Being a fan of Mario Brothers, a fitting homage is to build a retro-gaming console from cement to look just like your favorite Mario-crushing foe. With a Raspberry Pi Zero and a USB hub embedded in it, [Geeksmithing] brought the Mario universe character that’s a large cement block — the Thwomp — to life.
[Geeksmithing] went through five iterations before he arrived at one that worked properly. Initially, he tried using a 3D printed mold; the cement stuck to the plastic ruining the cement on the face. He then switched to using a mold in liquid rubber (after printing out a positive model of the Thwomp to use when creating the mold). But the foam board frame for the mold didn’t hold, so [Geeksmithing] added some wood to stabilize things. Unfortunately, the rubber stuck to both the foam board and the 3D model making it extremely difficult to get the model out.
Next up was regular silicone mold material. He didn’t have enough silicone rubber to cover the model, so he added some wood as filler to raise the level of the liquid. He also flipped the model over so that he’d at least get the face detail. He found some other silicone and used it to fill in the rest of the mold. Despite the different silicone, this mold worked. The duct tape he used to waterproof the Raspberry Pi, however, didn’t. He tried again, this time he used hot glue – a lot of hot glue! – to waterproof the Pi. This cast was better, and he was able to fire up the Pi, but after a couple of games his controller stopped working. He cracked open the cement to look at the Pi and realized that a small hole in the hot glue caused a leak that shorted out the USB port on the Pi. One last time, he thought, this time he used liquid electrical tape to waterproof the Pi.
The final casting worked and after painting, [Geeksmithing] had a finished cement Thwomp console that would play retro games. He missed the deadline for the USB Hub Challenge, but it’s still a great looking console, and his video has a lot of detail about what went wrong (and right) during his builds. There’s a great playlist on YouTube of the other entries in the challenge, check them out along with [Geeksmithing]’s video below!
The modern human’s worst nightmare: a power outage. Left without cat memes, Netflix, and — of course — Hackaday, there’s little to do except participate in the temporary anarchy that occurs when left without internet access. Lamenting over expensive and bulky uninterruptible power supplies, Youtube user [Gadget Addict] hacked together a UPS power bank that might just stave off the collapse of order in your household.
This simple and functional hack really amounts to snipping the end off of a USB power cable. The cable is then attached to a screw terminal to barrel connector adapter and plugged it into a pass-through power USB power bank. No, really — that’s all there is to it. [Gadget Addict] notes that while most modems and routers are designed to run off a 12V power supply, they still operate at 5V. He goes on to connect several router and router/modem combination units to the power bank. In each case the system appears to boot up and perform normally.
During the development of the greatest member of the Apple II family, the Apple IIgs, someone suggested to [Woz] that a sort of universal serial bus was needed for keyboards, mice, trackballs, and other desktop peripherals. [Woz] disappeared for a time and came back with something wonderful: a protocol that could be daisy-chained from keyboard to a graphics tablet to a mouse. This protocol was easily implemented on a cheap microcontroller, provided 500mA to the entire bus, and was used for everything from license dongles to modems.
The Apple Desktop Bus, or ADB, was a decade ahead of its time, and was a mainstay of the Mac platform until Apple had the courage to kill it off with the iMac. At that time, an industry popped up overnight for ADB to USB converters. Even today, there’s a few mechanical keyboard aficionados installing Teensies in their favorite input devices to give them a USB port.
While plugging an old Apple keyboard into a modern computer is a noble pursuit — this post was written on an Apple M0116 keyboard with salmon Alps switches — sometimes you want to go the other way. Wouldn’t it be cool to use a modern USB mouse and keyboard with an old Mac? That’s what [anthon] thought, so he developed the ADB Busboy.
Here’s a quick DIY hack if you happen to have multiple computers at home or at the office and are tired of juggling mice and keyboards. [Kedar Nimbalkar] — striving for a solution — put together a keyboard, video and mouse switcher that allows one set to control two computers.
A DPDT switch is connected to a female USB port, and two male USB cables — with the ground and 5V wires twisted together and connected to the switch — each running to a PC. [Nimbalkar] suggests ensuring that the data lines are correctly wired, and testing that the 5V and ground are connected properly. He then covered the connections with some hot glue to make it a little more robust since it’s about to see a lot of use.
Now all that’s needed is a quick press of the button to change which PC you are working on, streamlining what can be a tedious changeover — especially useful if you have a custom keyboard you want to use all the time.
One morning, a balaclava-wearing hacker walks into your office. You assume it’s a coworker, because he’s wearing a balaclava. The hacker sticks a USB drive into a computer in the cube next door. Strange command line tools show up on the screen. Minutes later, your entire company is compromised. The rogue makes a quick retreat carrying a thumb drive in hand.
This is the scenario imagined by purveyors of balaclavas and USB Rubber Duckys, tiny USB devices able to inject code, run programs, and extract data from any system. The best way — and the most common — to prevent this sort of attack is by filling the USB ports with epoxy. [pmsosa] thought there should be a software method of defense against these Rubber Duckys, so he’s created Duckhunter, a small, efficient daemon that can catch and prevent these exploits.
The Rubber Ducky attack is simply opening up a command line and spewing an attack from an emulated USB HID keyboard. If the attacker can’t open up cmd or PowerShell, the attack breaks. That’s simple enough to code, but [pmsosa] has a few more tricks up his sleeve. Duckhunter has a ‘sneaky’ countermeasure feature, where one out of every 5-7 keystrokes is blocked. To the attacker, the ‘sneaky’ countermeasure makes it look like the attack worked, where in fact it failed spectacularly.
There are a number of different attacks similar to what the Rubber Ducky can accomplish. Mousejack performs the same attack over Bluetooth. BadUSB is a little more technical, allowing anyone with access to a device’s firmware to turn your own keyboard against you. Because of the nature of the attack, Duckhunter shuts them all down.
Right now the build is only for Windows, but according to [pmsosa]’s GitHub there will be Linux and OS X versions coming.