Hacker News new | ask | show | jobs
by userbinator 2046 days ago
A lot of special-purpose ICs are actually general-purpose processors with a mask ROM (or sometimes EEPROM, with interesting consequences), since writing the "firmware" for different functionality is easier than doing a whole "hard-coded" chip design --- the various USB-to-X adapters are one common example of this.
3 comments

A few days ago, I brought an USB-to-serial chip made by an obscure manufacturer. I found the RX/TX ports were working but control signals were not, I poked around the chip with an oscilloscope and found those pins were high-impedance, the chip didn't even attempt to output anything. I contacted tech support. They told me to buy a new one because my chip was an old batch without this feature (I guess it's a bug), but they can also provide a firmware update to me under NDA.

It's microcontroller all the way down.

Fun fact: It's also how those fake FTDI FT232 chips on the gray market were made. Counterfeiters just picked a cheap general-purpose microcontroller in mass production and wrote a Mask ROM for it. What's funny is that, the counterfeit chips actually have better process node than the real one (it doesn't mean it's better, though).

https://zeptobars.com/en/read/FTDI-FT232RL-real-vs-fake-supe...

They are better though: the clones fixed bugs that the original FTDIs had (bugs bad enough to make certain modes completely useless).

https://twitter.com/marcan42/status/695292366639378433?s=19

Don't buy FTDI chips; their malicious driver incident that bricked clones (by exploiting another bug in the EEPROM write support in their own chips!) should be enough to convince every board designer to stay away from them.

The clone chips are not better, they could've fixed some bugs in the original chip but they may have their own bugs. While there may be some good clones, there's no way to confirm the chip you got is good. Better to avoid FTDI, real or fake, altogether. For the record, I never used or purchased any FTDI chips since that driver incident, the chip I mentioned was not a FTDI chip.
I needed a USB to serial converter and specifically went out of my way to ensure I did not purchase a FTDI based one exactly because of that malicious driver incident.
I have used products that are powered by Microchip MCP2200, SiLabs CP2102, Prolific PL2303, or WCH CH341, it's easy to stay away from FTDI ;-)
It's the same situation with USB Bluetooth dongles - many purport to be based on a Cambridge Silicon Radio (CSR - now owned by Qualcomm) chip, but are in fact using one of several cheap alternatives.

Many of these clones have their own quirks, and the amount of work-arounding that's been added to the Linux drivers is quite notable. Kernel 8.5 onwards seems to incorporate most of the fixes, but along the way, patches like this were available:

https://gist.github.com/nevack/6b36b82d715dc025163d9e9124840...

Despite the fantastic efforts of the driver maintainers, I still managed to find a "CSR 4" cheap dongle that threw all sorts of errors in the logs and didn't work. I'm waiting for some Broadcomm chip-based replacements to arrive.

Um - make that Kernel 5.8!
A large number of Realtek products are some form of MIPS core (or at least used to be).
And there is a security aspect to this design decision too - if a way can be found to inject arbitrary code into one of these microcontrollers, all kinds of access will be opened.