r/hardwarehacking • • 3h ago

Reverse engineering a battery-drain issue in an EOL IoT thermostat, multiple power-management bugs found

1 Upvotes

I've been reverse engineering a battery-drain problem in the original Shelly TRV Gen1 (SHTRV-01), an EOL battery-powered Wi-Fi radiator thermostat.

What started as an attempt to understand why some of these devices drain a set of batteries in days instead of months has turned into a fairly deep investigation of the firmware's Wi-Fi power management and MCU sleep logic.

The hardware is particularly interesting because power management is split between two processors:

  • an EFM32GG11 main MCU running the Shelly application, thermostat, valve control and host-side power management;
  • a separate Silicon Labs WF200 Wi-Fi chip handling the radio and much of the Wi-Fi power-saving behavior.

I've been working primarily from the released firmware binaries, runtime logs and controlled firmware modifications.

The first lead: a recurring Wi-Fi recovery loop

Firmware 2.2.4 can repeatedly produce:

Beacon skip error! Attempt recovery
PS state 1
...
PS state 3

On affected devices this can happen roughly once per minute.

My first experimental patch simply bypassed this additional recovery path.

That stopped the loop while RSSI-dependent beacon skipping, Wi-Fi, Shelly Cloud and normal thermostat operation continued working.

But further RE showed that completely disabling the mechanism was the wrong solution.

The firmware maintains a value called real_beacon_skip, but interestingly this is not a direct skipped-beacon counter from the WF200.

The host derives it from a cumulative receive statistic.

I found several problems in the calculation and state handling, including a stale-state condition capable of making the recovery self-sustaining:

recovery condition
       ↓
recovery
       ↓
old measurement baseline cleared
       ↓
new baseline established
       ↓
not enough new data yet
       ↓
old recovery-triggering value evaluated again
       ↓
recovery
       ↓
      ...

I developed a second patch ("C-C") that fixes these conditions while retaining recovery based on fresh valid measurements.

It works on real hardware.

But the battery drain remained.

Interestingly, legitimate/fresh recovery decisions can still occur quite frequently – around 26–30/hour on some of my test devices.

So the visible recovery loop turned out to be a real firmware problem, but apparently not the complete explanation for the battery drain.

Updating the Wi-Fi firmware

Silicon Labs released WF200 firmware 3.18.0 on October 7, 2026.

One changelog entry immediately caught my attention:

device not sleeping after power-save mode change

The Shelly firmware contains the WF200 firmware image internally, so I relocated and replaced it with the official 3.18.0 image while retaining Shelly's existing host driver.

That required relocating the embedded WF200 image and fixing the corresponding references in the host firmware.

After static verification, the modified firmware booted successfully on real hardware:

Shelly host firmware: 2.2.4
FMAC host driver:     3.7.0
WF200 firmware:       3.18.0

Wi-Fi, Cloud communication and power-save transitions continued working.

Unfortunately, the battery drain remained.

Going deeper into the main MCU power management

I then started tracing the host-side power-management lifecycle.

That uncovered several additional problems involving requested/committed Wi-Fi power states, timeout handling, late asynchronous completions and sleep-inhibit ownership.

I created another correction ("A1") for those issues.

Eventually I tested a combined firmware containing:

Shelly 2.2.4
+ C-C recovery corrections
+ A1 host PM corrections
+ WF200 3.18.0

Again, everything worked.

And again, the device continued draining its batteries.

That negative result pushed the investigation further down into the EFM32 sleep implementation.

Then I found a rather interesting race condition

The main MCU uses reference counters to determine which energy mode it may enter.

Simplified:

B2 != 0             -> lighter / higher-power sleep
B2 == 0 && B3 != 0  -> deeper sleep

B3 has a permanent legitimate contribution in this firmware, so enabling an even deeper mode is not the objective.

The interesting part is B2.

B2 is effectively an aggregate reference counter shared by several subsystems. A component increments it while it requires the lighter sleep state and releases its claim afterwards.

But not every owner updates B2 using the same synchronization.

Some accesses are interrupt-protected.

Others perform an unprotected load/modify/store.

That creates a genuine stale-RMW race.

For example:

B2 = 1

Task A loads B2 (=1)
        ↓
context switch
        ↓
Task B releases its blocker:
B2: 1 -> 0
        ↓
Task A resumes
        ↓
Task A stores stale 1 + 1:
B2: 0 -> 2
        ↓
Task A eventually releases:
B2: 2 -> 1

Now B2 is 1 even though nobody owns the remaining reference.

That could leave subsequent idle periods restricted to the lighter/higher-power sleep state.

The opposite failure is possible as well: an update can be lost so that B2 reaches zero while another subsystem still legitimately owns a blocker.

