DisplayPort: Tapping The Altmode

Really, the most modern implementation of DisplayPort is the USB-C DisplayPort altmode, synonymous with “video over USB-C”, and we’d miss out if I were to skip it. Incidentally, our last two articles about talking USB-PD have given a few people a cool new toy to play with – people have commented on the articles, reached out to me for debugging help, and I’ve even seen people build the FUSB302B into their projects! Hot on the heels of that achievement, let’s reach further and conquer one more USB-C feature – one that isn’t yet openly available for us to hack on, even though it deserves to be.

For our long-time readers, it’s no surprise to see mundane capabilities denied to hackers. By now, we all know that many laptops and phones let you get a DisplayPort connection out of a USB-C port. Given that the USB-C specifications are openly available, and we’ve previously implemented a PD sink using those specifications, you’d expect that we could do DisplayPort with the same ease. Yet, the DisplayPort altmode specification is behind a VESA membership paywall, with a hefty pricetag – a practice of theirs that has been widely criticized, counter to their purpose as a standards organization and having resulted in some of their standards failing.

Not to worry, however – we can easily find an assortment of PDFs giving a high-level overview and some details of the DisplayPort altmode, and here’s my favorite! I also have a device running MicroPython with a FUSB302 chip connected, and a few DisplayPort altmode devices of mine that I can disassemble. This, turns out, is more than enough for us to reverse-engineer our way into an open-source DisplayPort altmode library!

Continue reading “DisplayPort: Tapping The Altmode”

PCIe For Hackers: An M.2 Card Journey

I’ve designed a few M.2 adapters for my own and my friends’ use, and having found those designs online, people have asked me for custom-made adapters. One of these requests is quite specific – an adapter that adds one more PCIe link to an E-key M.2 slot, the kind of slot you will see used in laptops for WiFi cards.

See, the M.2 specification allows two separate PCIe links connected to the E-key slot; however, no WiFi cards use this apart from some really old WiGig-capable ones, and manufacturers have long given up on connecting a second link. Nevertheless, there are some cards like the Google Coral M.2 E-key dual AI accelerator and the recently announced uSDR, that do indeed require the second link – otherwise, only half of their capacity is available.

It’s not clear why both Google and WaveletSDR designed for a dual-link E-key socket, since those are a rare occurrence; for the Google card, there are plenty of people complaining that the board they bought just doesn’t fully work. In theory, all you need to do to help such a situation, is getting a second PCIe link from somewhere, then wiring it up to the socket – and a perfect way to do it is to get a PCIe switch chip. You will lose out on some bandwidth because the uplink PCIe connection of the switch can only go so fast; for things like this AI accelerator, it’s not much of a problem since the main point is to get the second device accessible. For the aforementioned SDR, it might turn out useless, or you might win some but lose some – can’t know until you try! Continue reading “PCIe For Hackers: An M.2 Card Journey”

DisplayPort: Under The Hood

Last time, we looked at all the things that make DisplayPort unique for its users. What about the things that make it unique for hackers? Let’s get into all the ways that DisplayPort can serve you on your modern tech wrangling adventures.

You Are Watching The AUX Channel

With DisplayPort, the I2C bus we’ve always seen come bundled with VGA, DVI and HDMI, is no more – it’s been replaced by the AUX bus. AUX is a 1 MHz bidirectional diffpair – just a bit too complex for a cheap logic analyzer, though, possibly, something you could wrangle with the RP2040’s PIOs. Hacking thoughts aside, it’s a transparent replacement for I2C, so that software doesn’t have to be rewritten – for instance, it usually does I2C device passthrough over AUX, so that EDID data can still be stored in a separate EEPROM chip on the monitor or eDP LCD panel.

AUX isn’t just a differential bus, it’s more pseudodifferential, like USB2 – for instance, AUX_P and AUX_N are used separately, with a combination of 1 MΩ and 100 kΩ pullups and pulldowns signaling different states of the physical connection – for instance, a pullup on AUX+ and a pulldown on AUX- means that an external device has been connected. If you’d like to learn which combination of resistors means what, you can find in the DisplayPort specification, which isn’t distributed openly but isn’t hard to come by, either.

