←back to thread

A 10-Year Battery for AirTag

(www.elevationlab.com)
673 points dmd | 9 comments | | HN request time: 0.882s | source | bottom
1. saturn8601 ◴[] No.42458417[source]
Any chance that the AirTag could have a software memory leak that would normally be masked by cutting power once a year? Its possible right? The code must be written in something low level like C.

Would be kinda funny if 10 years from now the author gets his stuff stolen again and then discovers said memory leak crashed the Airtag 9 years ago. As Elon Musk likes to say: "The most ironic outcome is the most likely" . (OP I hope your stuff does not get stolen again, its just a joke)

replies(4): >>42462651 #>>42465095 #>>42465413 #>>42465871 #
2. smileybarry ◴[] No.42462651[source]
AirTags get updates regularly, so they'd probably get power-cycled sooner than that.
replies(1): >>42464796 #
3. kube-system ◴[] No.42464796[source]
They're not being updated any more frequently than they are already reporting their battery status, are they?
replies(1): >>42465566 #
4. buescher ◴[] No.42465095[source]
I would also imagine someone with a fleet of these would be pretty cheesed if Apple rolled out an update that drained some fair fraction of users' batteries, no matter how fast they fixed it.
5. fiatpandas ◴[] No.42465413[source]
That's a very good point. The system design of the airtags assumed a much shorter battery life, which may have led to decisions that would introduce issues at 10x battery life. Thinking more like overflow issues. But could also be a complete non-issue. Hard to say.
replies(1): >>42465608 #
6. unsnap_biceps ◴[] No.42465566{3}[source]
I would presume the battery status is sent as part of the beacon, firmware is updated only when the phone is locked and charging in range of the tag.
replies(1): >>42466019 #
7. duskwuff ◴[] No.42465608[source]
Given the resources on the device (it's a Nordic nRF52832 with 64 KB RAM), I'd expect any memory leaks or similar defects to show up well before a year.
8. Karliss ◴[] No.42465871[source]
Reasonably designed embedded device like that should be using a watchdog timer which automatically restarts it if code gets stuck (it's a basic hardware level feature available in almost all microcontrollers), and any crash should also cause a reboot.

Considering the nature of product there is no interactive interface, it doesn't perform any critical operation like motor or heater control which couldn't be easily interrupted and resumed a fraction of second later after the reboot. In case of memory leak or some kind of memory allocator error it would also be safe to reboot. User wouldn't even notice if this happened.

So even if something goes wrong, chance of it being uncrecoverable seems low. It would need to be either some kind of persistent storage bug causing it to get stuck in a bootloop (in which case battery change wouldn't help either), or high level logic error preventing normal functioning while keeping the main loop running without crash or getting stuck (writing code in higher level programming language wouldn't prevent a logic error).

9. kube-system ◴[] No.42466019{4}[source]
I believe that's correct. I get low battery notifications when I am out of range of mine, I think.