So this is a real concurrency bug in the firmware.

The important unanswered question is whether it actually occurs in the field and whether it correlates with the battery drain.

Instead of fixing it immediately, I instrumented it

I could simply serialize all B2 operations and see whether battery life improves.

But that would give a fairly weak answer to the interesting question.

So I built a passive Host Sleep Observer instead.

It runs on an otherwise near-stock 2.2.4 host firmware with the stock WF200 3.16.1 firmware.

The observer records things such as:

sleep-state entry calls
B2 acquire/release operations
per-owner shadow balances
expected B2
actual B2
actual-vs-expected mismatch
first fault snapshot
Wi-Fi sleep veto samples

It does not correct B2 and none of the observer values influence the native sleep decision.

The idea is to catch the original firmware in the act.

Two physical TRVs are currently running this instrumentation.

One is a relatively healthy reference unit.

The other was switched to the observer immediately after an ~80-hour test during which it had been showing about 26.5 Beacon Recoveries/hour and had fallen to approximately 3.49 V.

So far:

observer validity errors:  0
B2 mismatches:             0
first captured B2 fault:   none

That's actually a useful result too.

The race is demonstrable from the code, but I don't yet have evidence that it occurs frequently on real hardware.

The observer tests therefore continue.

Where the investigation stands

At this point I've found several genuine firmware defects, but I still don't consider the battery-drain root cause solved.

So far the drain has survived:

complete Beacon Recovery bypass
        ↓
corrected Beacon Recovery logic
        ↓
targeted mDNS suppression
        ↓
WF200 3.18.0
        ↓
host PM lifecycle corrections
        ↓
A1 + C-C + WF200 3.18.0

I'm also building an experimental firmware containing all currently demonstrated corrections, including proper serialization of the shared sleep-blocker counter, for a later controlled hardware test.

But I'm keeping that separate from the observer experiment because I want to distinguish:

"this patch improves battery life"

from:

"this is the mechanism that actually caused the drain."

The latter is the much more interesting result.

The project has become a nice example of why low-power embedded bugs can be difficult to isolate: the visible high-level symptom may be real, but fixing it can simply expose another problem one layer further down.

I'll update this when the observer catches something interesting – or when enough runtime has accumulated to make the absence of a B2 fault interesting in itself.

More details

For anyone interested in the reverse-engineering details, I've been documenting the investigation here:

GitHub:

https://github.com/AbleMonster/Shelly-TRV-Gen1-2.2.4-Battery-Drain-Investigation

There was also a useful earlier discussion about the project on r/embedded

Previous r/embedded discussion:

https://www.reddit.com/r/embedded/comments/1x0jz5a/reverse_engineering_a_recurring_wifi_power_save/


r/hardwarehacking • • 4h ago

Help with Chinese "AI clock"

Post image
0 Upvotes

r/hardwarehacking • • 11h ago

Repurposing a Trezor Safe 3 as a USB authenticator and smart card with custom firmware

0 Upvotes

I maintain an experimental firmware project called feuristic, which repurposes a Trezor Safe 3. It replaces the cryptocurrency wallet application with a USB authenticator and smart card, while reusing the existing screen and two buttons.

The hardware comes in two relevant revisions: T2B1 with an STM32F427 and T3B1 with an STM32U585. They require separate builds. The firmware builds on Trezor’s published source and uses the device’s bootloader installation mechanism; this is not a hardware exploit or a way to extract a wallet seed.

Normal USB operation exposes FIDO HID for passkeys and CCID for OpenPGP/PIV operations. Two temporary modes expose a serial interface for time synchronisation and a FAT12 import volume for OTP/backup QR images. Leaving either mode restores the normal interfaces. The device screen is used to inspect and confirm sensitive operations.

The first physical campaign used a T2B1 on macOS. It exercised authentication, signing/decryption, OTP import and persistence after firmware updates. T3B1 physical testing is still pending.

Installing wipes the wallet and permanently removes original manufacturer attestation. This is unaudited development firmware for disposable identities on spare hardware. It is independent of Trezor/SatoshiLabs, provides no cryptocurrency wallet, and the third-party firmware warning remains.

The result is a different use for an existing device: its small screen becomes a confirmation interface for standard USB authentication and smart-card operations.


r/hardwarehacking • • 12h ago

JIDU6101, Populating & Adding USB port

1 Upvotes

I have an Openwrt flashed JIDU6101.

On usb query :

root@OpenWrt:~# ls /sys/bus/usb/devices

1-0:1.0 2-0:1.0 usb1 usb2

There is an empty - unpopulated -unsoldered USB slot on the board .

Has anyone ever tried to venture soldering an USB adapter and make it functional

