Hyundai Is Doomed: Porting The 1993 Classic To A Hyundai Head Unit

In the natural order of the world, porting DOOM to any newly unlocked computing system is an absolute given. This a rule which [greenluigi1] understands all too well, leading to presumably the first Hyundai to be equipped with this all-time classic on its infotainment system. This follows hot on the trail of re-hacking said infotainment system and a gaggle of basic apps being developed for and run on said head unit (being the part of the infotainment system on the front dashboard). Although it is a Linux-based system, this doesn’t mean that you can just recompile DOOM for it, mostly because of the rather proprietary system environment.

To make life easy, [greenluigi1] picked doomgeneric as the version to port. The main selling point of this project is that it only requires the developer to implement five functions to support a new platform, which then ‘just’ left figuring out how to do this on a head unit. Two of these (DG_SleepMs() and DG_GetTicksMS()) could be copied verbatim from the X11/xlib port, but the remaining three required a bit of sleuthing.

Where things go sideways is with keeping the head unit’s Helix window manager happy, and stick to the limited ways a GUI application can be launched, including the way arguments are passed. For the PoC, it was decided to just hardcode these arguments and only register the game with Helix using an .appconf configuration file. When it came to drawing pretty graphics on the screen, this was decidedly easier since the system uses Qt5 and thus offers the usual ways to draw to a QPixmap, which in this case maps to the framebuffer.

After a few playful sessions with the head unit’s watchdog timer, [greenluigi1] found himself staring at a blank screen, despite everything appearing to work. This turned out to be due to the alpha channel value of 0 that was being set by default, along with the need for an explicit refresh of the QPixmap. Up popped DOOM, which left just the implementation of the controls.

In order to start the game, you have to literally buckle up, and the steering wheel plus media control buttons are your inputs, which makes for a creative way to play, and perhaps wear some bald spots onto your tires if you’re not careful. If you’d like to give it a shot on your own ride, you can get the project files on GitHub.

Continue reading “Hyundai Is Doomed: Porting The 1993 Classic To A Hyundai Head Unit”

Processing of PP/MWCNT nanocomposites and coating them with plasmonic NPs. (Credit: Sara Fateixa et al., 2023)

Affordably Detecting Water Pollutants Using 3D Printed Lattices And Plasmonic Nanoparticles

Although detecting pollution in surface waters has become significantly easier over the years, testing for specific pollutants still requires the taking of samples that are then sent to a laboratory for analysis. For something like detecting pesticide run-off, this can be a cumbersome and expensive procedure. But a 3D printed sensor demonstrated by [Sara Fateixa] and international colleagues offers hope that such tests can soon be performed in the field. The most expensive part of this setup is the portable Raman spectrometer that is used to detect the adsorbed molecules on the printed test strips.

The printed structure itself forms a plasmonic structure with gold or silver as the plasmonic metals deposited on the polypropylene (PP) and multi-walled carbon nanotube (MWCNT, 4% by weight) material. The mixture of PP and MWCNTs is to use both the bio-compatible properties of the former, while using the latter to make the PP significantly easier to print with and enhancing its mechanical properties.

Hamamatsu Raman Spectroscopy SERS Detection Module C13560.
Hamamatsu Raman Spectroscopy SERS Detection Module C13560.

For the experiment, researchers used a few prepared sensors to detect herbicides, including paraquat. This herbicide is cheap, widely used, and banned in various countries. After dissolving it in low concentrations in both tap water and sea water, a 3D printed sensor with Ag coating was was exposed to each sample before being left to dry at room temperature. Afterwards a Hamamatsu C13560 portable Raman spectrometer was used to analyze the sensors using surface-enhanced Raman scattering (SERS). The combination of plasmonic structures and Raman scattering means a significantly enhanced sensitivity, on the order of singular molecules, and is what makes SERS such a useful analytical technique.

In the resulting scan results, the herbicides showed up clearly, and further long-duration testing of newly printed sensors showed them to be very stable, even after 150 days of being stored. This makes it a promising new way to affordably and quickly perform tests for pollution, requiring only minimal local infrastructure to produce and analyze the sensors.