Also, DisplayPort link training happens over AUX, and in order to facilitate that, a piece of DisplayPort controller’s external memory is usually exposed over the AUX channel, through a mechanism that’s called DPCD. If you dig a bit, using “DPCD” as the keyword, you can easily reach into the lower-level details of your DisplayPort connection. Some of the DPCD memory map is static, and some parts are FIFOs you can funnel data into, or out of. You can find a wide variety of documents online which describe the DPCD structure – for now, here’s a piece of Bash that works on Linux graphics drivers for AMD and Intel, and will show you you the first 16 bytes of DPCD:

# sudo dd if=/dev/drm_dp_aux0 bs=1 skip=256 count=16 |xxd
00000000: 0084 0000 0000 0000 0108 0000 0000 0000 ................
[...]

In particular, the 4th nibble (digit) here describes the amount of lanes for the DisplayPort link established – as you can see, my laptop uses a four-lane link. Also, the /dev/drm_dp_aux0 path might need to be adjusted for your device. In case you ever want to debug your DP link, having direct access to the DPCD memory space like this might help you quite a bit! For now, let’s move onto other practical aspects. Continue reading “DisplayPort: Under The Hood”

DisplayPort: A Better Video Interface

Over the years, we’ve seen a good number of interfaces used for computer monitors, TVs, LCD panels and other all-things-display purposes. We’ve lived through VGA and the large variety of analog interfaces that preceded it, then DVI, HDMI, and at some point, we’ve started getting devices with DisplayPort support. So you might think it’s more of the same. However, I’d like to tell you that you probably should pay more attention to DisplayPort – it’s an interface powerful in a way that we haven’t seen before.

By [Belkin+Abisys], CC BY-SA 3.0
The DisplayPort (shortened as DP) interface was explicitly designed to be a successor to VGA and DVI, originating from the VESA group – an organization created by multiple computer-display-related players in technology space, which has previously brought us a number of smaller-scale computer display standards like EDID, DDC and the well-known VESA mount. Nevertheless, despite the smaller scale of previous standards, DisplayPort has since become a hit in computer display space for a number of reasons, and is more ubiquitous than you might realize.

You could put it this way: DisplayPort has all the capabilities of interfaces like HDMI, but implemented in a better way, without legacy cruft, and with a number of features that take advantage of the DisplayPort’s sturdier architecture. As a result of this, DisplayPort isn’t just in external monitors, but also laptop internal displays, USB-C port display support, docking stations, and Thunderbolt of all flavors. If you own a display-capable docking station for your laptop, be it classic style multi-pin dock or USB-C, DisplayPort is highly likely to be involved, and even your smartphone might just support DisplayPort over USB-C these days. Continue reading “DisplayPort: A Better Video Interface”

Two lamp versions side by side - one desk lamp and one spotlight lamp, both turned on and shining

A Tale Of Two LÄMPs

Building with LEDs is a hacker pastime like no other – what’s more, if you keep playing with LED tech out there, you’re bound to build something elegant and noteworthy. For today’s fix of beautiful LED devices, take a look at the two LÄMP creations of [Jana Marie], both LED projects building upon one another. It’s not just your regular RGB LEDs – she adds a healthy mix of white and yellow LEDs, making for colors way more natural-looking and pleasant to the eye!

The first one is the LAEMP-Panel, a two-PCB sandwich, combining into a spot light you can use for any purpose where some extra LED would really shine – be it photography, accent, or mood lighting. All of these LEDs are individually controlled and from the SK6812 family, half of them YYW and half RGB variation. As for the base board, the controller is an ESP32, paired to an E75 ZigBee module – this spot light is built to be part of your home’s ZigBee network. If you look at the base board’s KiCad files, you will also notice six-pin headers on five edges – and they’re there for a reason.

The sister project to this one, the LAEMP-Prism, is a remarkable hexagonal lamp built upon the LAEMP-Panel’s PCB base, but in a desk-friendly form-factor. Six extra side panels with a generous amount of circular cutouts give you a total of 291 LEDs, mix of yellow, white and RGB as before – we got to say, from the pictures we found, it looks like a gorgeous thing to have in your house!

