Live data from Hacker News

Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

github.com

211–220 of 239 posts

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#211
I just ordered a bunch of these, yesterday, from Farnell.

I've received fake electronics from 3rd party Amazon sellers and eBay.

For testing a PoC I will buy knowing there is a risk it's likely fake - but once I've validated a design I'll go to Farnell.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#212
post #70

Earlier quoted context omitted.

Let's work through this example. You're a manufacturer of devices using FTDI chips. You make an emergency system for airplanes which e.g. releases breathing equipment, or life rafts, or similar. Or a backup avionics system. Due to a supply chain slip-up, a small number of counterfeit devices slipped in. An emergency comes up, and the instant the emergency system comes up, it turns out to have been bricked. People die…

You are making the mistake of arguing against a hypothetical. It's just a fabricated example to convey an idea, not something to argue against. As an aerospace engineer I assure you that sourcing components for aerospace isn't as simple as your hypothetical to my hypothetical. > Pro-consumer would be a pop-up letting the user know they received a counterfeit devices. This from driver code? The party at fault here is…

About 7 or 8 years ago I built an internal testing system used to test a satellite payload which used a microcontroller board from a reputable manufacturer, purchased through a reputable electronics supplier.

When we updated the ftdi driver, the board was bricked. Fortunately the system was still in development so we found a different board - it was only a bit of pain.

However, if that system had been shipped (as it was 6 months later), that board being bricked could have had much more significant ramifications. It would have caused a slipped schedule and tangible costs.

What should I have done differently?

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#213
post #116

Earlier quoted context omitted.

You're presenting this as a binary choice: a) > company should be responsible for ensuring that counterfeit devices work correctly or b) > bricking [the counterfeit] device as soon as possible The answer is almost always c) let it be, if it works fine, if not, not your problem. Adding any kind of bricking code anywhere, unnecessarily introduces the possibility that it will be unintentionally (or maliciously) activate…

Here's another choice: Go ask the manufacturer of the fake chip to support it with their own driver. Really. As a hardware manufacturer, if you use a fake version of my product and demand that my software work with it you will hear the loud sound of the phone being hung up forcefully. The legitimate manufacturer can do anything it wants with the software and their hardware. If someone wants support for fakes they can…

Your last comment brings this quote to mind:

> It is difficult to get a man to understand something when his salary depends upon his not understanding it.

No one is suggesting encouraging or tolerating theft of intellectual property. People are _discouraging_ vigilante justice against IP thieves.

In this instance, because it harms consumers (an innocent party).

You're arguing against strawmen when you claim that people are arguing for FTDI to support these chips. Instead what people are arguing for is for FTDI to not brick them _intentionally_.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#214
post #207
post #174

Earlier quoted context omitted.

That's what FTDI did though. They pushed the malicious bricking driver through an automatic Windows Update to systems already running in production, no? That's pretty much the equivalent of going at high speed on the Autobahn.

I really don't know how Windows' automatic upgrades work, but I would be baffled if an UART driver was updated on-the-fly while it's being used. If I receive constant 1Mbps stream, the PLL doesn't even have time to stop/start? Or drivers are supposed to handle upgrade hand-off? Sounds crazy complicated, and I don't see the point of such a feature

Even if a reboot is involved, we're talking systems in production hooked up to live equipment.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#215

Earlier quoted context omitted.

Because the cost of someone picking up a reel of 10000 resistors, from a warehouse that has to be rented heated/cooled etc etc doesn't scale down to that 1 resistor, even if the shipping cost might... I know, it sucks! - I have seen many suppliers that cater for hobbyists around the world and will mail you a resistor in an envelope. But I'm sure that they don't make enough money to send you a certification and guaran…

> Because the cost of someone picking up a reel of 10000 resistors, from a warehouse that has to be rented heated/cooled etc etc doesn't scale down to that 1 resistor I understand that. But please charge me for what it costs. Don't let people with small orders pay the price for people with large orders. They already get discount for their order size! Or if this is not possible at least call it an order-picking fee, d…

Shipping costs are actually transparent at Digikey. It is exactly what they pay to USPS.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#216

Earlier quoted context omitted.

If I recall correctly, FTDI took some well deserved heat, but quickly discontinued this practice.