Kindly suggest


r/hardwarehacking • • 5h ago

Use recent AI tools to root quest 3

0 Upvotes

Hello all, I am not much of a hacker but I am a huge proponent of my hardware is mine and I should be able to do what I want with it. It would be really hilarious/awesome if someone used the recent AI reverse engineering tools to root the quest 3 and replace meta OS with steam OS for the memes.


r/hardwarehacking • • 1d ago

I found a Blink camera by the side of the road. Is there anything I can do with it?

Thumbnail
gallery
31 Upvotes

Ideally I'd want to turn it into a camera I can take pictures with. I'd also be interested in running it as a video camera. I don't wanna go thru the effort of buying a sync module or anything. Is there anything I can realistically do with it?


r/hardwarehacking • • 1d ago

Free Browser Based PCB Design Viewer

Post image
5 Upvotes

r/hardwarehacking • • 1d ago

Has anybody worked with this kind of BMS? How can I debug the master?

Post image
5 Upvotes

Master: BQ78350 / Fuel gauge: BQ76200 / 14.4V (2P4S)

So I've been working on these Astera Titan BMS boards, some of them with cell issues and some of them with easy component level repair but I got 2 totally dead.

The cells voltage is going in the BQ76200 and the main voltage to the BAT pin, but I got no REGOUT voltage to the BQ78350. Would it be worth trying to replace the BQ76200?

Also, this 2 started throwing up the ALERT pin sometimes which means it "made something" for a second.

Finally, I know these guys talk in I2C but is there a way to extract the settings from the 78350? I would like to buy a debugger or some interface but I don't really know where to start.

As far as I know, the 76200 works alongside the BQ78350 but the most important data is this last one isnt?


r/hardwarehacking • • 21h ago

Designing a quiet, beginner-friendly home server – Year 12 design project (Everyone, 2 min)

Thumbnail
1 Upvotes

Hi everyone! I'm a Year 12 student in Australia working on my HSC Design and Technology major project. I'm designing a small, quiet home server built from reused computer parts that anyone could use to run things like game servers, file backups or AI tools from home.

I'd really appreciate your input, even if you've never heard of a home server. Beginners are exactly who I'm designing for.

- 10 questions, about 2 minutes
- Anonymous, no email needed
- Results only used for my school project

Survey: https://forms.gle/6w8WRU6bz8vzcuaz9

Thanks so much, and happy to answer any questions in the comments!


r/hardwarehacking • • 17h ago

Recently got the chance of playing with local AI on my previous smartphone

0 Upvotes

Hey! I recently got the chance of playing with local AI on my previous smartphone, here the specs:

  • OnePlus Nord CE 5G
  • Qualcomm Snapdragon 750G
  • 8GB RAM
  • Lineage OS 22 (Android 15)

As you can see in the picture, I got 3.5 tok/s per client running gemma-4-E2B and giving the exact same prompt simultaneously.

Looks like a project is starting here... If you are interested in contributing leave me a DM or comment!


r/hardwarehacking • • 23h ago

What to do

1 Upvotes

What should I choose

Hello,I'm new to this"hacking" gadgets think and I have seen a lot of flipper zero videos,how it works and even custom firmware!
Now,I have seen some other videos of a tool named m5 shark div development board and it seems a bit better on the price compared to flipper.
Now,I'd use the devices for copying 2nfc and rfid cards,universal IR remote,and making automated scripts for MY pc.i don't really know what can I use em for LEGALLY and i don't know what to choose between those two.
Can someone compare them to me or some actual users of the devices make a"review" like comment comparing them?
Thank you.


r/hardwarehacking • • 1d ago

Root Tesla

Thumbnail
youtube.com
1 Upvotes

r/hardwarehacking • • 1d ago

LibreHU: Trying to make the Jancar UJC201 / AC8257 head units more open

Thumbnail
1 Upvotes

r/hardwarehacking • • 1d ago

T70 smart watch hacking need help

Post image
3 Upvotes

I have a cheap t70 smart watch that I want to jailbreak to add small games any help would be appreciated


r/hardwarehacking • • 1d ago

Is it possible to program this ble module??

Post image
22 Upvotes

It uses a bc 417 as a main chip


r/hardwarehacking • • 23h ago

Could you take a look and tell me what the digital count is?

Thumbnail
gallery
0 Upvotes

Look at this—there’s a digital counter here, and a vehicle is parked. Could you take a look and tell me whether the digital count is accurate or incorrect?


r/hardwarehacking • • 1d ago

Can a NVRAM mod bypass a hardware-asserted PROCHOT# from a corroded pull-up resistor? (Airmont, Pentium N3710)

Thumbnail gallery
2 Upvotes

