DisplayPort: Taming The Altmode

The DisplayPort altmode is semi-proprietary, but it can absolutely be picked apart if we try. Last time, we found a cool appnote describing the DisplayPort altmode in detail, switched the FUSB302 into packet sniffing mode and got packet captures, learned about PD VDMs (vendor-defined messages), and successfully replayed the captured messages to switch a USB-C port into the DisplayPort altmode. Today, we will go through the seven messages that summon the DisplayPort altmode, implement them, and tie them all into a library – then, figure out the hardware we need to have DisplayPort work in the wild.

For a start, as you might have seen from the diagram, a single command can be either a request or a response. For instance, if you get a Discover Identity REQ (request), you reply to it with a Discover Identity ACK (response), adding your identity data to your response along the way. With some commands, the DP source will add some data for you to use; for most commands, your DP sink will have to provide information instead – and we’ll do just that, armed with the PDF provided and the packet captures.

We have seven commands we need to handle in order to get DisplayPort out of a compatible USB-C port – if you need a refresher on these commands, page 13 of the ST’s PDF on the DP altmode will show you the message sequence. These commands are: Discover Identity, Discover SVIDs, Discover Modes, Enter Mode, DP Status Update, DP Configure, and Attention. Out of these, the first four are already partially described in the base USB PD standard, the two DP commands afterwards are DisplayPort-altmode-specific but sufficiently described in the PDF we have, and the Attention command is from the base standard as well, mostly helpful for reporting state of the HPD pin. Let’s start with the first two! Continue reading “DisplayPort: Taming The Altmode”

Let’s Listen To A Tape — Paper Tape

These days, data is as likely as not to be “in the cloud.” Otherwise, it’s probably on a USB flash drive or SD card. But in the old days, paper tape was a widespread way to store and retrieve data. A common way to start the day at the office was to toggle in a few dozen bytes of bootloader code, thread a bigger bootloader tape into your TeleType paper tape reader, and then get your coffee while the more capable bootloader clunked its way into memory. Then you could finish your brew while loading the tape with your compiler or whatever you wanted. [Scott Baker] has a Heathkit H8 and decided using a paper tape machine with it and some of his other gear would be fun.

Instead of a TeleType, [Scott] picked up a used paper tape machine from FANUC intended for the CNC industry. They are widely available on the surplus market, although a working machine might run you $500. [Scott] paid $200, so he had some work to do to make the unit operational.

Paper tape had a few varieties. For computer work, you usually had a tape that could hold eight holes across, one for each bit in a byte. However, there are also 6-bit and 5-bit tapes for special purposes or different encodings (old TeleTypes used 5-bit characters in Baudot). The paper choice varied too. You could get plain paper, oiled paper, which maybe didn’t jam as often, and Mylar, which is less likely to shred up when it does jam.

To make things even more difficult, the machines all worked a little differently as well. Sure, punches almost all use solenoids. But the tape transport was sometimes a pinch roller and sometimes a sprocket-style drive. Reading the holes could be done with mechanical contacts or optically. Some punches left little “hanging chads” on the tape, so you didn’t have to empty a confetti box to throw away the chad.

The repair job was interesting. Inside the machine is an 8051 microcontroller. There was no clock, and the circuit used two custom modules. One was simply a crystal, and the other was an oscillator. Removing both allowed a modern can oscillator to replace both modules. The next problem was a fried serial output driver. Replacing that got things working except for random resets due to a faulty brown-out reset circuit. That was easy to fix, too.

Of course, if you are really cheap, it is easy to make a paper tape reader from 8 phototransistors, and pulling tape through by hand isn’t unheard of. It can even talk USB. We’ve even seen a conference badge that can read tapes.

Continue reading “Let’s Listen To A Tape — Paper Tape”

Get MOST Into Your Pi

When looking the modify a passenger vehicle, the Controller Area Network (CAN) bus is a pretty easy target. In modern vehicles it has access to most of the on-board systems — everything from the climate control to the instrument cluster and often even the throttle, braking, and steering systems. With as versatile as the CAN bus is, though, it’s not the right tool for every job. There’s also the Media Oriented Systems Transport (MOST) bus which is increasingly found in automotive systems to handle multimedia such as streaming music to the stereo. To access that system you’ll need to approach it slightly differently as [Rhys] demonstrates.

[Rhys] has been working on replacing the dated head unit in his Jaguar, and began by investigating the CAN bus. He got almost everything working with replacement hardware except the stereo, which is where the MOST bus comes into play. It provides a much higher bandwidth than the CAN bus can accommodate but with almost no documentation it was difficult to interact with at first. With the help of a Raspberry Pi and a lot of testing he is able to get the stereo working again with a much more modern-looking touchscreen for control. It is also able to do things like change CDs in the car’s CD player, gather song information from the CD to display on the panel, and can perform other functions of the infotainment center.

For more detailed information on the MOST bus, [Rhys] also maintains a website where he puts his discoveries and other information he finds about this system. Unfortunately car stereo systems in modern vehicles can get pretty complicated these days, but adapting car stereos in older vehicles to modern technology carries some interesting challenges as well.

Continue reading “Get MOST Into Your Pi”