The really sad thing is that the FTDI clones worked better than the original ones. The original FT232R chips have a clocking bug that makes bitbang mode unusable for many applications, with no workaround (their errata sheet suggests a bullshit workaround of setting the clock speed to max, that is unusable in practice because USB can't keep up). It's supposedly fixed in a revision that I've never seen, and I believe t…

We too found that the FT232R is unusable in bitbang mode. After much to-and-froing, FTDI support eventually acknowledged that even their later hardware revision "C" is still buggy, despite what the errata sheet implied.

We switched to the FT230X, which works great.

Our detailed investigation: https://stb-tester.com/blog/2016/05/26/ir-post-mortem

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#217

Earlier quoted context omitted.

> You know you're dealing with counterfeits and you know they're unreliable, but you've somehow convinced yourself that despite all the uncovered variance sitting on the table, if you keep poking long enough until the component returns some non-edge-case value, then it "works fine". Yes? Because it usually does? If you test a bunch of fakes and they tend to be either basically accurate xor really inaccurate, and your…

"usually"..."basically"..."probably"...that's a lot of handwaving. Your usecase is both your prerogative and your folly to embrace; that's not the point. I poke fun at the OP because his qualifier for "works fine" is an indeterminate definition of eventually establishing some semblance of compliant 1-wire communication with a counterfeit component without even so much as batting an eye to question the accuracy of the…

I think the difference here is that you're taking this from the perspective of an actual engineer, and I'm a hobbyist (and I assumed the same of OP; I hope Real Engineers aren't getting parts off eBay). Which means that, yeah, I'm happy to handwave a lot. By software analogy, I write a lot of shell scripts and python, which is passable but hardly rigorous; if I wanted it to be Correct, I'd break out coq or write in Ada or something, but I just want something that usually works because the stakes are so low. Of course counterfeit parts aren't reliable, but if failure is an option then they're good enough.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#218

Trust in hardware supply chains when manufactring a PCB for a product can be quite fragile: when one component operates outside of spec, the entire device could be rendered useless. In the case of the DS18B20, the author states in the 'Warning' section that the primary way of determining counterfeit sensors is to check the ROM output compared to a known format. When counterfeit parts like this are added, it creates v…

> This anti-consumer behavior on behalf of companies I strongly disagree with this. I see no way to rationalize that a company should be responsible for ensuring that counterfeit devices work correctly by releasing drivers that are tolerant of them or do not stop them from functioning. FTDI's products are the combination of their hardware with their drivers. Both are required in order to delivery functionality and re…

Some hours later, reviewing all responses...

The primary counter argument to mine requires an inversion of responsibilities and ascribes criminality to the victim.

Devices got bricked because counterfeiters committed a crime in the first place.

Along the same lines, there are supply chain questions that are impossible to answer:

How many of these device manufacturers knowingly used fake chips because they cost less?

How many distributors knowingly shipped fake components because, again, they cost less and delivered higher margins?

How many device manufacturers were true innocent victims who did not know fake devices had been substituted for the real thing?

How many failures of import controls led to consumers receiving devices with fake chips?

I have had the experience of having major US electronics parts distributors knowingly substitute defective --yet genuine-- parts instead of the top grade parts we ordered. The effect was what the hardware sector generally refers to as "infant mortality", where your hardware fails early or becomes unreliable due to substandard components.

It took months for these effects to come out into the open and for the major US distributor to own up to this against the threat on our part of legal action. Not only did they replace all components with legitimate top grade parts, they also paid the costs involved in replacing the affected systems for our customers.

My guess is that the context lacking most, if not all, who disagree with my position perspective that comes from having "skin in the game" in the domain we are discussing.

The knee-jerk reaction is to think bricking these devices is bad for consumers, as if that would have been the end of the story. No, in a properly functioning economy and legal system this would and should lead to tracing through levels of responsibility as far as possible, with consumers being made whole with properly engineered and manufactured devices.

The end result of forcing FTDI to not protect their product from counterfeiters is that not one consumer today can be assured the devices they purchase has quality reliable parts that will function according to specifications. A chip can, quite literally, go up in flames (I had this happen to me with a cheap Chinese device) because we did not support FTDI in disallowing fake chips from the market.

Sure, there would have been short term pain and a bunch of companies and suppliers fixing their pipelines and designs. Yet, we would have emerged with an above-average guarantee of quality and performance and counterfeiters thinking real hard before doing what they do.

Instead the feedback we gave counterfeiters is "you win".

And the result we obtained for consumers is "you lose, forever".

This incident extends well past FTDI. Because the mob won and forced FTDI to accept fakes it now means nobody is going to take similar steps towards protecting their products. Which, in turn, means counterfeiters know they won and know they can get away with it. Consumers, once more, lose, big and in unknown ways.

We are swimming in a sea of fake products. The only way to stop this is if fake products become losing propositions for producers, suppliers, manufacturers and consumers.

I mentioned I had a chip go up in flames. A while back I bought a little humanoid robot directly from a vendor in China. One of these things with 15 to 20 servos and, typically, a mobile phone class processor powering it and the touch screen on the chest. I bought several of them as part of a business venture.

A couple of days after receiving them one of my kids was working with it on the table in the garage. As the robot walked, it failed to take a step and fell. It just planked onto the table, a 90 degree rotation from the toes, nothing too dramatic.

In an instant flames were shooting out of the chest. Flames, not smoke. Since we were in the garage it was an easy matter to open the door and toss the thing onto the driveway.

Upon inspection we found a crater at the center of the ARM processor on the main board. It failed and took a bunch of other parts with it.

I contacted the company and very specifically asked about the source of this processor. We were actually considering importing and modifying this robot in quantity for educational purposes. In other words, we had established an engineering relationship with this company, this wasn't a case of just another consumer buying their product.

They pretty much told me they bought the cheapest ARM processor clone they could source in China.

This was and was not a revelation to me. Having done business with China for some time, as well as having a number of friends and business acquaintances doing business in China, nothing surprises me any more.

The degree of supervision and cross checking you have to engage in when doing business with China is impossible for someone outside of manufacturing to grasp. It takes a lot of work to ensure safe products are landed in Europe and the US. When you deal with European or US companies this requirement almost disappears because you can generally trust they will deliver what they agreed to supply at the required level of quality.

Taking the case of this real product, this robot, as an example, it would have been far better if --through whatever mechanism-- the thing had been bricked by the processor manufacturer before it got into the hands of any consumer.

I cringe to think that this company likely sold tens of thousands of these units into homes and schools that could, due to fake chip issues and low component quality, go up in flames any time. We got lucky in that the robot ignited while we were there and under circumstances that were easy to control. This could have happened in the middle of the night and the story would have been potentially horrific.

Be careful to think that allowing consumers to be fed fake products of unknown quality and traceability equates to having a pro-consumer stance.

Due to this FTDI event it is likely consumers today have no clue what quality and safety has gone into the products they are using. This is not a good outcome. The right path would have been to take the pain of fixing the real problem and make consumers whole through both corporate responsibility and the legal system.

In other words, FTDI is a victim and consumers are now even larger victims because the fake chip content of their devices is likely to go well beyond a little USB chip. No way to know how far and wide this has gone. A clear case of good intentions actually causing more damage to consumers.

OK, I'm done. I don't expect to change anyone's mind. Just stating a perspective I think many don't have because they don't have practical experience at scale in the world of hardware manufacturing and support. If it makes even one person think this through, research and perhaps understand, I am satisfied.

Be tolerant of contrasting perspectives...you might just be wrong and not know it...or, even worse, one day you will be correct and the mob will dismiss you just as you have to others when you think you are right.

Tolerance is important. Don't punish, dismiss and ignore those who you do not agree with because one day that person could be you.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#219

Earlier quoted context omitted.

Another professional EE here. I never expect random chips bought off AliExpress/eBay/Amazon/etc to work, much less be genuine. I do expect breakout modules and the like to work, though I don't expect them to contain genuine parts. (That implies I'd never source from these places when it's a critical function.) I'm always surprised when people expect grey-market crud to perform just as well as top-dollar stuff....

I do electronics as a hobby. I sometimes buy chips from very dubious shops in China for fun. Some of these sources are sketchy even by Taobao/Aliexpress standards. Then I decap the chip by boiling the package in acid and inspect the die under a microscope. More than half of them are genuine. I get some nice surprises because even the chips that I expect to be absolutely fake can turn out to be genuine. So far I've se…

Not so with power transistors, you don't need a microscope to see that the dies found in off-brand power transistors are suspiciously small compared to equivalents from proper manufacturers.

Re: Your DS18B20 temperature sensor is likely a fake, counterfeit, clone

#220

Earlier quoted context omitted.

Both FTDI and Prolific have done this kind of thing. I switched to the CH340 a while back without any issues.

how about cp2102? I prefer it to ch340, for no reason though ))

Aha, I didn't know about the CP2102. Looks like I'll have to give one a whirl, and there's even a breakout board at Adafruit. I've used relatively few VCP adapters since I've been using microcontrollers with built-in VCP.

I was nervous about the CH340 because the Windows drivers seemed to come from some weird place in China, but maybe US sourced drivers aren't any more of a comfort in these times.

Post reply on HN