Binary modding a water dispenser to save me from pressing a button (2021)

practicapp.com

108 points by trinix912 4 days ago


GranPC - 2 days ago

> In the end, it took about 8 hours to get this project finished, which was spread out over multiple weeks. Considering that I usually fill my bottle once a day, and it takes about 50 seconds to do so, this will have a positive return-on-investment after only about 1.5 years!

Spoken like a true programmer. :)

koolba - a day ago

> Finally, we need to be aware that we can’t rely on the global variables to be initialized with a known value. Initializing it globally in this code would result in the compiler generating some instructions to be run before main() is called, which we can’t very easily patch into the original binary.

Assuming your increase the size of the binary, change the first instruction to jump to the end of the program, do your magic, perform the original first instruction, and finally jump to the second instruction. If the program itself does not self modify or otherwise examine its own size, this would get you to the original start with your modifications applied.

> In the end, it took about 8 hours to get this project finished, which was spread out over multiple weeks.

That’s incredible.

userbinator - a day ago

I'm surprised the manufacturer didn't enable code protection on the PIC.

If I were in need of a mod like this, I'd just wire another switch in parallel to control the appropriate solenoid.

rkagerer - a day ago

This is legitimately great stuff!

His expensive electronic device now functions, from a UI perspective, like a normal tap.

Thank goodness traditional taps just work, and were invented before all this "smart" technology made our stuff so annoying.

Evidlo - 2 days ago

When hacking a firmware like this, why can't you just rebuild the whole binary after modifying the decompiled source instead of patching a specific section of it?

noqc - 15 hours ago

Neat, but you don't need to drink water if you aren't thirsty.

likeabatterycar - a day ago

The only practical purpose of this appears to be to author a blog post about it.

The true hack would be to purchase a mechanical water filter, probably much higher quality for the money spent, and have it attached to the plumbing. Bonus is it works when the power's out.

Aren't these water dispensers built into most fridges nowadays?