Hacker News new | past | comments | ask | show | jobs | submit login

Warm yourself with the tire-fire that is USB-C PD [1]

[1] https://twitter.com/whitequark/status/1035729916149604353




Oh boo hoo they enumerated an enormous number of corner cases, handled backwards compatibility, crappy cables, all sorts of things. It also reflects decades of back compatibility and painfully learned mistakes (consider mini-A) not to mention some weird pathologies (weird naming like hi-speed/ full-speed/ super-speed).

It sucks that the standard is so complex that a small number of design houses and consulting shops will end up with a de facto cartel of understanding the Sacred Knowledge, but nobody's stopping you coming up to speed by reading the whole spec and doing a lot of implementing. But it's not like you can build a solid TCP stack these days either simply by reading the original late 70s RFCs.

And you don't have to use this spec -- you can still use RS-449 if you think the USB spec has become overly complex. In fact I used that in a design only a few years ago!


> But it's not like you can build a solid TCP stack these days either simply by reading the original late 70s RFCs.

I literally did this. It's called smoltcp (https://github.com/m-labs/smoltcp) and we use it in production as an lwIP replacement with great results.


‘You can’t.”

‘You can and I have running code”.

This is why HN is great.


Does it work reliably on the open internet? AIUI, it's interoperability with all the edge cases of badly implemented protocols that leads to statements like GPs.


I love Hacker News. I was just looking for this library to use in my embedded toy.


I think it would be cool if a project had a self-imposed token count limit. The project would never be allowed to grow more than X tokens long.

Then you can guarantee the project is small and haiku-like forever!

LWIP started off small, and it grew...


The "smol" in "smoltcp" is mostly talking about the internal architecture and exposed API. For example, it will never support true zero-copy sockets, because the API burden due to restricting itself to safe Rust is too high.

I don't think any TCP/IP implementation is going to be "haiku-like", the protocol stack is way too messy.


the worst thing about having read the USB PD specification is having to live with this knowledge

Having done the same, I agree completely


Yeah, good luck with 5A on such small pins an pcb tracks, after prolonged usage. I see many problems with existing 500mA delivery, increased contact resistance, cold solder joints, and so on. Insurance is a must have.


I like how you can ask it for the country code the power is from


It's scary to consider that whoever added that "feature" was probably thinking of region-locking...

Before, I used to think that hardware specifications and protocols would be simpler purely because hardware people don't really like complexity and it would make implementation harder, and that was usually the case. Now it seems like elements of Enterprise Java have slowly creeped in...

The fact that the adapter has far more nonvolatile memory than it needs is somewhat unsettling, not just in the wasteful sense but also in the "hidden surveillance device" sense.


Yes.

The spec includes cryptographic signatures for the whole signal chain for "authenticity".

http://www.siliconch.com/authentication.html

http://www.usb.org/developers/presentations/USB_DevDays_Taip...


And companies have in fact used this to make their devices only work with their own brand of chargers. I know HP has at least, because I have one. Does a pretty great job of defeating the "universal" aspect of the Universal Serial Bus.

In addition to preventing the use of third party power bricks, it also makes all of those USB-C docks with power passthrough useless.


My god. I never thought I'd see the day they DRM power.


I am genuinely shocked. This is definitely not widely known.


And meanwhile Enterprise Java has become lightweight and simple (to use at least, - and the fact that TomEE exists implies that it possible to implement and support a compatible server even for a small company/team, as long as they know what they're doing.)


CS, EE, and computer engineering are going to be great careers for decades yet to come.


Is EE really a good career choice, though?


umm, is it not? Literally 1 week into an EE major.


Learn to program, really well.


>Warm yourself with the tire-fire that is USB-C PD [1]

A good idea is to not to let too many people on standard bodies.

Intel alone had more than enough clout to push the mass adoption.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: