>>21439997 . Extracting the configurations by means of the video failed: `Failed to extract keys` (from both the 2 MB file and the 72 kB file). I clicked through all the pins in GPIO Doctor and found 3 pieces from relay, button and wifi led and they turned out to be the same as in the configuration I imported earlier (QNCX) Generic Smart Plug with Energy Measurement (T34) (LSPA9 clone).
I re-imported this configuration and, to my delight, the button started working!
Chip temperature: 58 °C. Is this the normal temperature of the socket standby chip?
This is a tiny temperature and in addition it is only shown for reference, it is not a precise measurement. For comparison, my dev board:
.
My LEDs above the window:
.
If you want to try to reduce the temperature and you are not using BL0937, you can try to autoexec.bat or to the startup command line add PowerSave 1 .
>>21440305 . Thanks, you've cleared up my doubts. I care about the energy measurement, so I'll leave it as is. I may end up taping the housing already (maybe I'll try to add a screw or two).
Hi everyone,
I've been following this thread because I'm interested in flashing a smart plug that uses these chips. However, I'm quite new to this topic and would really appreciate some guidance.
1. Which schematic should I follow to perform the flash? Should I connect to the T34 chip, or are the flashing pins also available on the BL0937?
2. Is the 3V supply from the TTL-USB adapter sufficient, or do I need an external power source?
3. Which specific firmware should I flash?
welcome,
1. Go the way that suits you. If it does not work, choose another.
2. This depends on the adapter. If it has a big capacitor, it could work. If not, better use an external power supply.
3. Go with the newest, maybe visit the changelog to be informed about bigger changes.
>>21451202 1. I'd rather not, we're talking microsoldering here, I don't wanna go trial and error if people have already done and found the correct way before me. Also, that doesn't really answer my question regarding if the pins on the BL0937 can be used or not. 2. This is the adapter that I have https://www.amazon.it/dp/B07TFSZ3ZP is there a way to tell if it's gonna work? 3. Umm, I only know about this tool https://github.com/openshwprojects/BK7231GUIFlashTool and I'm not really sure what chip to select when flashing as none of the ones I have are listed?
>>21451202 1. I'd rather not, we're talking microsoldering here, I don't wanna go trial and error if people have already done and found the correct way before me. Also, that doesn't really answer my question regarding if the pins on the BL0937 can be used or not.
2. This is the adapter that I have https://www.amazon.it/dp/B07TFSZ3ZP is there a way to tell if it's gonna work?
3. Umm, I only know about this tool https://github.com/openshwprojects/BK7231GUIFlashTool and I'm not really sure what chip to select when flashing as none of the ones I have are listed?
Trying to answer your questions:
If the layout of your T34 chip allows to access the pins with needles, you may try to adopt the solutions shown in this thread:
https://www.elektroda.com/rtvforum/topic4051203.html The pins are not connected to the BL0937.
Usually it's impossible to tell if a specific adapter works, but they usually do. I would advise to use a separate power supply in every case, but it might be sufficient to power the pins of the plug with a power supply, sometimes 12 to 15V is enough to start the plug without connecting to high voltage.
Usually it's impossible to tell if a specific adapter works, but they usually do. I would advise to use a separate power supply in every case, but it might be sufficient to power the pins of the plug with a power supply, sometimes 12 to 15V is enough to start the plug without connecting to high voltage.
I'm not quite sure about one thing: why do I need to supply 12/15V if the pin requires 3.3V? Wouldn't I risk damaging something by providing 12V?
Also, I noticed that some people add a capacitor to the TTL. Why is that? Is there a guide I can read to understand how to do it? Unfortunately, I couldn't find much on the forum.
connect 12V DC to the input of the plug directly. Not to the 3.3V rail
Exactly, sorry if this was not clear.
I have some plugs which works perfectly on 12V on the "high voltage input", the plugs contacts, usually plugged into the power outlet, some which obviously will need more voltage and won't start that way.
As long as you have a decent 3.3V supply, use that.
I think Max meant that you can connect 12V DC to the input of the plug directly. Not to the 3.3V rail, of course! That would burn WiFi module.
Oh I see. So instead of connecting to the 3V3 pin, I can just try to power the device using 12/15V?
p.kaczmarek2 wrote:
Capacitor to TTL or to AMS1117-3.3V? If you mean the latter, then answer is in the AMS1117 datasheet. It's recommended and required for stable voltage.
>>21454169 Update. I managed to flash it fine, just by using the TTL adapter and nothing else. Just a couple of questions if anyone knows. 1. Is it possible to set up a routine (eg. turn on at X time, turn off at Y time) that will keep working without being connected to a network? 2. Is it possible to flash ESPHome via OTA in case I'd like to? Thanks.
I wish I had found this thread before doing everything - this is my working attempt, I held the 3v3 with my hand which came handy when I was resetting power.
The T34 has a different serial 244TGF187 but the pinout is the same, I confirmed 3.3v and GND with the pins on BL0937, and TX is also broken out to an unpopulated pad, which leaves RX being the hardest pin to tap into. I don't think that pin is used anywhere so I'll have to use the needle method or push my luck with trying to solder some enameled wire to a 0.2mm exposed area (I have never micro soldered before).
Edit:
To my own surprise I managed to solder the wires
And was able to dump the firmware
Edit2:
Flashed succesfully and the config for the pins is working (https://www.elektroda.com/rtvforum/topic4042412.html#21030449). The wifi is really bad though, worse RSSI than other smart plugs on the same location.
Edit3:
It doesn't seem to like HA discovery, the moment it queues the HA discovery it warns about low heap memory and then ultimately reboots
The discussion centers on the teardown, flashing, and firmware modification of generic WiFi smart plugs featuring the T34 chip with integrated energy measurement capabilities, primarily using the BL0937 or BL0942 power metering ICs. Users report challenges soldering to the T34 chip due to fragile pads and limited access to UART pins, with some resorting to desoldering the chip or using fine wires and needles to establish serial connections. Flashing is typically done via UART with external 3.3V power supplies to ensure stable operation, as USB-TTL adapters alone often lack sufficient current. The T34 chip is identified as BK7231N-based, treated either as a chip or board module in firmware configurations. Firmware flashing is performed using OpenBeken and BK7231Flasher tools, with users sharing pin mappings and configuration templates for BL0937 and BL0942 drivers. PowerSave mode behavior is discussed, with reports of inconsistent functionality in newer firmware versions. MQTT integration issues affecting relay startup states are resolved by resetting MQTT configurations and rediscovering devices in Home Assistant. The community shares detailed hardware photos, pinouts, and flashing procedures, emphasizing the need for precise soldering, proper power supply, and correct firmware settings to enable WiFi connectivity and power metering features. Variants of the smart plug with different power metering chips and PCB layouts are noted, with some devices requiring specific handling of UART lines routed through the BL0942 chip. Overall, the thread provides comprehensive technical guidance for hardware hacking, firmware flashing, and configuration of T34-based smart plugs with energy measurement. Summary generated by the language model.