Firefox logo displayed on screen

Add WebUSB Support To Firefox With A Special USB Device

RP2040-based Pico board acting as U2F dongle with Firefox. (Credit: ArcaneNibble, GitHub)
RP2040-based Pico board acting as U2F dongle with Firefox. (Credit: ArcaneNibble, GitHub)

The WebUSB standard is certainly controversial. Many consider it a security risk, and, to date,  only Chromium-based browsers support it. But there is a workaround that is, ironically, supposed to increase security. The adjacent Universal 2nd Factor (U2F) standard also adds (limited) USB support to browsers. Sure, this is meant solely to support U2F USB dongles for two-factor authentication purposes, but as [ArcaneNibble] demonstrates using U2F-compatible firmware on a Raspberry Pi RP2040, by hijacking the U2F payload, this API can be used to provide WebUSB-like functionality.

Continue reading “Add WebUSB Support To Firefox With A Special USB Device”

Piggyback Board Brings Touch Sensing To USB Soldering Iron

The current generation of USB-powered soldering irons have a lot going for them, chief among them being portability and automatic start and stop. But an iron that turns off in the middle of soldering a joint is a problem, one that this capacitive-touch replacement control module aims to fix.

The iron in question is an SJ1 from Awgem, which [DoganM95] picked up on Ali Express. It seems well-built, with a sturdy aluminum handle, a nice OLED display, and fast heat-up and cool-down. The problem is that the iron is triggered by motion, so if you leave it still for more than a second or two, such as when you’re soldering a big joint, it turns itself off. To fix that,[DoganM95] designed a piggyback board for the OEM controller with a TTP223 capacitive touch sensor. The board is carefully shaped to allow clearance for the existing PCB components and the heater cartridge terminals, and has castellated connections so it can connect to pads on the main board. You have to remove one MOSFET from the main board, but that’s about it for modifications. A nickel strip makes contact with the inside of the iron’s shell, turning it into the sensor plate for the TTP223.

[DoganM95] says that the BA6 variant of the chip is the one you want, as others have a 10-second timeout, which would defeat the purpose of the mod. It’s a very nice bit of design work, and we especially like how the mod board nests so nicely onto the OEM controller. It reminds us a little of those Quansheng handy-talkie all-band mods.

Linux Fu: USB Everywhere

It is a common problem: I have a USB device on a computer out in the shop, and I want to use it from the comfort of my office. What to do? Well, you could remote desktop into the distant machine. But, honestly, I always find any remote desktop more than ssh clunky and somewhat undesirable. Fortunately, Linux can do virtually anything if you only know how to do it. So, this time, I’ll show you how to transport a USB device over your network. Of course, I have a network that reaches out to the shop. It should be a simple matter to tell my desktop machine that one of its USB devices lives across the network. Well, it wasn’t that simple, but it is doable.

The Tools

The whole thing involves a program called usbip. That should be the end of it, but of course, it isn’t. In order for this to work, both machines on the network will need some kernel modules and a daemon on the server: the machine with the USB devices to share.

You may be able to install usbip from your package manager. On Ubuntu, it is in the linux-tools-common package, so a simple apt-get might give you everything you need. I wasn’t so lucky. Continue reading “Linux Fu: USB Everywhere”

Hackaday Podcast Episode 309: Seeing WiFi, A World Without USB, Linux In NES In Animal Crossing

This week Hackaday Editors Elliot Williams and Tom Nardi start things off with updates on the rapidly approaching Hackaday Europe and the saga of everyone’s favorite 3D printed boat.

From there they’ll cover an impressive method of seeing the world via WiFi, Amazon’s latest changes to the Kindle ecosystem, and an alternate reality in which USB didn’t take over the peripheral world. You’ll also hear about a multi-level hack that brings the joys of Linux into the world of Animal Crossing, 3D printed circuit components, and the imminent release of KiCAD 9.

Stick around until the end to learn about a unique hardened glass from East Germany and the disappointing reality of modern voice control systems.

Download the DRM-free MP3 for safe keeping.

Continue reading “Hackaday Podcast Episode 309: Seeing WiFi, A World Without USB, Linux In NES In Animal Crossing”

In A World Without USB…

It is easy to forget that many technology juggernauts weren’t always the only game in town. Ethernet seems ubiquitous today, but it had to fight past several competing standards. VHS and Blu-ray beat out their respective competitors. But what about USB? Sure, it was off to a rocky start in the beginning, but what was the real competition at that time? SCSI? Firewire? While those had plusses and minuses, neither were really in a position to fill the gap that USB would inhabit. But [Ernie Smith] remembers ACCESS.bus (or, sometimes, A.b) — what you might be using today if USB hadn’t taken over the world.

Back in the mid-1980s, there were several competing serial bus systems including Apple Desktop Bus and some other brand-specific things from companies like Commodore (the IEC bus) and Atari (SIO). The problem is that all of these things belong to one company. If you wanted to make, say, keyboards, this was terrible. Your Apple keyboard didn’t fit your Atari or your IBM computer. But there was a very robust serial protocol already in use — one you’ve probably used yourself. IIC or I2C (depending on who you ask).

Continue reading “In A World Without USB…”

USB Stick Hides Large Language Model

Large language models (LLMs) are all the rage in the generative AI world these days, with the truly large ones like GPT, LLaMA, and others using tens or even hundreds of billions of parameters to churn out their text-based responses. These typically require glacier-melting amounts of computing hardware, but the “large” in “large language models” doesn’t really need to be that big for there to be a functional, useful model. LLMs designed for limited hardware or consumer-grade PCs are available now as well, but [Binh] wanted something even smaller and more portable, so he put an LLM on a USB stick.

This USB stick isn’t just a jump drive with a bit of memory on it, though. Inside the custom 3D printed case is a Raspberry Pi Zero W running llama.cpp, a lightweight, high-performance version of LLaMA. Getting it on this Pi wasn’t straightforward at all, though, as the latest version of llama.cpp is meant for ARMv8 and this particular Pi was running the ARMv6 instruction set. That meant that [Binh] needed to change the source code to remove the optimizations for the more modern ARM machines, but with a week’s worth of effort spent on it he finally got the model on the older Raspberry Pi.

Getting the model to run was just one part of this project. The rest of the build was ensuring that the LLM could run on any computer without drivers and be relatively simple to use. By setting up the USB device as a composite device which presents a filesystem to the host computer, all a user has to do to interact with the LLM is to create an empty text file with a filename, and the LLM will automatically fill the file with generated text. While it’s not blindingly fast, [Binh] believes this is the first plug-and-play USB-based LLM, and we’d have to agree. It’s not the least powerful computer to ever run an LLM, though. That honor goes to this project which is able to cram one on an ESP32.

Continue reading “USB Stick Hides Large Language Model”

Adding USB-C (Kinda) To A PowerMac G4

For those who’ve never bitten the Apple, the PowerMac G4 was a blue-tinted desktop Macintosh offered from 1999 to 2004. At the time, the machines were plenty fast — being advertised as the first “personal supercomputer” when they hit the market. But Father Time is particularly harsh on silicon, so they’re properly archaic by modern standards.

As such, the rear panel of one of these machines is hardly where you’d expect to run into a functional USB-C port. But thanks to the efforts of [Dandu], old has officially met new. Critics will note that it’s not real USB-C, and instead uses USB 2.0 with the more modern connector. That’s true, but considering how many commercial devices we run into that are still using the same trick, we’ll give it a pass.

Continue reading “Adding USB-C (Kinda) To A PowerMac G4”