two USBValve devices on a table, both with a USB cable plugged in. The top one with a long narrow OLED display and the bottom one with a 128x64 OLED display.

Sleuth Untrusted USB Communication With USBValve

USB devices are now ubiquitous and, from an information security standpoint, this is a terrifying prospect as malicious software can potentially be injected into a system by plugging in a compromised USB stick. To help get some piece of mind, [Cesare Pizzi] created USBValve to help expose suspicious USB activity on the fly.

The idea behind USBValve is to have the onboard microcontroller advertise itself as a storage device, pretending to have a filesystem with some common files available. When an unknown USB device is first inserted into the USB port on the USBValve tool, USBValve displays usage information, via the attached OLED screen, on whether the USB device is accessing files it shouldn’t be or immediately trying to write to the filesystem, which is a clear sign of malicious behavior.

The USBValve hardware is a straight forward composition of a Raspberry Pi Pico, an tiny I2C OLED screen and an optional PCB carrier board with a 3D printed spacer. The software uses Adafruit’s Tiny USB library along with the SSD1306AsciiWire library to drive the OLED display. And it’s all open source, including the code and PCB design files.

There’s a lot of security fun to be had with USB, from DIY dirt cheap Rubber Duckies to open source hardware Rubber Duckies, to discussions on the BadUSB exploits. The simplicity of the USBValve project allows it to be low cost, easy to use and can provide concise, critical information for a variety of real world threats.

After the break, be sure to check out [Cesare Pizzi]’s talk about USBValve at the SCC Insomnihack conference which has a wealth of information on how it fares against some known malware attacks, discussions on some of its shortcomings and potential avenues for improvement.

Thanks to [watchdog] for the tip!

Continue reading “Sleuth Untrusted USB Communication With USBValve”

PicoDebugger Makes Development Easier

Debugging a Raspberry Pi Pico is straightforward enough; it simply involves hooking up something up to the USB and SWD pins. [Mark Stevens] whipped up the PicoDebugger to make this job easier than ever before.

The Raspberry Pi Foundation developed the Picoprobe system to allow a RP2040 to act as a USB to SWD and UART bridge for debugging another Pico or RP2040. The problem is that hooking it up time and time again can be fussy and frustrating.

To get around this, [Mark] whipped up the PicoDebugger board, which directly connects most of the important pins for you. Drop a Pico into the “Target” slot, and you can hook up the PicoDebugger to its UART lines with the flick of a DIP switch. The SWD pins can then also be connected via jumpers if so desired.  It also features a 2×20-pin header to allow the target to be wired into other hardware as necessary.

It’s a neat project, and it certainly beats running a bird’s nest of jumper wires every time you want to debug a Pico project. Simply dropping a board in is much more desirable.

We’ve seen some other neat debug tools over the years, too. If you’ve got your own development productivity hacks in the works, don’t hesitate to let us know!

Picopad Is A New Open Source Game Console

Microcontrollers are so powerful these days that you can build color handheld games with them that match or exceed what you’d ever get on the Game Boys and Game Gears of yesteryear. The Picopad aims to offer just this, in an open-source hackable format that’s friendly to experimenters.

As you might have guessed from the name, the Picopad is based on the Raspberry Pi Pico and its RP2040 microcontroller. It features four face buttons and a D-pad, along with a small color LCD with a 320×240 resolution. There is also a microSD slot upon which programs can be stored, and also an expansion port with headers for a variety of IO from the RP2040 itself including both GPIOs, serial, I2C and analog input pins. The housing is constructed out of PCBs, with some cheerful gaming artwork adding a fun aesthetic. Development is via a custom C SDK, with support for Micropython as well.

If you want to build your own and don’t fancy starting from scratch, kits are available online. We’ve seen some other great gaming experiments with the Raspberry Pi Pico before, too, like an open-world 3D game and ZX Spectrum emulators. Video after the break.

Continue reading “Picopad Is A New Open Source Game Console”

A BASIC Interpreter For The Raspberry Pi Pico

It’s pretty easy to program the Raspberry Pi Pico in Python, or you can use C or C++ if you so desire. However, if you fancy the easy language of yesteryear, you might like PiccoloBASIC from [Gary Sims].

