News for hackers. Stuff that matters.
Re:Nintendo Switch is not USB-C compliant by dmoy on Thursday March 29, 2018 @10:48AM (#16707497)
I partly agree that it's a bit harder than before. But a lot of the faulty devices we're seeing are just straight up using an incorrect resistor value or similar, and apparently released to the public without proper testing.

Maybe that's on USB spec people for not having good material, but on the other hand maybe that's on the manufacturers for not hiring EEs who can actually read a damn spec sheet properly...

Re:Nintendo Switch is not USB-C compliant by TheSoftwareGuy on Thursday March 29, 2018 @11:45AM (#16707975)
>EEs who can actually read a damn spec sheet properly...

I think this is the hardware equivalent of expecting programmers to write bug free code on the first try.

Most of the time when a programmer wants to implement something a little complex and a little outside their expertise, they use an external library. Likewise, EEs will often buy a chip produced by a third party manufacturer and use that to handle it. But the abstractions available to EEs are often a bit more leaky than those available to us programmers, since they are more constrained by the laws of physics. and as a result that third party chip is still harder to use than a software library.

Re:Nintendo Switch is not USB-C compliant by ChuckMcM on Thursday March 29, 2018 @03:47PM (#16710463)
That isn't the way EE's are trained in my experience. When new hardware is designed that is outside the EE's experience there is usually an evaluation board available from the manufacturer. They get one of those in house, read the application notes and data sheets, and use their test equipment to observe the 'proper' signal levels and waveforms on a correctly implemented system.

Then they add this part to their design, and lay out the schematic and the printed circuit board according to best practices by the manufacturer. Once the first boards return they put measure the signal levels and waveforms in their circuit to verify they are with the specifications and that they match the ones on the eval board. Then they will 'corner' test the circuit (corners are low/hi temperature range, low and high voltage range) and verify it continues to work according to specification at all the 'corners' (if it does then you are generally ok with assuming it will work at all points "inside" those for corners.)

There are people who are either in a hurry or don't care who wire something up according to the application note, power it up once and call it 'good'. I've seen a number of cost reduced 'clone' equivalents that meet that description. @kens has done a number of blog posts that show this sort of mentality in detail.

Re:Nintendo Switch is not USB-C compliant by taeric on Thursday March 29, 2018 @07:50PM (#16712326)
Your process outlined here takes time and is likely part of why the quality ones aren't to market yet. :(
Re:Nintendo Switch is not USB-C compliant by baddox on Thursday March 29, 2018 @01:55PM (#16709306)
On the first try? I would hope that hardware manufacturers don't take the engineers' first attempt and immediately go into mass production.
Re:Nintendo Switch is not USB-C compliant by throwahey on Thursday March 29, 2018 @01:37PM (#16709083)
That is still an avoidable error. You shouldn't be adding parts without understanding how they work or how they will affect your circuit as a whole.
Re:Nintendo Switch is not USB-C compliant by ljm on Thursday March 29, 2018 @02:22PM (#16709612)
Is it really that simple? Just changing a resistor value? I got an XPS 13 for work, it’s all USB-C, and the versatility of the port is fantastic (doesn’t matter which port I plug into, it still charges, so I don’t have to wrap the power cable around the back of the machine or sit in a weird position to keep some slack in the wire). However, I took it to the office and naturally I plugged my power adapter into one port. I then plugged in the monitor (also USB-C, delivering power), and the two ports cancelled themselves out and confused the OS. Windows thought I was charging the laptop yet it also said the battery was depleting. They were negating each other and the battery loss continued as it would with no power connected.

It makes sense for a monitor to power the laptop because it’s mains connected. But then you have one of those classic programming problems: if there are multiple inputs providing the same thing which do you consider the source of truth?

Re:Nintendo Switch is not USB-C compliant by samhain on Thursday March 29, 2018 @08:10PM (#16712440)
USB PD requires communication over the CC pins via setting different resistor values and checking them at specific times in the hand shaking process. The communication in the latest spec is supposed to happen at about 300kbs using a specific protocol on a specific CC line. There have been multiple specs since about 2011, some of which used communication over the VBUS line using BFSK, which has since been deprecated. This adds to the confusion.
Re:Nintendo Switch is not USB-C compliant by dmoy on Thursday March 29, 2018 @05:38PM (#16711299)
There are some USB c complaince issues which are yes literally just the wrong resistor.

What you're describing might go beyond that though, in particular if there's multiple ports and hubs involved, that could be not just a usb problem.

Re:Nintendo Switch is not USB-C compliant by nol13 on Thursday March 29, 2018 @06:31PM (#16711731)
Hmm, this have anything to do with why trying to hook up my macbook to external monitor with usb-c to display port cable blew my motherboard today?
Re:Nintendo Switch is not USB-C compliant by criddell on Thursday March 29, 2018 @04:03PM (#16710562)
They could always ask the user if they are that confused then remember the answer so they don't have to ask again.
Re:Nintendo Switch is not USB-C compliant by ljm on Thursday March 29, 2018 @07:52PM (#16712338)
Can you imagine a typical laptop user who assumes everything 'just works' (like me, by virtue of thinking I need to power my laptop while attaching a powered monitor) seeing a prompt in the OS about which thing should provide power and which should either reject it or use it to charge a battery?
Re:Nintendo Switch is not USB-C compliant by acct1771 on Friday March 30, 2018 @10:21AM (#16716290)
Can you imagine someone not understanding a clearly worded UI that they use to do the things they have to do to function in society?
Re:Nintendo Switch is not USB-C compliant by kalleboo on Friday March 30, 2018 @12:14AM (#16713624)
On Macs, it will choose the power supply that advertises the highest available wattage. This has been working flawlessly on my MacBook Pro.
Re:Nintendo Switch is not USB-C compliant by heisenbergs on Thursday March 29, 2018 @11:11AM (#16707660)
This was the case when the original USB came out first too. It took a good couple of years to mature. I think these are normal standardization issues...
Re:Nintendo Switch is not USB-C compliant by Someone1234 on Thursday March 29, 2018 @11:39AM (#16707920)
Difference is that when the original USB spec came out it wasn't delivering enough power to kill somebody, contrast that with today where a USB-C error could be fatal.

See: https://www.theverge.com/2016/2/4/10916264/usb-c-russian-rou...

Re:Nintendo Switch is not USB-C compliant by MisterTea on Thursday March 29, 2018 @11:57AM (#16708069)
This is incorrect. The high power charge is 20 volts, below the safe threshold of ~50V set by such agencies as: OSHA, NFPA, ANSI, IEEE, UL, IEC and others.

The real difference is USB was a completely new technology with zero market penetration so growing pains were inevitable. USB-C should not have these growing pains as they should have learned from 20+ years of developing the standard.

Re:Nintendo Switch is not USB-C compliant by derefr on Thursday March 29, 2018 @01:59PM (#16709358)
Is it really large, established manufacturers who are making these mistakes? Or is it random fist-time hardware entrepreneurs in Shenzhen?

Analogy: we don’t blame Javascript-the-language-standard for the Node community’s constant (and usually half-assed) reinvention of build tools. Javascript itself didn’t cause that. More than likely, it was a glut of newbie developers joining the community—and building tools for one-another, rather than leaving it to the experienced people—that caused that.

Re:Nintendo Switch is not USB-C compliant by nvarsj on Thursday March 29, 2018 @02:14PM (#16709500)
> Is it really large, established manufacturers who are making these mistakes?

Yes. Just read the NathanK or Benson google+ pages. Very few USB-C accessories are compliant - almost every one has some bug in its implementation, some worse than others. Apple cables are good, but even they took a couple iterations to get it right.

Re:Nintendo Switch is not USB-C compliant by zrobotics on Thursday March 29, 2018 @02:36PM (#16709790)
Considering this article is about the switch not being compliant, yes. Nintendo has quite a lot of experience making hardware, and they didn't get it right. Right now USB-c is a mess, and I'm not aware of any controllers on the market that are compliant and easy to use.
Re:Nintendo Switch is not USB-C compliant by shkkmo on Thursday March 29, 2018 @03:29PM (#16710324)
Yes, Anker had to issue a recall for a USB C cable that could fry devices:

https://www.theregister.co.uk/2016/08/30/anker_usbc_cables_r...

Re:Nintendo Switch is not USB-C compliant by gok on Thursday March 29, 2018 @12:51PM (#16708592)
There is relatively little risk of electrocution but 100 watts can still be more dangerous than 10 watts. Overheating and fire are a much bigger risk.
Re:Nintendo Switch is not USB-C compliant by ko27 on Thursday March 29, 2018 @12:11PM (#16708184)
5V to 20V can be fatal?
Re:Nintendo Switch is not USB-C compliant by triangleman on Thursday March 29, 2018 @12:23PM (#16708292)
Indirectly, it could start a fire...
Re:Nintendo Switch is not USB-C compliant by boomlinde on Thursday March 29, 2018 @12:34PM (#16708417)
A 9V battery in the wrong place can kill you.
Re:Nintendo Switch is not USB-C compliant by munificent on Thursday March 29, 2018 @12:46PM (#16708532)
As can a AAA battery, if accelerated sufficiently beforehand.
Re:Nintendo Switch is not USB-C compliant by boomlinde on Thursday March 29, 2018 @01:14PM (#16708811)
Well, I mean from electrocution specifically. 100-200mA through your heart is probably going to be fatal, and the low resistance required for that to happen with a simple 9V battery source has at least once been achieved by inserting multimeter probes in the thumbs such that the current passed via the blood stream through the heart, causing fibrillation.

Interestingly, there exists a sort of upper threshold where the amperage is less likely to be fatal due to severe cramps preventing fibrillation IIRC.

Re:Nintendo Switch is not USB-C compliant by beenBoutIT on Thursday March 29, 2018 @03:13PM (#16710180)
Sadly it's tiny watch batteries in the wrong place doing most of the killing and disfiguring.
Re:Nintendo Switch is not USB-C compliant by bshacklett on Thursday March 29, 2018 @01:10PM (#16708772)
Would you care to give us a scenario? The best source I could find places the minimum resistance of already damaged human skin at 500 ohms. With 9v of potential, that translates to .018 amps of current, which is just barely above the threshold for sensation, let alone death.
Re:Nintendo Switch is not USB-C compliant by boomlinde on Thursday March 29, 2018 @01:36PM (#16709078)
0.018 is way above the threshold of sensation, well into the territory of very painful shocks (18 times the threshold of sensation at ~1mA). Of course this will usually be local with a 9V battery, but with some deliberation you can pass the current through your heart via the blood stream, where the resistance is sometimes much lower which can get you very close to what'll likely be fatal.

Edit: the above holds true for AC but not necessarily for DC from a battery, where the thresholds are typically higher. But the heart is very sensitive and fibrillation occurs at very low currents passing directly through it.

Re:Nintendo Switch is not USB-C compliant by lightedman on Thursday March 29, 2018 @12:18PM (#16708245)
I can kill you with a 12V car battery at 8 amps clamped to your fingers, no problem.
Re:Nintendo Switch is not USB-C compliant by wlesieutre on Thursday March 29, 2018 @12:58PM (#16708650)
No you can't. It has the capacity to deliver 8 amps, but your body's resistance is too high to draw that current.

https://www.seattlepi.com/news/article/Car-Talk-Car-battery-...

EDIT - here's some math:

The U.S. Navy FIRE CONTROLMAN Volumes 01 - 06 & FIREMAN gives 1500 ohms as a common resistance approximation between extremities, either hand to hand or hand to foot, for an average human body.

I = V/R = 12V / 1500 Ohms = 0.008 A

8 mA is not nearly enough to kill you.

Re:Nintendo Switch is not USB-C compliant by FreeFull on Thursday March 29, 2018 @05:20PM (#16711121)
On the other hand, if skin is breached, the resistance is quite a bit smaller, and it won't take too much voltage to cause a deadly current.
Re:Nintendo Switch is not USB-C compliant by wlesieutre on Thursday March 29, 2018 @06:05PM (#16711497)
There's a story floating around the internet of someone having done by stabbing through their thumbs with a 9V multimeter, and maybe it's possible, but I'm skeptical of the story's veracity. I can see those wacky stories for a lot of situations, but you'd think with somebody dying that there'd be some kind of incident report or other documentation.

But sure, it's probably best to not touch the car battery terminals when your hands are bleeding.

Re:Nintendo Switch is not USB-C compliant by planteen on Thursday March 29, 2018 @01:19PM (#16708889)
No way. If that were the case, people would be dying all the time when trying to jump cars. You would need to wear lineman gloves to do it safely and working on cars in general would be quite hazardous. I've touched both car battery terminals before. You don't feel a thing.
Re:Nintendo Switch is not USB-C compliant by olyjohn on Thursday March 29, 2018 @01:01PM (#16708680)
I'm genuinely curious how you'd do that... I can touch both battery terminals with my hands and feel nothing. Even if my hands are damp, nothing happens. My battery is capable of outputting over 700amps.
Re:Nintendo Switch is not USB-C compliant by mikeash on Thursday March 29, 2018 @01:20PM (#16708892)
People have latched on to the mantra that it’s not the volts that kill you, it’s the amps, but they never seem to remember that you need a certain voltage to get those amps in the first place.
Re:Nintendo Switch is not USB-C compliant by planteen on Thursday March 29, 2018 @02:36PM (#16709789)
Exactly. And also the mantra "electricity takes the path of least resistance". While that is true, some people seem to interpret it as "electricity only takes the path of least resistance" which is very wrong. Electricity takes all paths!
Re:Nintendo Switch is not USB-C compliant by setr on Thursday March 29, 2018 @03:19PM (#16710231)
I don't know squat about electricity

If electricity takes all paths, then whats the point of the mantra? It includes the highest and least resistance, and everything in between. The mantra is almost deliberately meant to mislead?

Re:Nintendo Switch is not USB-C compliant by jschwartzi on Thursday March 29, 2018 @07:15PM (#16712099)
It's technically correct, but the path of least resistance is the path of least resistance at the instant of measurement. Voltage and current are abstractions that represent the aggregate motion of charge carriers in a medium. Like charge carriers repel each other. At any instant, an individual charge carrier will take the path of least resistance. Calculus is required to model the current in a non-trivial system. It frequently leads to counter-intuitive results.

In short, it's complicated.

Re:Nintendo Switch is not USB-C compliant by Robin_Message on Friday March 30, 2018 @10:17AM (#16716263)
A better mantra would be: electricity takes all paths in inverse proportion to their resistance.

So with a single low resistance path, give or take, all the electricity will go that way. But with two paths of equal resistance, half the electricity will go each way.

Re:Nintendo Switch is not USB-C compliant by planteen on Thursday March 29, 2018 @03:29PM (#16710320)
> If electricity takes all paths, then whats the point of the mantra? It includes the highest and least resistance, and everything in between. The mantra is almost deliberately meant to mislead?

Maybe mantra wasn't the right word, Wikipedia calls it a heuristic. Regardless, I agree it is very misleading and I would never say anything like that when teaching or explaining electricity. Why does it keep getting repeated? Who knows. Inertia of the masses without a much understanding of electricity would be my guess...

https://en.wikipedia.org/wiki/Path_of_least_resistance

Re:Nintendo Switch is not USB-C compliant by Dylan16807 on Thursday March 29, 2018 @05:52PM (#16711398)
Most of the power goes along the path of least resistance. It's an oversimplification, but you'll make much more dangerous mistakes if you let intuition lead you into assuming a pretty spread-out flow.
Re:Nintendo Switch is not USB-C compliant by kbutler on Thursday March 29, 2018 @03:50PM (#16710479)
Electricity takes the path of least resistance...and all other paths, in amounts depending on their resistance.
Re:Nintendo Switch is not USB-C compliant by zrobotics on Thursday March 29, 2018 @02:41PM (#16709851)
Well, to be fair he said he could. Yes, it would be possible using a boost converter to jump the voltage, you can certainly draw enough current from an auto battery. But without using external components the only way a car battery would kill you is by creating a spark and igniting hydrogen that the battery produced.
Re:Nintendo Switch is not USB-C compliant by ars on Thursday March 29, 2018 @05:10PM (#16711050)
If you pierce the skin with the "teeth" of the clamp you can do it, the lower resistance will be enough to send lethal amounts of current.
Re:Nintendo Switch is not USB-C compliant by robotrout on Thursday March 29, 2018 @01:23PM (#16708929)
You don't die instantly. You are able to take exactly 5 steps before you die.
Re:Nintendo Switch is not USB-C compliant by mlindner on Thursday March 29, 2018 @06:44PM (#16711864)
False. USB-C cannot be fatal.
Re:Nintendo Switch is not USB-C compliant by sundvor on Thursday March 29, 2018 @06:09PM (#16711540)
Yeah, agreed - those things never worked. It took something like a decade before it got properly reliable.
Re:Nintendo Switch is not USB-C compliant by logicallee on Thursday March 29, 2018 @12:45PM (#16708525)
It must be more than "engineers can't read a spec" because decices using previous versions of USB tend to be fine. So why can engineers read those specs? (Why didn't they "choose an incorrect resistor value" for previous generations of USB, then?)

This spec by contrast must be far more complicated[1]; also since it is so much faster, can't quality components supporting it all be more expensive - leading to cutting corners as a cost cutting feature?

Also if as a consumer you can't predict what "should" be about to happen (which way power will flow, what will be host) that is down to a bad spec re connector types. For example couldn't a universal visual indicator on a port (including the bottom of a phone) indicate its capabilities and what will happen very clearly? (Through symbols.) They do not. Couldn't a software popup make you choose? They do not.

Not to mention that it is not clear what should happen. If a phone can power a USB peripheral (like usb on the go) that means it could charge a second phone.

So if you connect two phones which one should charge the other? With old versions of USB phones the answer is simple: whichever one you put an on the go converter into, making it a master instead of a phone's usual role as a slave.

The fact that the spec does not make these as clear for USB C is down to the spec and design.

Can't USV C simply be badly designed? (overdesigned, underdesigned, badly designed.)

[1] Consider that a 1-page spec that can be read and implemented quickly in 15 minutes, can be implemented by anyone. A five-thousand page spec that takes 1,000 hours to read and understand can be implemented by no one (only teams). In between we have both previous versions of USB and USB C - but is it possible that USB C is too far in the latter direction?

Re:Nintendo Switch is not USB-C compliant by daurnimator on Thursday March 29, 2018 @08:12PM (#16712455)
> Couldn't a software popup make you choose? They do not.

They do when I e.g. connect two android phones together.

Re:Nintendo Switch is not USB-C compliant by logicallee on Thursday March 29, 2018 @11:14PM (#16713422)
Got it (never tried it).
Re:Nintendo Switch is not USB-C compliant by Cthulhu_ on Thursday March 29, 2018 @11:44AM (#16707958)
Is it just a resistor, or is it one of hundreds of possible resistor depending on factor X? USB or any connection should be simple - you know, like code. The more exceptions and options you add, the harder it becomes to properly implement it. This is exponential, too, not linear.
Re:Nintendo Switch is not USB-C compliant by amluto on Thursday March 29, 2018 @01:57PM (#16709334)
A sane USB-C spec would not have required a resistor for an A-to-C cable.
Re:Nintendo Switch is not USB-C compliant by kjdndisneinj on Thursday March 29, 2018 @04:08PM (#16710594)
A single resistor is seriously not challenging to get right. If they can't do that they sure as hell shouldn't be making a cable.
Re:Nintendo Switch is not USB-C compliant by amluto on Thursday March 29, 2018 @06:29PM (#16711703)
Your average cable is some wire, some connectors, and plastic. Adding a resistor adds a whole extra element to the process, which is a big deal for a part that sells for probably well under $1 wholesale. Cable shops probably have no experience with circuits. The USB-C spec for some reason made it so that cables with no resistor or with the wrong resistor still seem to work but are unsafe. Of course the result is a mess.
Re:Nintendo Switch is not USB-C compliant by tadfisher on Thursday March 29, 2018 @06:47PM (#16711883)
Just about every video game console made between the late 1980s and mid-2000s had an official video-out cable with one or more resistors [1]. It's not an unheard-of thing.

[1]: http://members.optusnet.com.au/eviltim/gamescart/gamescart.h...

Re:Nintendo Switch is not USB-C compliant by fjsolwmv on Thursday March 29, 2018 @10:51AM (#16707524)
It's cost cutting to make cheaper cables and ports.
Re:Nintendo Switch is not USB-C compliant by lvh on Thursday March 29, 2018 @11:03AM (#16707614)
Or intentional trivial incompatibility to sell _more expensive_ cables and ports :)
Re:Nintendo Switch is not USB-C compliant by gregmac on Thursday March 29, 2018 @12:47PM (#16708543)
That's a scary possibility. Flood the market with barely-functional garbage in the low range so that consumers can't figure out which cheap ones are actually usable and just pay more to avoid the headache.

It's not dissimilar to the box store HDMI/audio/etc cable strategy: Cheap, absolutely garbage cables at a mid-range price, or upper-mid-range cables at grossly over-inflated prices. Consumers tricked because of course the $200 HDMI cable looks noticeable better than the $20 one. Reality is the real retail prices of cables they're comparing should be more like $2 and $20, and the difference between that $20 cable and one that actually would cost $200 is only noticeable with high-end test equipment (or by 'audiophiles', who have the super-power of being able to see/hear a difference in cables as long as they know the price).