
Apple Lightning - captn3m0
https://nyansatan.github.io/lightning/
======
crazygringo
I'm curious -- what's the reason for something seemingly as simple as a
Lightning cable to have chips inside of it?

For most of computing history, I was generally under the impression that
cables were "dumb" \-- each pin connects to a wire which connects to a pin on
the other end. There's fancy bundling and twisting and whatever involved, but
it's still ultimately just conductive wires.

When did cables start getting chips, and why? Did Apple start it or somebody
else? Is it solely to try to prevent third-party manufacturers? Is it for the
cable to announce to the port that it supports certain specifications of power
or data? (But why would that require a chip instead of just some kind of
"dumb" extra pin that has some basic electrical property that can be read?) Is
it something else?

I mean I understand why certain _dongles_ have chips, because they're
connecting between sets of pins that aren't 1-1 or even in the same data
format at all. Or why the same might be true for USB-C to Lightning.

But for cables to go from "dumb" to "smart" seems like it kind of breaks all
expectations of what a cable even does, and therefore how a consumer will even
know what to purchase -- which, of course, has famously been a HUGE issue with
USB-C.

Would it be better for us to go back to dumb cables without chips? Or are
there good reasons why this is the future, where at some point we'll expect
_all_ computer cables to have them?

~~~
jojobas
How would you maintain such a margin on the cables if they could be "dumb"?

~~~
neotek
The last time I looked, the money Apple earned from the entirety of the MFi
program — not just cables, but every single third-party Apple accessory on
Earth — made up less than one half of one percent of their annual revenue.
It's such a vanishingly small part of their business.

It's far more likely that the purpose of MFi is to make sure that any
officially licensed accessories aren't pieces of shit that Apple will cop the
blame for. Most users aren't going to blame the cable manufacturer when their
phone won't charge properly, since the vast majority of people have no idea
about the complexities of modern charging protocols, so they're going to
mistakenly think the phone is at fault and blame Apple.

~~~
williamdclt
> every single third-party Apple accessory on Earth made up less than one half
> of one percent of their annual revenue

That makes me even more angry about the ridiculous price of these accessories

------
gumby
I love that the protocol uses the string “BREAK”. Old teletypes, and in
particular the iconic ASR-33 had a key marked “BREAK” that was not a
character; it simply held the line open. This could be interpreted by the
person on the other end as a sign to reset what was going on and start again,
or really anything that might have been pre-agreed.

With the advent of computing, and connecting teletypes to computers, it was
often used to trigger an NMI. Multics and the rainbow books cited it as a way
to make sure you were talking to the “real computer and not some program
impersonating your computer (since it wasn’t an actual character there was no
way for a normal program to even _see_ it much less generate it. The terminal
controller/channel controller could see it though and notify the monitor (what
we call the “kernel” these days).

~~~
TickleSteve
UARTs and serial protocols are still in very widespread use. A large
proportion of all embedded devices use them, which is arguably the majority of
all computing systems sold.

What you're implying is historical is still current.

~~~
gumby
Yep, and I know that UARTS still have built in break detection but keyboards
don’t have a BREAK key, or any rainbow book style “secure key to signal the
computer” function any more. Even the power switches on Mac laptops (and I
assume others), phones etc are soft functions.

I haven’t designed an embedded device or serial protocol that used break
since, well, ever. That’s why I was tickled to see this.

Edit: just saw your uname — my use of the term “tickled” was coincidental

------
userbinator
I bet most of the information in this article was already known by others,
mostly in the repair as well as the 3rd-party accessories businesses, and
either wasn't publicised or was not in English. I still remember the
announcement in a Chinese BBS a long time ago when the first company in
Shenzhen cracked the protocol --- a few weeks after Apple started using
Lightning.

Apple seems to like using 1-wire buses; here's another application of one:
[http://www.righto.com/2013/06/teardown-and-exploration-of-
ma...](http://www.righto.com/2013/06/teardown-and-exploration-of-magsafe.html)

~~~
mindfulhack
You're not wrong about your information, but interestingly your criticism
parallels that commonly levelled against Apple itself - that Apple's
innovation was "was already [achieved] by others". However, it wasn't yet
presented in a nice, easy to consume package all in one place - which is
sometimes just as significant as the raw engineering itself.

It's testament to the noteworthiness of both Apple and this article that here
we are talking about it all - about efforts cobbled together from other parts.

------
jchw
Interesting.

> To enable full current, 0x74 request must be issued by Tristar and processed
> by HiFive. For SecureROM/iBoot that's enough

I wonder if that means, in a pinch, you could turn off the device to use an
uncertified charger that iOS would block.

~~~
vxNsr
Unlikely, even if you shut the device down when you attach a charger it goes
into either a semi-on state or just turns on entirely. Even if you shut it
down while it’s plugged in.

~~~
jchw
I thought the “semi-on” state with the battery display was still just firmware
and not full iOS. If not, what exactly is it booting to display that? Surely
not an ordinary kernel?

~~~
userbinator
My experience is with the MTK platform but Apple may be similar; in which case
the battery display is done by neither "firmware" nor the full OS, but an
intermediate component:

[http://www.lieberbiber.de/2015/07/05/mediatek-details-
little...](http://www.lieberbiber.de/2015/07/05/mediatek-details-little-
kernel/)

~~~
saagarjha
I believe they are just one of the things you can "boot", alongside regular
iBoot in the boot partition and loaded appropriately by SecureROM. I'm pretty
sure the images at least ship inside IPSWs.

~~~
londons_explore
This is correct. That's because the "Charging" screen also sometimes has OEM
or carrier branding on, and error messages that might need to be i18n
translated eg. "battery failure", "overheat". It's much easier to do that with
a separate component rather than give every OEM the ability to flash and
recompile firmware.

------
jyriand
I wonder how many iPhone’s have been thrown away because it’s “not charging
anymore”. I have had two occasions where my iPhone was not charging and i went
to buy a new one, luckily both times shop assistants cleaned the socket,
pulled out all the dust balls etc and it was charging again.

~~~
oxymoron
I carry a tooth pick for this, but it’s annoying. I’m in the process of
switching out my main charging stations for Qi so I don’t have to bother with
it...

------
specialist
I love Lightning, long wished it'd conquer all, and expected to hate USB-C.

I kinda like USB-C.

I now half expect Apple's future mobile devices to not have any ports, will
just use wireless charging.

Apple AirPods are already pretty amazing. I haven't used any plugin headphones
6+ months. Not even my beloved Shure; which sound fantastic, but hot damn I
hate cables.

~~~
lostlogin
> I now half expect Apple's future mobile devices to not have any ports, will
> just use wireless charging.

Wonder where my pocket lint will accumulate if that happens.

~~~
gok
Speaker cavities

~~~
saagarjha
Why have speakers when you can just listen on your AirPods :)

~~~
gok
Gotta have alarms go off at embarrassing times somehow!

------
mobilio
This explain why you can't charge iPhone with "cheap cables".

~~~
peruvian
The only third party brand I trust is Anker.

~~~
covercash
Someone once commented here on HN that Apple engineering departments get boxes
of Anker cables delivered all the time since they’re so much better than
Apple’s own. I wish I had saved the link.

~~~
jbay808
Well, Apple seems to think strain relief doesn't meet their aesthetic
criteria, so that's not surprising.

~~~
PascLeRasc
I don't know what it is, but I've never broken a single Lightning cable since
I got my first iPhone in 2016. I still have 2 new-in-box cables from upgrades.
But a few weeks ago I was picking up a friend and when she got in my car she
said "Why do you have the Apple cable? They're so fragile" and immediately
tore the strain relief plugging her phone in.

~~~
Whatarethese
Wait so you dont tie your iPhone cable around a tree and swing on it while
your phone is charging! Shocker. I'm in the same boat at you, not a single
Apple cable failure in 10 years of using Apple products.

~~~
dkersten
I’ve had two apple cables fail over the past five years despite being mostly
just plugged into the charging ports of a powered (anker, hah!) usb hub on my
desk. The cable I keep in my bag for when I’m not home is an anker one.

------
Y_Y
> The information in this artcile is based on a lot of AppleInternal materials
> (leaked datasheets, schematics, source codes) I read in a diagonal
> direction.

What does "diagonal direction" mean here?

~~~
cpa
It means in a cursory manner.

edit: funny to see all that we all replied at the same time. Just to add to
the conversation, "diagonal reading" is not just a Russian idiom, it also
exists in French :)

~~~
dirkt
In German it's "querlesen" (read s.th. transversely, read s.th. across).

I guess Russian and French people start top left and stop bottom right, while
Germans start top center and end bottom center ... (at least that's what I
do).

------
floatingatoll
"Don't fry if you can't re-buy".

It seems necessary to point out here that if you fry your iOS device's
circuitry experimenting with this stuff, when they capture the device to
analyze what happened, you will likely end up paying for those repairs.

~~~
wyxuan
iOS is pretty stringent on power capacity coming through the wires. You'd have
to make your own jailbreak tweak (or modify a current one) to fry your device
with a cable

~~~
floatingatoll
"Don't brick" doesn't have the same rhyme to it.

For example: Since there's a process for altering on-connector data,
exercising that process could break a device in a way that disqualifies it for
warranty repair.

~~~
peterburkimsher
I think to myself that DFU mode actually stands for "Don't F Up" rather than
"Device Firmware Upgrade".

~~~
macintux
When I supported them I referred to it as “done f’d” instead, since it was
typically used to recover from something gone wrong.

------
saagarjha
> Many Lightning accessories I've played with have mirrored pinouts in their
> connectors

And some, like the “chimp” cables mentioned later, do actually care which
direction you plug them in :)

------
egwor
Does anyone know what the black box is that he's connecting to in the picture?
Is that the logic analyser or just some other accessory?

~~~
zxcvgm
looks like the DSLogic: [https://www.dreamsourcelab.com/product/dslogic-
series/](https://www.dreamsourcelab.com/product/dslogic-series/)

------
person_of_color
Could Apple come after this guy since he has access to leaked IP?

~~~
bkanber
Usually you can only go after the leaker or anyone republishing the IP. Simply
having access to it isn't a crime. Perhaps they could issue some sort of
takedown notice for the schematics.

~~~
nitrogen
Not a lawyer, but I seem to remember that trade secret law in California at
least covers information you know should be secret. So if I'm remembering
correctly, information derived from leaked docs would be subject to trade
secret law.

~~~
mindfulhack
IANAL also, but how would it play out in practice? Provisions in law are
different to what can happen in practice. Perhaps enough damage has to be
proven in order for remedy to be handed down?

And is it criminal violation, or just civil? And if civil, if the violation
happens overseas, not much can be done in practice, right? I don't know much
about American IP law.

------
max937
This cable is clearly superior to USB-C. Why can't they make USB-C easier to
plug in and reversible?

~~~
mmastrac
First of all, Apple was a contributing member to the USB-C group. [1]

Second of all, it is reversible (?)

It's inferior to USB-C in at least two ways:

1\. The part that wears out is inside the phone in Lightning and inside the
cable in USB-C

2\. Lightning is for the most part USB 2.0 capable (though there is a newer
USB 3.0 version - unsure how many devices/accessories support that).

[1] [https://9to5mac.com/2015/03/14/apple-invent-usb-
type-c/](https://9to5mac.com/2015/03/14/apple-invent-usb-type-c/)

~~~
mft_
n=1, but the feeling of ‘security’ of cables plugged into my MacBook Pro’s
ports seems to have gradually decreased with time. Some are now even slightly
position-dependent - I have to be very careful when copying files with some
devices not to even slightly nudge the laptop.

This may of course be that the there is too great a variance in the design and
manufacture of the male USB – C plugs leading to insecure connections… but
either way, it’s worse than any other USB standard (even micro) I’ve used, and
much worse than Lightning in this regard, in my experience

~~~
FabHK
I had the 2016 MBP, bought just when it came out, and now the same (long
story...), but built in 2020. The ports on the new one seem much more stable -
one has to plug it in, and then on the last millimetre there is increased
friction really holding it tight. I don't think the ports on my old machine
had that feature, and yes, they were very fragile - I'd basically kick off the
Time Machine backup on an external drive and leave the room, hoping that it
finishes!

The ports on the new one seem more stable, though. Maybe they've iterated and
improved it - think about how much time they had to optimise USB A.

~~~
meatmanek
This is good to know. You can get replacement USB-C boards[1] for the
2016/2017 MBP, and I've been wondering whether they have the improved ports
that newer model years got, or whether the replacement board would wear out as
quickly as the original board. Your experience suggests that maybe they're
using better ports.

1\. [https://www.ifixit.com/Store/Mac/MacBook-Pro-
Retina-A1706-A1...](https://www.ifixit.com/Store/Mac/MacBook-Pro-
Retina-A1706-A1707-Late-2016-2017-USB-C-Board/IF123-071?o=2)

------
exabrial
We'll probably never see USB-C from Apple because of the intense effort that
went into the NIH Syndrome to come up with this connector

~~~
thebruce87m
Well the alternative at the time was USB 3 Micro B. If you haven’t seen that
connector then I suggest you google it for a laugh.

Personally I’m glad Apple picked a robust, reversible connector and stuck with
it.

~~~
banana_giraffe
USB 3 Micro B was always funny to me. It's backwards compatible with USB 2
Micro connectors, so in theory it's a nice upgrade path at the time. In
practice, though, it's often used for USB HDDs, and often those drives
couldn't function reliably with the power levels of a USB 2 connection, so
using them with a USB 2 micro connector was not only much slower, but they'd
just power down randomly.

I like lightning connector, but it too has it's silly hacks. The HDMI dongles
are an amazing level of silliness, down to a slimmed down iOS image being
copied to the dongle and run there to enable a h264 decoder to run on the
dongle itself. It works, kinda sorta.

~~~
PascLeRasc
Wait, really? Do you have more information on the HDMI dongle? I'd read a
whole novel about that.

~~~
banana_giraffe
This twitter thread has more details:
[https://threadreaderapp.com/thread/1155148789977636864.html](https://threadreaderapp.com/thread/1155148789977636864.html)

There's been some discussion here on HN:
[https://news.ycombinator.com/item?id=20554462](https://news.ycombinator.com/item?id=20554462)

