PCB Design Review: ESP32-S3 Round LCD Board

For our next installment, I have a lovely and daring PCB submitted by one of our readers, [Vas]. This is an ESP32-S3 board that also has an onboard round TFT display, very similar to the one we used on the Vectorscope badge. The badge is self-sufficient – it has an ESP32, it has a display, a programming connector, two different QWIIC ports you could surely use as GPIOs – what’s not to love?

This is a two-layer board, and I have to admit that I seriously enjoy such designs. Managing to put a whole lot of things into two layers is quite cool in my book, and I have great fun doing so whenever I get the opportunity. There’s nothing wrong with taking up more layers than needed – in fact, if you’re concerned about emitted/received noise or you have high-speed interfaces, four-layer is the way to go. But making complex boards with two layers is a nice challenge, and, it does tend to make these boards cheaper to manufacture as a very nice bonus.

Let’s improve upon it, and support [Vas]’s design. From what I can see looking at this board, we can help [Vas] a lot with ease of assembly, perhaps even help save a hefty amount of money if they go for third-party PCBA instead of sitting down with a stencil – which you could do with this board pretty easily, since all of the components on it, save for the display, are the ones you’d expect JLCPCB to stock.

Continue reading “PCB Design Review: ESP32-S3 Round LCD Board”

The Greenhouse Effect Isn’t For Greenhouses

Think of a greenhouse. It’s a structure with glass walls that lets light in and traps heat, all for the benefit of the plants inside. As for how it works, that’s elementary! It’s all down to the greenhouse effect… right?

Alas, no. So many of us have been mislead. Let’s rexamine how we think greenhouses work, and then explore what’s actually going on.
Continue reading “The Greenhouse Effect Isn’t For Greenhouses”

Extracting SecOC Keys From A 2021 Toyota RAV4 Prime

With the recently introduced SecOC (Secure Onboard Communication) standard, car manufacturers seek to make the CAN bus networks that form the backbone of modern day cars more secure. This standard adds a MAC (message authentication code) to the CAN messages, which can be used to validate that these messages come from a genuine part of the car, and not from a car thief or some third-party peripheral.

To check that it isn’t possible to circumvent SecOC, [Willem Melching] and [Greg Hogan] got their hands on the power steering (EPS) unit of a Toyota RAV4 Prime, as one of the first cars to implement this new security standard.

The 2021 Toyota RAV4 Prime's power steering unit on the examination bench. (Credit: Willem Melching)
The 2021 Toyota RAV4 Prime’s power steering unit on the examination bench. (Credit: Willem Melching)

As noted by [Willem], the ultimate goal is to be able to run the open source driver assistance system openpilot on these SecOC-enabled cars, which would require either breaking SecOC, or following the official method of ‘rekeying’ the SecOC gateway.

After dumping the firmware of the EPS Renesas RH850/P1M-E MCU via a voltage fault injection, the AES-based encryption routines were identified, but no easy exploits found in the main application. This left the bootloader as the next target.

Ultimately they managed to reverse-engineer the bootloader to determine how the update procedure works, which enabled them to upload shellcode. This script then enabled them to extract the SecOC keys from RAM and send these over the CAN bus. With these keys the path is thus opened to allow any device to generate CAN messages with valid SecOC MACs, effectively breaking encryption. Naturally, there are many caveats with this discovery.

Continue reading “Extracting SecOC Keys From A 2021 Toyota RAV4 Prime”

Large Language Model Can Help You Develop For The Amiga

Developing for the Amiga used to involve reading dense programming manuals and trial and error. In contrast, developing these days can be as simple as barking orders at ChatGPT to spit you out some Python code. However, that technique doesn’t work so well for Amiga languages, as ChatGPT hasn’t read much about the now-ancient platform. However, as covered by AmigaNews, there is now a ChatGPT model trained specifically on Amiga development. Enter Amiga Guru.

The work of [Cameron Armstrong], Amiga Guru was built after his early experiments with ChatGPT spat out non-functional gibberish when Amiga-compatible code was requested. The model has been trained on a corpus of official Amiga programming manuals, third-party books, and even the documentation for AmigaOS 3.2 and 4.1.

