105 points · by cheeaun · 3y ago · 61 comments
https://panic.com/blog/the-lightning-digital-av-adapter-surp...
The future is now, old man.
Mind blown.
Keep it up, technological progress! :)
- How much do you think the NOR flash costs inside this cable?
- How big do you think the firmware actually is?
- 16MB Winbond NOR flash is like $0.70 with no price breaks (for me, I am not Apple making 1 million units) - there's no way they need 1MB for two slots, much less 16MB.
- These cables retail for $49.
Two firmware boot slots is standard practice because it is essentially free to provide in any higher-end consumer electronic device: especially one that is explicitly designed to be unplugged easily.
How many support claims are saved on this $49 cable because mid-update bricking does not occur?
In practice pretty much every embedded device I've worked on that has supported in-field firmware updates has had either double buffering and/or a recovery mode to limit the possibility of bricking.
For the products where every last penny really needs to get squeezed out of the BOM (toys, low-end appliances, ...) the ability to do in-field firmware upgrades itself is IME often one of the first things to go.
BTW, they don't have to double the flash memory. They just have to provide enough extra memory for a fallback updater that the boot code can load if the main firmware is corrupt. All the fallback updater has to handle is telling the computer it needs firmware and then installing the firmware the computer provides.
So presumably there is some UART to the cable, and the cable to the power adapter. Is it all stuffed in the cable treated as a USB device or is there some proprietary control on the laptop side to communicate with the cable?
http://www.righto.com/2013/06/teardown-and-exploration-of-ma...
Magsafe 3 with USBC makes this even easier https://www.reddit.com/r/UsbCHardware/comments/11309f3/comme...
The Lightning comms protocol is interesting too https://hackaday.com/2015/02/14/reverse-engineering-apples-l...
(Apple could have had you plug the other end that has the USB-C connector into the computer to do the firmware update, but that isn't particularly intuitive or user friendly).
- Anonymous* Disabling power output when the cable is not connected to a computer, so that a metal object touching the spring pins can't create a dangerous short circuit
* Driving the LED
Maybe because MacBooks can be charged via both USB-C and MagSafe connector it forms part of the safety mechanism against frying your motherboard and/or against arcing during connection/disconnection. Especially on the higher-end of the spectrum (e.g. 16-inch MacBooks with 140W MagSafe).
Sort of like the same way electric car chargers handshake before throwing amps down the cable.
The MagSafe connector only has three distinct contacts (there are five pins, but it's mirrored), so there has to be some protocol translation between USB PD and the single control signal used in MagSafe.
Another thought was something to do with monitoring current or degradation but I cant see why they couldn’t do the same things from either the computer in the power adaptor or the computer in the actual computer.
I'm on M2 MB Air, and it seems odd to me that it (seems to) runs off battery even when plugged in and fully charged. Mine has been plugged in at desk for over a week, every day when I get on it says it's "Power Source: Power Adapter" yet it battery charging goes "On Hold" and dwindles as if it's running off battery all day. For example, it's mid-day for me and I'm at 79% but it's never been unplugged.
My last was a MB Air 2013 so maybe this is new behavior that I'm just not used to, but it seems strange. If I had to unplug and leave, I'd expect to be leaving with 100% charge.
Edit: "Optimized Battery Charging" was turned on as commenter mentioned, thanks for the tech support HN!
This is a positive thing for the life of your battery, but if you do want to disable it, there's a setting in System Settings - click the 'i' in the circle next to Battery Health, and turn off 'Optimize Battery Charging' there.
I had optimized battery charging enabled but my Mac seemed to always charge to 100% - with Al Dente I can force it to do what I want.
And recently I found Al Dente pausing charging because the battery temp got too warm. So then I went down a rabbit hole and found out I could tweak the fans up slightly higher with iStat Menus (also part of my Set app sub). There are other utilities that will do similar things - those just happen to be two I use, especially since I tend to use my MBP plugged in the majority of the time.