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”

You’ve Got Mail: Sorting And The USPS

Snail mail. You may not think much of it these days, but the mail doesn’t stop and it never has. Every type of mail from postcards and letters to large envelopes and packages of all sizes moves every single day all over the US, even though it isn’t typically delivered on Sundays. Dealing with the ever-increasing volume of physical mail has called for the invention and evolution of automatic mail sorting machines that are used by both postal facilities and businesses alike.

While mail sorting machines have grown and matured over the years, the human element of the task remains intact. As long as people type addresses, write them by hand, and/or print them in handwriting fonts by the hundreds, there will need to be humans on hand to verify at least a few of them that are really hard to read.

There are roughly a dozen different types of mail sorting machines in 2023. In this series, we’re going to take a look at most of them, along with many other aspects of the United States Postal Service and its history.

Continue reading “You’ve Got Mail: Sorting And The USPS”

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”

Know Snow: Monitoring Snowpack With The SNOTEL Network

With summer just underway here in North America, it may seem like a strange time to talk about snow. But when you live in North Idaho, winter is never very far away and is always very much on everyone’s mind. Our summers are fierce but all too brief, so starting around September, most of us begin to cast a wary eye at the peaks of the Bitterroot range in the mornings, looking for the first signs of snow. And in the late spring, we do much the same, except longingly looking for the first signs that the snowpack is finally breaking up.

We all know how important snow is, of course. Snow is our lifeline, nearly the only source of drinking water we have here, as well as the foundation of our outdoor recreation industries. We also know that the snowpack determines our risk for wildfires, so while the long, dark winters may take a psychological toll, the longer the snow stays on the mountains, the less chance we have of burning come summer.

These are all very subjective measures, though, and there’s way too much riding on the snowpack to leave it up to casual observation. To make things more quantitative, the US Department of Agriculture’s Natural Resources Conservation Service (NRCS) has built a system across the western US that measures the snowpack in real-time, and provides invaluable data to climatologists, fish and game managers, farmers, and even the recreation industry, all of whom have a vested interest in the water held within. The network is called SNOTEL, and I recently got a chance to take a field trip with a hydrologist and get an up-close look at how it works.

Continue reading “Know Snow: Monitoring Snowpack With The SNOTEL Network”

Meshtastic For The Greater Good

Last week, my city was hit by a tornado. That’s not surprising here in Oklahoma, and thankfully this event was an F0 or possibly even an EF0 — a really weak tornado. Only a couple roofs collapsed, though probably half the houses in town are going to need roof repairs, thanks to the combination of huge hail and high winds. While it wasn’t too bad, power did go down in a few places around town, and this led to an interesting series of events.

Chat messages were coming in like this: “That was a [power] flicker, yeah. Even took down my Internet.” Followed by “Whee, [fiber Internet] got knocked out and now Starlink has too many clouds in the way.” And after ten minutes of silence, we got a bit worried to see “Time to hide under a bed. … Is cell service back?” It is a bit spooky to think about trying to help neighbors and friends after a disaster, in the midst of the communication breakdown that often follows. If he had needed help, and had no working communications, how long would it have taken for us to go check on him?
Continue reading “Meshtastic For The Greater Good”

Cottonization: Making Hemp And Flax Fibers Into The Better Cotton

These days it’s hard to imagine that fabrics were ever made out of anything other than cotton or synthetic fibers, yet it wasn’t too long ago that hemp and flax-based fabrics — linen — were the rule rather than the exception. Cotton production has for centuries had the major disadvantages of requiring a lot of water and pesticides, and harvesting the cotton was very labor-intensive, making cotton rather expensive. In order to make separating the cotton fibers from the seed easier, improved versions of the cotton gin (‘cotton engine’) were developed, with the 19th century’s industrial revolution enabling a fully automated version.

What makes cotton attractive is the ease of processing these fibers, which are part of the seed pod. These fibers are 25 mm – 60 mm long, 12 μm – 45 μm fine fibers that can be pulled off the seeds and spun into yarn or whatever else is needed for the final product, much like wool. Hemp and flax fibers, in contrast, are extracted from the plant stem in the form of bast fibers. Rather than being pure cellulose, these fibers are mostly a mixture of cellulose, lignin, hemicellulose and pectin, which provide the plant with rigidity, but also makes these fibers coarse and stiff.

The main purpose of cottonization is to remove as much of these non-cellulosic components as possible, leaving mostly pure cellulose fibers that not only match the handleability of cotton fibers, but are also generally more durable. Yet cottonization used to be a long and tedious process, which made bast fiber-based textiles expensive. Fortunately, the steam explosion cottonization method that we’ll be looking at here may be one of the methods by which the market will be blown open for these green and durable fibers.

Continue reading “Cottonization: Making Hemp And Flax Fibers Into The Better Cotton”

Review: InfiRay P2 Pro Thermal Camera

It probably won’t surprise you to learn that Hackaday is constantly hounded by companies that want us to review their latest and greatest gadget. After all, getting us to post about their product is cheaper, easier, and arguably more effective than trying to come up with their own ad campaign. But if you’ve been with us for awhile, you’ll also know that in-house reviews aren’t something we actually do very often.

The reason is simple: we’re only interested in devices or products that offer something useful or unique to this community. As such, the vast majority of these offers get ignored. I’ll give you an example. For whatever reason, multiple companies have been trying desperately to send me electric bikes with five-figure price tags this year. But since there’s no obvious way to turn that into useful content for the readers of Hackaday, I’m still stuck pedaling myself around like it’s the 1900s. I kid of course…I haven’t dared to get on a bike in a decade.

So I don’t mind telling you that, when InfiRay contacted me about reviewing their P2 Pro thermal camera, the email very nearly went into the trash. We’ve seen these kind of phone-based thermal cameras before, and it seemed to be more of the same. But after taking a close look at the specs, accessories, and claims laid out in the marketing material, I thought this one might be worth checking out first-hand.

Continue reading “Review: InfiRay P2 Pro Thermal Camera”