r/hardwarehacking • • 1d ago

Anyone familiar with Altierre/Agile Displays shelf labels? Can their displayed data be read wirelessly?

Post image
0 Upvotes

r/hardwarehacking • • 2d ago

Hanshow Nebular / HS9118 / TLSR8359 – Which programmer and software can read a full Flash dump?

Thumbnail
gallery
13 Upvotes

Hi everyone!

I'm trying to make a backup of the Flash memory from a Hanshow Nebular electronic shelf label. The controller on my board is marked Hanshow HS9118, which may be related to the Telink TLSR835x family, particularly the TLSR8359. I also have an NT083V electronic display equipped with a TLSR8359 chip.

I'm not interested in programming the microcontroller, writing code, or flashing alternative firmware. My only goal is to read the original memory contents and save them to a BIN file, if the chip allows it.

I want to preserve the original contents of the memory. I don't want to erase anything, change the chip's configuration, or modify the firmware.

What hardware and software should I use?

I've found the following tools and documentation related to Telink chips:

The board has several test points labeled SWS, NRST, VCC, and GND.

I'm considering using TLSRPGM or the official Telink BDT software, but I'm not sure which solution supports the TLSR8359 and allows Flash memory to be read. I'm also unsure whether I need a dedicated Telink programmer or if another interface would work.

Questions for anyone experienced with Telink TLSR835x chips

  1. Does TLSRPGM support the TLSR8359 or the Hanshow HS9118 controller?
  2. Can the official Telink BDT software read the Flash contents of this chip and save them to a BIN file?
  3. Which specific programmer and software would you recommend for this task?
  4. How should the programmer be connected to the SWS, NRST, VCC, and GND test points? Are any additional components or logic-level converters required?
  5. Would a standard USB-to-UART adapter, such as a CH340 or CP2102, be useful, or is a different interface required for SWS communication?
  6. Has anyone successfully read the original firmware from these electronic shelf labels without replacing it with OpenEPaperLink?

I also found this programmer on AliExpress and would appreciate feedback on whether it is suitable:

https://pl.aliexpress.com/i/1005008282301532.html

My main priority is confirming hardware compatibility and finding a safe way to read the memory. I don't want to perform any erase or write operations. I understand that reading the Flash may depend on the security settings enabled on the microcontroller, and I'm not looking for ways to bypass those protections.

I'd appreciate specific recommendations for a compatible programmer, the appropriate software, and instructions on how to connect everything correctly.

Thanks in advance for any help!


r/hardwarehacking • • 3d ago

PICS: Toilet Tube Tap found in OpenAI exec conference room in SF

Post image
379 Upvotes

An update on the Saudi who attempted to bug OpenAI’s executive conference room, including pictures of the device. The first reporting said it had memory and only recorded offline, but the Seeed Studio 2.4 GHz antenna is telling another story... ☁️

Can anyone identify it?
https://www.cnbc.com/2026/10/19/openai-bugging-suspect-alfozan-saudi-royal-family.html

EDIT2: Better photos of the implant from the FBI complaint: https://imgur.com/gallery/gnQSNSk#7QlpXVf

EDIT: FBI's 11-page complaint https://storage.courtlistener.com/recap/gov.uscourts.cand.480828/gov.uscourts.cand.480828.1.0.pdf


r/hardwarehacking • • 1d ago

Is it possible to program this HC 03 module

Thumbnail
gallery
0 Upvotes

Is it possible to program this HC 03 module . The module has processor, flash and several IO pins and uart so is there any way to program this like an MCU


r/hardwarehacking • • 2d ago

Custom firmware for a 2007 Sony Walkman: localization, custom UI, and homebrew

Thumbnail
youtube.com
3 Upvotes

r/hardwarehacking • • 3d ago

Hardware hacking

7 Upvotes

Anyone share me for hardware hacking learning material guys


r/hardwarehacking • • 2d ago

You tell me is this indicator its motherboard?

Thumbnail
gallery
0 Upvotes

Is there any engineer or person who can tell me by looking at the motherboard of the ID machine, the machine that breaks the readings, whether it is programmed by hacking or without hacking?


r/hardwarehacking • • 2d ago

Is this indicator a hacking board and that is why it is showing zero?

Post image
0 Upvotes

Look at the indicator, the external display, and the 'GM mode' positioned in between. Notice that the indicator shows 'No DLC'—yet, the display above it reads 'zero'. This clearly indicates that a 'hacking' program is fully active. If this weren't a hack, the display would either show dots or remain blank; I have operated this type of machine before, and I know that when 'No DLC' appears, the machine's display should show '---'. Since the machine is effectively signaling that it has no connection to the vehicle's data link, how is it possible for the external display to show 'zero'?