Using the model yourself requires a subscription to ChatGPT Plus, which prevents this writer from testing it directly. However, it makes sense that having been directly trained on Amiga manuals, it would be more capable at answering Amiga programming queries than conventional ChatGPT 4.

It’s easy to see the value of such a system. Learning to program for older platforms can be hard, with less resources available for new learners. Having an AI to help could be useful for some eager to develop for the 68K-based machine.

If you’d like to try Amiga Guru, you can access it via this link. Be sure to let us know how you go, and whether you think it has any value for speeding up your own Amiga development. Otherwise, if you’ve been doing anything else nifty with the platform that Commodore bought and paid for, don’t hesitate to let us know!

[Thanks to Stephen Waters for the tip!]

Wireless Telescope Guidance You Can Build On The Cheap

Telescopes are fun to point around the sky, but they’re even better when you have some idea of what you’re actually looking at. Experienced sky-gazers love nothing more than whipping out some quality glassware and pointing it to the heavens to try and view some photons from some fancy celestial point of interest. To aid your own endeavors in this realm, you might consider following [aeropic’s] example in building a capable wireless telescope DSC.

Yes, [aeropic] built a capable digital setting circle (DSC) which can be used to quickly point a telescope at objects in the sky, with the aid of the right astronomical software. An ESP32 board runs the show, using AS5600 positional encoders on each axis of the telescope to understand the device’s orientation. The encoders are attached via 3D-printed components to track the motion of the telescope accurately. It can then be paired over Bluetooth with a smartphone running an app like Skysafari. Once calibrated on some known stars, the app can then read the encoder outputs from the telescope, and help guide the user to point the device at other stars in the night sky.

The rig won’t actually move the telescope for you, it just guides you towards what you want to look at. Even still, it makes finding points of interest much faster and could help you get a lot more out of your next sky viewing party. Have fun out there! Video after the break.

Continue reading “Wireless Telescope Guidance You Can Build On The Cheap”

What Is X86-64-v3?

You may have heard Linux pundits discussing x86-64-v3. Can recompiling Linux code to use this bring benefits? To answer that question, you probably need to know what x86-64-v3 is, and [Gary Explains]… well… explains it in a recent video.

If you’d rather digest text, RedHat has a recent article about their experiments using the instructions set in RHEL10. From that article, you can see that most of the new instructions support some enhancements for vectors and bit manipulation. It also allows for more flexible instructions that leave their results in an explicit destination register instead of one of the operand registers.

Of course, none of this matters for high-level code unless the compiler supports it. However, gcc version 12 will automatically vectorize code when using the -O2 optimization flags.

Continue reading “What Is X86-64-v3?”

Ethernet For Hackers: The Very Basics

Ethernet is ubiquitous, fast, and simple. You only need two diffpairs (four wires) to establish a 100Mbit link, the hardware is everywhere, you can do Ethernet over long distances easily, and tons of the microcontrollers and SoCs support it, too. Overall, it’s a technology you will be glad to know about, and there’s hundreds of scenarios where you could use it.

If you need to establish a high-bandwidth connection between two Linux boards in your project, or maybe a Linux board and a powerful MCU, maybe make a network between microcontrollers, Ethernet’s your friend. It also scales wonderfully – there’s so much tech around Ethernet, that finding cables, connectors or ICs tends to be dead easy. Plus, the world of Ethernet is huge beyond belief. Ethernet as most of us know it is actually just the consumer-facing versions of Ethernet, and there’s a quite a few fascinating industrial and automotive Ethernet standards that flip many of our Ethernet assumptions upside down.

Now, you might be missing out on some benefits of Ethernet, or perhaps misunderstanding how Ethernet works at all. What does it mean when a microcontroller datasheet says “has Ethernet interface”? If you see five pins on an SBC and the manufacturer refers to them as “Ethernet”, what do you even do with them? Why does the Raspberry Pi 4 SoC support Ethernet but still requires an extra chip, and what even is GMII? Continue reading “Ethernet For Hackers: The Very Basics”