Such is a story of building a spotlight and a desk lamp, both using the same hardware base to accomplish quite different purposes. As is [Jana-Marie]’s tradition, these two lamps are fully open-source, complete with instructions on assembling them – everything is ready for you if you’d like to build one of your own, whichever version it may be! When it comes to lamp-building projects that excel at looks, one can’t forget the two other lamps we’ve seen a few years ago – one built with fiber optics, and another in the shape of the Moon.

Supercon 2022: [Liz McFarland] Builds Golden Wings, Shows You How

Are you, by any chance, wondering about giving yourself wings? You should listen to [Liz McFarland] sharing her experience building a Wonder Woman suit, and not just any – the Golden Eagle suit from Wonder Woman 1984, adorned with a giant pair of wings. If a suit like that is in your plans, you’ll be warmly welcomed at a cosplay convention – and [Liz] had her sights on the San Diego Comic Con. With an ambitious goal of participating in the Comic Con’s cosplay contest, the suit had to be impressive – and impressive, it indeed was, not just for its looks, but for its mechanics too.

[Liz] tells us everything – from producing the wings and painting them, to keeping them attached to the body while distributing the weight, and of course, things like on-venue nuances and safety with regards to other participants. The dark side of cosplay building reality isn’t hidden either – talking, of course, about the art of staying within a reasonably tight budget. This build takes advantage of a hackerspace that [Liz] is an active member in – the [Crash Space] in LA. Everything is in – lasercutting, 3D printing, and even custom jigs for bending wing-structual PVC pipes play a role.

It would have been a travesty to not have the wings move at will, of course, and [Liz] had all the skills you could want for making the wings complete. She went for two linear actuators, walking us through the mechanical calculations and considerations required to have everything fit together. It’s not easy to build a set of wings on its own, let alone one that moves and doesn’t crumble as you use it – if you have already attempted bringing mechanical creations like this into life, you can see the value in what [Liz] shares with us, and if you haven’t yet delved into it, this video will help you avoid quite a few pitfalls while setting an example you can absolutely reach.

The suit was a resounding success at the con, and got [Liz] some well-earned awards – today, the suit’s story is here for the hackers’ world. Now, your cosplay aspirations have an inspiring real-life journey to borrow from, and we thank [Liz] for sharing it with us.

Continue reading “Supercon 2022: [Liz McFarland] Builds Golden Wings, Shows You How”

Supercon 2022: [Jorvon Moss] Gives His Robots A Soul

How do you approach your robot designs? Maybe, you do it from a ‘oh, I have these cool parts’ position, or from a ‘I want to make a platform on wheels for my experiments’ perspective. In that case, consider that there’s a different side to robot building – one where you account for your robot’s influence on what other people around feel about them, and can get your creations the attention they deserve. [Jorvon ‘Odd-Jayy’ Moss]’s robots are catchy in a way that many robot designs aren’t, and they routinely go viral online. What are his secrets to success? A combination of an art background, a Bachelor of Fine Arts in illustration, and a trove of self-taught electronics skills helped him develop a standout approach to robot building.

Now, [Jorvon] has quite a few successful robot projects under his belt, and at Supercon 2022, he talks about how our robots’ looks and behaviour shapes their perception. How do your own robots look to others, and what feelings do they evoke? With [Jorvon], you will go through fundamentals of what makes a robot look lively, remarkable, catchy or creepy, and it’s his unique backgrounds that let him give you a few guidelines on what you should and should not do when building a certain kind of robot.

You’ll do good watching this video – it’s short and sweet, and shows you a different side to building robots of your dreams; plus, the robot riding around on the stage definitely makes this presentation one of a kind. No matter your robot’s technical complexity, it’s significant that it can make people go ‘wow’ when they see it. Not all robots are there to single-mindedly perform a simple task, after all – some are meant to travel around the world.

Continue reading “Supercon 2022: [Jorvon Moss] Gives His Robots A Soul”