Unkown tuya chip

does anyone have the pinout for this?


tried tuya convert but didn’t connect.
i have a feeling that it’s not esp.

Hi there, I bought some relays with the same chip inside WA2 (At least, I don’t feel so lonely with my issue).
As it is my first attempt to flash a device, I might not be the best support for you. From the model I have, it looks like the pin settings is like the one for the type TUYA TYWE2S (maybe it’s an esp8285). However, I was unable to identify where GPIO_0 is (with the FTDI, I don’t manage to go in the flash mode).
Did you get further?
The next step would be to remove that cover to see what is behind. However, I’m scared that my device would not survive the surgery…

i have screwed up a bit with the removing of the tin raised 2 copper traces from the board but i wil fix it later.

looks like a beken bk7231, didn’t find a datasheet

this is the only info i found:
http://www.belon.cn/product/96.html

On the website of the chip manufacturer, on the main page their main chipset are listed. There’s only one with wifi, namely the BK7231U

BK7231U is a 2.4 GHz 802.11n and BLE 4.2 full feature comb chip with multi-media feature. It integrates hardware and software component to finish a complete 802.11b/g/n application, which supports AP and STA role simultaneously, and integrates Bluetooth Low Energy 4.2 transceiver and protocol stack. The 120 MHz MCU and embedded 256 KB RAM make it able to support multiple cloud links and also suitable for audio and image application.
Features
802.11 b/g/n 1x1 compliant
Wide-band and narrow-band interference detection and alleviation
20/40 MHz bandwidth and STBC
Working mode STA, AP, Direct
AP and STA role simultaneously
Classic Bluetooth co-existence
High-Speed 32-bit MCU,up to 120 MHz
256 KB internal data RAM
Dual I2C interface
Dual high speed UART with flow control capability
Microphone signal amplify
50 MHz SDIO interface and SPI
Interface with flow control
QSPI RAM direct mapping to data RAM space
Six 32-bit timer and one always on timer
Six 32-bit PWM with either high speed clock or low power clock
QSPI for RAM and FLASH extension
Full speed USB host and device
Multi-channel ADC with high speed 10-bits or low speed 16-bit with internal decimation filter
CMOS sensor 8-bit DVP
VGA Motion JPEG hardware encoder and dedicate DMA
32 bytes eFUSE and true random number generator
26 MHz and 32 KHz clock signal output

Apparently, it’s not an ESP. My only hope is that it would be a clone of an ESP, but I don’t think so.
Does it mean that we are screwed ? :worried:
Have you tried to flash it with FTDI?
I’ve found 3V3, RST, Rx and Tx. I’m just missing GPIO_0 for booting. Could you check for me the label of the 5 pins you’ve uncovered? (sorry, as I’m knew in the forum, I can’t post more than 3 times)

yeah, im sticking to sonoff mini with this form factor.
i would try ftdi if i knew the pinout of the chip, don’t think it will work though.

ok here is the back side of the module:


not sure what PWM4 and PWM5 are.
maybe some dimming thing?

gpio_0 is a esp thing, this is probably a totaly different beast. don’t think it can be easily flashed without the right tools.

I just received 4 of these via Ali express having ordered what was clearly the previous ESP version in the listing. Currently “in dispute”

With some recent smart plugs also moving away from ESP its tempting to try and buy up some existing ones now in case we lose the ability to flash our own . Apart from relying on a cloud I don’t control, I just love the flexibility of ESPHome.

well if you have alot of time you can replace it with a nodemcu.
i left a “warning” in my feedback for the listing. hopefully others will start doing the same and we can make better purchases.

these are small and has 8266, but no external switch:

i flashed 3 of them with ota.

I managed to pair the module with tuya-convert. However, the process doesn´t complete. In smarthack-web.log it writes “it appears this device does not use an ESP82xx and therefore cannot install ESP based firmware”.
According to tuya-convert documentation, it means that we won´t be able to flash it. Neither with OTA nor with FTDI