Heading: Processing of PP/MWCNT nanocomposites and coating them with plasmonic NPs. (Credit: Sara Fateixa et al., 2023)

Tree Planting Festivals, Air Cannons, Self-Burying Seeds, And The Complexities Of Reforestation

At first glance the problem of how to plant trees would seem to be a straightforward one: take a seed, jam it into the soil and let nature take its course. Or alternatively do much the same with a sapling that already got a start in a nice, comfortable greenhouse before leaving it to its own devices. To the average person this is generally the point where it’s considered a ‘done deal’, but one only has to take a look at the average survival rate of saplings out in the wild to perish that thought.

Each environment offers its own set of challenges when it comes to reforestation, which can perhaps be considered ironic as many of these trees are being planted where forests used to be, albeit centuries ago in many cases. There are the easy spots, such as flat fields, with rich soil, ample rain and mild weather, to the challenging terrain of Iceland, or mountainous terrain. Here the logistics are challenging and where once rich forests flourished, the very landscape seems adamant to reject this botanic intrusion.

Further complicating matters here are the myriad of reasons why we’re looking at planting so many new trees that it has even become an internet thing, as with the 2019 ‘Team Trees’ 20 million new trees challenge. So how did we get here, why exactly are we doing all of this, and how much of these attempts do bear fruit?

Continue reading “Tree Planting Festivals, Air Cannons, Self-Burying Seeds, And The Complexities Of Reforestation”

Photo of the head unit , with "Hacked by greenluigi1" in the center of the UI

Hacking A Hyundai Ioniq’s Infotainment System Again After Security Fixes

These days modern cars are nothing if not a grouping of networked software held together by bits of hardware. This is reflected not only in the rapidly increasing number of ECUs, but also infotainment systems and all-glass cockpits. For better or worse, this offers many exciting hacking possibilities, which [greenluigi1] was more than happy to explore with their new 2021 Hyundai Ioniq SEL last year. Naturally, Hyundai then proceeded to ‘fix’ these vulnerabilities, offering the exciting chance to test the Hyundai engineers’ homework, and proceed to bypass it again.

When we last left off in [greenluigi1]’s adventures, the Hyundai D-Audio 2V Linux-based infotainment system (formally called in-vehicle entertainment, or IVI) in question had been convinced to run custom applications after a fair bit of effort to get root access via the Engineering Menu and some firmware image hacking. Joyous hacking and exploration of the car’s CAN network and RPC messaging system ensued. Then Hyundai released a new firmware image, after months of silence and all old firmware images pulled from the download page.

In this new firmware image, big changes were visible right off the bat, with two different ZIP files instead of the single one from before. One of these ZIP files also couldn’t be decrypted any more with the old key. Unfortunately for Hyundai, the curse of backwards compatibility with older IVIs meant that the ZIP targeting headunits running the older firmware also contained the key for the new ZIP file.

Other changes included some further obfuscation to this key and the public key used for firmware hash verification, which also involved using a Micom RPC call via the CAN bus to obtain some vehicle specific information. Unfortunately, this is where Hyundai’s engineers seemed to have stopped copying reference code samples, and used a unique RSA private key to sign firmware images with. Fortunately, they did not bother to check whether the updater actually always verifies the signature, allowing for unsigned code to be installed.

All in all, a fascinating bit of reverse-engineering and sheer stubborn persistence, just so that the IVI that’s in your car can run the applications which you developed. We’re looking forward to the next installments in this series as the ball is once again firmly in Hyundai’s court.

The Integral Molten Salt Reactor And The Benefits Of Having A Liquid Fission Reactor

Although to most the term ‘fission reactor’ brings to mind something close to the commonly operated light-water reactors (LWRs) which operate using plain water (H2O) as coolant and with sluggish, thermal neutrons, there are a dizzying number of other designs possible. Some of these have been in use for decades, like Canada’s heavy water (D2O) reactors (CANDU), while others are only now beginning to take their first step towards commercialization.

