←back to thread

A 10-Year Battery for AirTag

(www.elevationlab.com)
673 points dmd | 1 comments | | HN request time: 0.199s | source
Show context
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 #
1. 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).