Profile cover photo
Profile photo
Mathias Bynens
2,146 followers -
Front-end web developer
Front-end web developer

2,146 followers
About
Posts

Post has shared content
Sticky FAQ about Bad #USB   #TypeC   Legacy cables:

Thanks to +Mike Trieu for the suggestion.

Q : Why is a bad 3A resistor a problem?
A: 3A is bad because all of these cables and adapters are legacy host port adapter cable, meaning the other end of the cable is Type-A plug. The Type-A port and the vast majority of the devices that have Type-A ports were never designed to support 3A charging.

The cable lies to the phone by telling the phone it's attached to a pure 3A charging path, like the C-to-C cable to the OEM 3A charger that ships with the Nexus 6P/5X. The phone will attempt to draw 3A, but that may damage the weaker device you have the Type-A end of the cable plugged into.

Q: If I have a 1A or 2A charger, am I safe?
No, if you have a weaker charger, you are actually at MORE risk because your phone/tablet/laptop may not know to stop at the 1A or 2A limit the charger advertises because of the improper identifier in the cable.

Q: Do C to C cables have the same problem?
No. C to C cables do not have the same problem because they are required to be straight pass through and do not have a pullup built into the cable. If the other end of the cable is Type-C, then as long as you plug into a 3A charger (like the one you get with Nexus phones), you will get fast charging in a safe way.

Q: Can you recommend a Type-A charger? Is <insert some random Type-A charger from Amazon> safe? Is it fast?
I cannot review every charger, but as long as you have a safe compliant cable with a 56kΩ resistor, the phone will limit itself to safe levels of charging for Type-A chargers and hubs.

Whether or not a particular charger works best for your phone in terms of charge speed I cannot say definitively. It really depends on a ton of factors, including the protocols your phone and the charger supports. Phones and charger may be able to support up to 2.4A using various proprietary protocols with a safe cable.

Q: Can you recommend a Type-C fast charger?
I like the Google one. 2 Type-C ports, 22.5W total power.
https://store.google.com/product/usb_c_dual_port_charger

If you want a SUPER deluxe one, get the Pixel 2's charger. It will support up to 60W charging using USB PD. Fast charge your laptop. :)
https://store.google.com/product/universal_type_c_60w_charger

Q: How can I test the cable myself?
If you have a Chromebook Pixel :
https://plus.google.com/+BensonLeung/posts/jGP5249NppF

If you have a Nexus 6P/5X phone :
https://plus.google.com/+GeoffHoff/posts/eMsr1cyw75s

Or use CheckR:
https://play.google.com/store/apps/details?id=net.mderezynski.checkr

Q: I want to keep my bad cable. Is that OK?
Be very careful what you plug it into. If you must keep it, tag the cable with a label that says "3A bad cable" or something so that in a few years when you forget about this controversy, you don't grab that cable and damage a charger accidentally.

Q: Where can I find the USB spec to read up on this more?
http://www.usb.org/developers/usbtypec
Add a comment...

Post has attachment
Add a comment...

Post has shared content
Watch +Mathias Bynens showcase a series of obscure CSS fun facts in his talk "3.14 Things I Didn't Know About CSS": 
Add a comment...

Post has shared content
Learn all (and by that we mean: Yes, you'll actually learn a lot) about [Pile of Poo unicode character why doesn't G+ support Emoji?] in JS in this video of +Mathias Bynens talk .

http://2014.jsconf.eu/speakers/mathias-bynens-javascript-loves-unicode.html
Add a comment...

Post has attachment
Everything you always wanted to know about Unicode-aware regular expressions in ES6: https://mathiasbynens.be/notes/es6-unicode-regex
Add a comment...

Post has shared content
Today is a good day. I just had a call from a telemarketer. Did I yell and scream at them, you ask? Certainly not. Like a good IT administrator I put my skills to use for their benefit. Here's how the conversation went:

Computer: "Press 9 to not be contacted in the future. Press 4 to speak to someone about your mortgage issues"
<presses 4>
TM: "Hello, are you having problems paying your mortgage?"
Me: "Hi, this is the IT department. We intercepted your call as we detected a problem with you phone and need to fix it."
TM: "Oh... ok, well what do we need to do?"
Me: "We're going to need to fix the settings by pressing 4-6-8 and * at the same time"
TM: "Ok, nothing happened."
<alright, so he's not using a Polycom>
Me: "Are you using the new Polycom phones that we deployed?"
TM: "No, it's a Yealink"
Me: "Ok, I see. You haven't had the new Polycom phone deployed to your desk yet. Let me check our technical documentations for the Yealink."
<did a quick Google search, "yealink phone factory reset">
Me: "Alright, do you see an "OK" button on your phone?"
TM: "Yes I do"
Me: "Alright, you're going to press and hold that button for 10 seconds."
TM: "OK, pressing it now"
Me: "Perfect, let me know if you get a password request"
TM: "OK, nothing has popped up ye----"
<click>

That's right. I made a telemarketer unwittingly factory reset his phone which means he will be unable to make anymore calls until someone is able to reconfigure his phone and that will take at least an hour or longer if they can't do it right away!
Add a comment...

Post has shared content
rebeccapurple has landed in Chrome, WebKit & Firefox. Available in Canary (& Opera next) soon

http://src.chromium.org/viewvc/blink?view=revision&revision=179321

With thanks to +Mathias Bynens for this change that honors Eric Meyer's daughter, Rebecca.
Photo
Add a comment...

Post has attachment

Post has attachment
Mathias Bynens commented on a post on Blogger.
    <img alt="A rad wolf." src="pic1x.jpg" srcset="pic1x.jpg 1x, pic2x.jpg 2x, pic4x.jpg 4x">

The `pix1x.jpg 1x` bit in the `srcset` attribute value is redundant, as it’s already the `src` attribute value. The example could be simplified to:

    <img alt="A rad wolf." src="pic1x.jpg" srcset="pic2x.jpg 2x, pic4x.jpg 4x">

Hat tip: +Simon Pieters 
Add a comment...

Post has shared content
Next week: Belgian Night at SFHTML5
Featuring 100+ Belgian students and a talk by Opera's +Mathias Bynens. Can't wait!  Sign up at http://www.meetup.com/sfhtml5/events/164590802/
Photo
Add a comment...
Wait while more posts are being loaded