I have found this
https://www.yoycart.com/Product/594913043016/
https://code.aliyun.com/MXCHIP_FAE/feiyan_sdk_for_alios/blob/d19671b47c926cc0fccd0e1803b58d63cd03d6b9/platform/mcu/bk7231u/bk7231u.mk

1 Like

and this

I just got a pair of those because the wiring is easier with two way switches in my case. I was hoping that they were ESP8266 but it looks like that the green ones are not. Maybe the old all white modules keep being esp.

I had same issues with tuya-convert, so I had to link it using Smart Life app.

I am attaching a couple of images more, so the people can get aware of this issue.

got this order and thought is was esp chip. But no worry. lets try to keep it simple, its just a switching function…

BK7231 Docs translated to english-ish

just with the demo it would be possible to setup it as a regular switch…

After some more seaching, this chip is also used in the “HLK-B30 module” found at aliexpress… its seems to be a working clone according to site info

Hi there!
Any luck finding out the pin outs? Please share your Vcc, Gnd, Tx and Rx - thanks!
Is is a clone of the 8266 or another beast all-together? If the former, we can perhaps hit and try until we reach GPIO; if the latter, I will bin the entire the two channel device and account this waste as learning fee!

Further, what bends my noodle is…


So, the DIGTEST, P4 needed to be pulled high (a 1)! No role for our traditional GPIO0 (infact, it is not even named in the PDF).
That said, intil we find GPIO0, the clone theory holds or not.
Damned, this is frustrating.

Image 1 - Starting from top, Vcc, GND, RX and TX - 4 connections

Image 2 - No connections on this side
image

Image 3 - device, without the WiFi card
image

HLK-B30
user manual
https://minfil.com/76g8h2ddo5/HLK-B30_User_manual_pdf
datasheet
https://minfil.com/30gbhbd7oc/HLK-B30_V1.01_Datasheet_for_transmission_pdf

cant find how to set it to accept new firmware but… To pull firmware the from the chip:
RX -> ftdi(or jtag stuff?)
TX -> ftdi(or jtag stuff?)
GND -> ftdi(or jtag stuff?)
DIGITEST (Pull High, use 10kohm?)
P14 - pull LOW (or leave blank, might work to solder wire to Pin 14)
P4 - (Pull High, use 10kohm?, might work to solder wire to Pin 4)
VDDflash - power up (guess same voltage as as VBAT)
Use read JTAG: PIN20,21,22,23…

firmwareupdate seems (maybe) be using CMODE pull HIGH, reads then from the usb and not from flash (firmware via bluetooth?)

EDIT:
after some research, this chip uses ARM, its note the same as the ESP…

1 Like

@stin Thanks for the various documents - most useful.
So, my conclusion is that this beast is not a clone and to reflash it with some firmware is wayyyyy above my paygrade - goto Plan B.

Plan B
Instead of throwing away what appears to be a neat-little device, I, with my limited skills and knowledge, will try to see if can isntall an ESP8266 and at least use the device as a dual channel relay. Like @digiblur Travis says - Let’s get to it (a big wave out to you man, you are awesome!)

Two hours and many fc@k# later, this is where I am at…

a) Removed the W2 chp and it’s connecting ‘baby’ board.
b) Located and identified the following on the main board:
VBAT - 3.3V
GND - GND
PWM0 - Some GPIO
PWM1, 2 4 and 5.
c) Soldered 3.3 and GND to a D1mini after doing a tasmota flash on it. No need for RX/TX points as control will be done OTA.
d) 2 relays, 2 buttons and 1 buzzer = 5 points and 5 points is what I have left - Yipee!! Famous last words!
e) NO - NO FUN! There is some weird $hit going on here. Tried connect each pin to a free GPIO but except PWM5 (wired to GPIO4), there was nothing. GPIO4 was able to control both relays in tandem.

So, there could be some serial comms going on there or some such stuff I know nothing about.
BTW, the device did feel warm to touch after about an hour of being powered up and just sitting there.

So, gents, any hints on what to do next?