These include helium-cooled, high-temperature reactors like China’s HTR-PM, but also a relatively uncommon type developed by Terrestrial Energy, called the Integral Molten Salt Reactor (IMSR). This Canadian company recently passed phase 2 of the Canadian Nuclear Safety Commission’s (CNSC) pre-licensing vendor review. What makes the IMSR so interesting is that as the name suggests, it uses molten salts: both for coolant and the low-enriched uranium fuel, while also breeding fuel from fertile isotopes that would leave an LWR as part of its spent fuel.

So why would you want your fuel to be fluid rather than a solid pellet like in most reactors today?

Continue reading “The Integral Molten Salt Reactor And The Benefits Of Having A Liquid Fission Reactor”

C++17’s Useful Features For Embedded Systems

Although the world of embedded software development languages seem to span somewhere between ASM and C89 all the way to MicroPython, there is a lot to be said for a happy medium between ease of development and features that makes the software more robust without adding overhead or bloat to the final firmware image.

This is where C++ has objectively many advantages over even C99, and as [Çağlayan Dökme] argues in a recent blog post C++17 adds many developer critter comforts to C++98 and the more recent C++11 C++14 standards.

First stepping back a generation (technically two, with C++20 also being a thing already), the addition of binary literals (e.g. 0b1010'1100) in C++14 and the expanded use of constexpr is addressed, with the latter foreshadowing C++17’s increased focus on compile time optimizations. A new attribute in C++17 that is part of this is [[nodiscard]], which when added before to the return type of a function or method requires the return value to be used in some manner, much like with functions in Ada (contrasted with procedures).

As [Çağlayan] notes, the biggest strength of compile-time checks is that it can save a lot of deploy-test-fix round-trips, with the total number of issues caught after deployment that could have been caught during compilation ideally being zero. Here C++17 streamlines the static_assert() mechanism and simplifies using if constexpr to instantiate code depending on compile-time conditions. Beyond compile-time optimizations there are a few other niceties, such as C++17 guaranteeing copy elision (return value optimization) when an object is returned directly, which is a welcome feature in hard real-time environments.

With today even MCUs having enough grunt to run multi-threaded applications and potentially firmware compiled from a many-thousand LoC codebase, picking a programming language that assists the developer with such an arduous task is very important, with Ada being the primary choice for high-reliability embedded platforms, but C++ along with C enjoying the most widespread (free) compiler support. Even if C++ isn’t supported on every single MCU out there (8051-based and most PIC MCUs mostly), whenever it is an option, it’s a pretty solid choice, especially with knowledge of these new language features.

Overall design of retina-inspired NB perovskite PD for panchromatic imaging. (Credit: Yuchen Hou et al., 2023)

Perovskite Sensor Array Emulates Human Retina For Panchromatic Imaging

The mammalian retina is a complex system consisting out of cones (for color) and rods (for peripheral monochrome) that provide the raw image data which is then processed into successive layers of neurons before this preprocessed data is sent via the optical nerve to the brain’s visual cortex. In order to emulate this system as closely as possible, researchers at Penn State University have created a system that uses perovskite (methylammonium lead bromide, MAPbX3) RGB photodetectors and a neuromorphic processing algorithm that performs similar processing as the biological retina.

Panchromatic imaging is defined as being ‘sensitive to light of all colors in the visible spectrum’, which in imaging means enhancing the monochromatic (e.g. RGB) channels using panchromatic (intensity, not frequency) data. For the retina this means that the incoming light is not merely used to determine the separate colors, but also the intensity, which is what underlies the wide dynamic range of the Mark I eyeball. In this experiment, layers of these MAPbX3 (X being Cl, Br, I or combination thereof) perovskites formed stacked RGB sensors.

The output of these sensor layers was then processed in a pretrained convolutional neural network, to generate the final, panchromatic image which could then be used for a wide range of purposes. Some applications noted by the researchers include new types of digital cameras, as well as artificial retinas, limited mostly by how well the perovskite layers scale in resolution, and their longevity, which is a long-standing issue with perovskites. Another possibility raised is that of powering at least part of the system using the energy collected by the perovskite layers, akin to proposed perovskite-based solar panels.

(Heading: Overall design of retina-inspired NB perovskite PD for panchromatic imaging. (Credit: Yuchen Hou et al., 2023) )