Putting it simply, piccoloBASIC is a BASIC interpreter that runs on the Raspberry Pi Pico. It features all the good bits of BASIC such as GOTO and GOSUB commands, that fancier languages kind of look down upon. It’s also got enough built-in routines to handle regular programming life, like sleeps, delays, a basic pseudorandom number source, trigonometric functions, and the ability to deal with floating point numbers. As far as microcontroller tasks go, it’s got rudimentary support for talking to GPIOs right now via the pinon and pinoff commands. However, it’s probably not the way to go if you want to bit-bang an SD card to within an inch of its speed rating.

Down the road, [Gary] hopes to add support for features like the Pico’s I2C, SPI, and PIO hardware, along with networking protocols and Bluetooth. PEEK and POKE are also hopefully on the way for those that like to fiddle with memory directly.

Meanwhile, if you’re looking for a different yet similar take, explore the port of MMBasic to the Pico platform. Video after the break.

Continue reading “A BASIC Interpreter For The Raspberry Pi Pico”

A Pico-Based ZX Spectrum Emulator

The ZX Spectrum was a popular computer of the 8-bit era. Now, it’s possible to emulate this machine on a microcontroller so cheap that it’s literally been given away on the front cover of magazines. Yes, we’re talking about the Pico ZX Spectrum project.

The project consists of all the necessary code to emulate a ZX Spectrum upon the hardware of the RP2040 microcontroller that makes up the Raspberry Pi Pico. The community has then taken this code and run with it, using it as the basis for all manner of different ZX Spectrum builds. If so desired, you can go barebones and use the Pico to run a ZX Spectrum off a breadboard with HDMI video output. Alternatively, you can build something like the PicoZX from [Bobricius]. The handheld computer features a PCB-based housing, along with an LCD and an integrated keyboard. Other configurations support features like USB keyboards, VGA outputs, and working sound output.

It’s great to see a classic 8-bit computer reimagined in all kinds of new tribute form factors. The Spectrum was always beloved for its neat all-in-one design, and there are several modern remixes that riff on that theme. The fact that they can all be powered by a cheap single-board microcontroller is all the more astounding. Video after the break.

Continue reading “A Pico-Based ZX Spectrum Emulator”

Bringing The PIO To The FPGA

We’ve seen some pretty incredible hacks using the Raspberry Pi 2040. However, one of the most exciting bits of hardware onboard is the Programmable I/O (PIO). Not content with it just being a part of RP2040-based projects, [Lawrie Griffiths] has been porting the PIO to Verilog so anyone can enjoy it.

This particular implementation is based only on the spec that Raspberry Pi provides. For assembling PIO code, [Lawrie] uses Adafruit’s pioasm assembler they use for their MicroPython framework. There’s a simulator to test different programs, and the project targets the Blackice MX and the Ulx3s. A few example programs are included in the repo, such as outputting a pleasant guitar note over I2S and driving a chain of WS2812s.

The project is still incomplete but slowly making progress. It’s an incredible feat of reverse engineering. While the simulator can be used to debug programs, step through instructions, and inspect waveforms, the ultimate value of bringing the PIO to other systems is that now we can re-use the code. Things like the can2040, an implementation of the CAN bus protocol using the PIO. Or even a PIO-based USB host.

Bust Out That Old Analog Scope For Some Velociraster Fun!

[Oli Wright] is back again with another installation of CRT shenanigans. This time, the target is the humble analog oscilloscope, specifically a Farnell DTV12-14 12 MHz dual-channel unit, which features a handy X-Y mode. The result is the Velociraster, a simple (in hardware terms) Raspberry Pi Pico based display driver.

Using a Pico to drive a pair of AD767 12-bit DACs, the outputs of which drive the two ‘scope input channels directly, this breadboard and pile-of-wires hack can produce some seriously impressive results. On the software side of things, the design is a now a familiar show, with core0 running the application’s high-level processing, and core1 acting in parallel as the rendering engine, determining static DAC codes to be pushed out to the DACs using the DMA and the PIO.

Continue reading “Bust Out That Old Analog Scope For Some Velociraster Fun!”