MaxineMuster 6ee5729064
Changing HAL_Delay_us for Beken (#1727)
* Apply changes for Bekens HAL_Delay_us() as proposed in #1579 by @rpv-tomsk
Add TEST command to simply test usleep on a given pin

tested on BK7231N to work with both drivers (I am aware of) using HAL_Delay_us
DS1820 and DHT (tested on DHT11 only)

Timing on BK7231N looks really good with this driver, at least for usleep > 6 its allways 2 us more:

tested	read by analyzer

500	502
200	202
100	102
 50	 52
 20	 22
 10	 12
  6	  8
  4	  7

Now it's time to test on other Beken platforms, too

* Not working on BK7238 - trying to remove special case for lower usleep, since times are way to small here

* still not working on BK7238 - usleep ok fur > 50 , will not be below 30us according to my tests
so try to use the other approach for 7238, too

* No success on BK7238 - trying once again to use "usleep()" to find a factor with analyzer.

* try factor 6 for BK7238 (HAL_Dely_us(x) -> usleep(6*x))

* Testing factor 6.4 for BK7238

* Fixing BK7252  build not working, simply use original for code

* Restore original code for BK7252

* Change timing for BK7525

* Next try to adjust factors for BK7525

* fix typo

* Add adjustment for powersave on BK7238

* Update obk_config.h - disable ENABLE_DS1820_TEST_US
2025-09-04 18:05:57 +02:00
2025-09-03 11:46:06 +02:00
2025-03-05 19:27:51 +01:00
2025-06-18 23:36:57 +02:00
2025-09-03 11:46:06 +02:00
2025-08-09 11:49:03 +02:00
2025-09-03 11:46:06 +02:00
2025-09-03 11:46:06 +02:00
2024-12-24 15:17:47 +01:00
2024-09-19 22:18:24 +02:00
2024-12-24 15:17:47 +01:00
2025-09-03 13:50:26 +02:00
2025-09-03 11:46:06 +02:00
2025-09-03 11:46:06 +02:00
2023-03-06 13:48:00 +01:00
2025-06-20 09:35:00 +02:00
2024-03-08 09:53:46 +01:00
2025-09-03 11:46:06 +02:00
2022-11-21 18:39:33 +00:00
2025-09-03 11:46:06 +02:00

Introduction

OpenBK7231T/OpenBeken is a Tasmota/ESPHome alternative for modern Tuya-based modules, offering MQTT and Home Assistant compatibility. Although this repository is named "OpenBK7231T_App", it has evolved into a multiplatform application, supporting builds for multiple chipsets from various vendors, including ESWIN, Transa Semi, Lightning Semi, Espressif, Beken, WinnerMicro, Xradiotech/Allwinner, Realtek, and Bouffalo Lab.

Please use automatically compiled binaries from the Releases tab. To build OpenBeken yourself for any supported platform, fork our version of the submodule SDK first, and then check out this app repository alongside it. Details further down. Alternatively consider using the easier override method.

See our guides in Russian: BK7231N/T34, and BL602 RGB, and Youtube guide for BK7231/T34

For general information about the BK7231 family, available datasheets, pinout, peripherals, consult our docs topic.

In Progress

To varying degrees, support for the following is in development.

Supported Devices/Templates List Now with 700+ entries! (Get 🏆free SD Card🏆 for submitting new one!)

We have our own interactive devices database that is maintained by users. The database is also accessible from inside our firmware (but requires internet connection to fetch). Have device not yet listed? HELP US, submit a teardown here and 🏆get free SD card and gadgets set🏆 ! Thanks to cooperation with Elektroda.com, if you submit a detailed teardown/article/review, we can send you this set of gadgets for free (🚚shipping with normal letter🚚). NOTE: Obviously almost any device with supported chip (BK7231, BL602, W600, etc is potentially supported and it's not possible to list all available devices in the market, so feel free to try, even if your device is not listed - we are here to help and guide you step-by-step!)

Our Youtube Channel (See step-by-step guides for flashing and setup)

We have our own Youtube channel with OBK-related guides. Please see our playlists:

You can help us by giving like, a comment and subscribe!

Features

OpenBeken features:

There is also a bit more outdated WIKI

Building

OpenBeken supports online builds for all platforms (BK7231T, BK7231N, BK7238, XR809, BL602, W600, W800, ESP32, RTL8710A, RTL8710B, RTL87X0C, RTL8720D/CS, TR6260, ECR6600, LN882H), but if you want to compile it yourself, see BUILDING.md

Developer guides

Flashing

For BK7231N, BK7231T, BK7231M, BK7238, BL2028N, T34 see our GUI easy flash tool, also see FLASHING.md

Repository of flash tools for all other supported platforms

TXW81X requires either CK-Link or STM32F103 (64kb flash or more). See flashing guide

Docs - MQTT topics, Console Commands, Flags, Constants, Pin Roles, Channel Types, FAQ, autoexec.bat examples

Further reading

For technical insights and generic SDK information related to Beken, WinnerMicro, Bouffalo Lab and Xradio modules, please refer to:

https://www.elektroda.com/rtvforum/topic3850712.html

https://www.elektroda.com/rtvforum/topic3866123.html

https://www.elektroda.com/rtvforum/topic3806769.html

Support project

❤️ Love the project? Please consider supporting it with a donation: https://www.paypal.com/paypalme/openshwprojects ❤️

Special thanks to all open-source contributors whose work has served as a valuable reference and inspiration for the development of this project.

Description
Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
Readme 429 MiB
Languages
C 55.5%
C++ 42%
Makefile 1.3%
JavaScript 0.6%
CMake 0.3%
Other 0.2%