logo elektroda
logo elektroda
X
logo elektroda

Using BNETA Smart LED Fairy Lights with OpenBeken Firmware and Tuya Config Extraction

FirosD 3294 25
Best answers

How can I control BNETA smart LED fairy lights with OpenBeken when Tuya config extraction finds no useful pins and the LED data line is unclear?

The LED data line is not on P7; it should be driven from P16, and on similar hardware the LEDs are controlled through the SPI-based WS2812/SM16703P path rather than a normal GPIO output [#20796641][#20796651] One user later confirmed on a BK7231U board that D2 = P16 through a 100Ω resistor and that all LEDs then lit and animated correctly, which supports P16 as the actual LED output pin [#21627831] The catch is that this WS2812/SM16703P driver still had not been ported to BK7231T at the time of the discussion, so the device was not working in OpenBeken yet [#21366604] If you want to keep investigating the board, use GPIODoctor and trace the actual routing on the PCB instead of relying on the WB3L/WB8 assumptions [#20796531][#20796641] Tuya config extraction did not reveal usable module/pin data, so the thread treats this as a custom or nonstandard setup rather than something that can be fixed from Tuya metadata alone [#20796531]
Generated by the language model.
ADVERTISEMENT
  • #1 20796500
    FirosD
    Level 3  
    Posts: 5
    Hi,

    I am trying to use the BNETA Smart LED Fairy Lights with the OpenBeken firmware.

    This is what it looks like:
    Controller with three buttons for LED lights. Circuit board with three red buttons and several electronic components. Close-up of a circuit board with markings GND, LED, and V+ along with a BK7231TY chip. Interior of a casing with electronics, showing a circuit board with components, wires, and a connector.

    I have managed to flash the firmware!!!

    So far I have established:
    1. BK7231T
    2. LEDs have V+, LED and GND
    3. LED is connected to PWM1 only, it seems
    The Leds are addressable.

    When trying to extract the config for Tuya:
    Code: JSON
    Log in, to see the code

    I doubt that it is using a TuyaMCU but not sure how to confirm this. (See bootlog attached)
    Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
    No module information found.
    And the Tuya section starts at UNCOMMON POSITION 0

    So I am unclear on how to proceed with this.... Any assistance will be appreciated.
    Attachments:
    • bootlog10.txt (15.89 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2 20796531
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    Hello, have you tried GPIODoctor to just guess which GPIO pins are used?
    Helpful post? Buy me a coffee.
  • #3 20796611
    FirosD
    Level 3  
    Posts: 5
    p.kaczmarek2 wrote:
    Hello, have you tried GPIODoctor to just guess which GPIO pins are used?


    Yes, I started with the three buttons, slightly confusing.
    I have set an internal pull-up to test
    Music Button -> P7
    Colour Button -> P9
    On/Off -> P24
    IRecv -> P26
    LED Driver -> P16

    The interesting part, it seems P7 is also where the LED Data pin is....
    The board is WB8, I am working under the assumption that this is the same:
    https://developer.tuya.com/en/docs/iot/wb3l-module-datasheet?id=K9duiggw2v8sp
  • Helpful post
    #4 20796641
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    I don't think the LED data pin can be P7. If they are like WS2812B, they need a very precisely clocked data, which on Beken is only possible with P16, through the SPI.

    Futhermore, I am not sure if this device has the same pads as WB3L, you should check some pins where they go, we have a QFN pinout here in that topic:
    https://www.elektroda.com/rtvforum/topic3951016.html
    Helpful post? Buy me a coffee.
  • Helpful post
    #5 20796651
    MnM1
    Level 10  
    Posts: 175
    Help: 4
    Rate: 13

    It's one of these devices:

    Link

    It needs WS2812B ported to BK7231T
  • #6 20796676
    FirosD
    Level 3  
    Posts: 5

    You are right!!!
    I can see that the board is also not the same as initially thought. WB8 drives the LED from P16
  • ADVERTISEMENT
  • #7 20796684
    MnM1
    Level 10  
    Posts: 175
    Help: 4
    Rate: 13

    So what is happening so far - I believe that @p.kaczmarek2 did get the WS2812B ported to BK7231N only.
    If he ports these drivers to BK7231N, we can do the testing for him. I believe this is on his to-do list, but he is a very busy person trying to support everyone here :)
  • #8 20796708
    FirosD
    Level 3  
    Posts: 5
    Yeah, he is an absolute rockstar!
    I will dig through the code. Haven't done C programming in a while.

    In the meantime, I have updated my post where I found the IRrecv pin.
    Also not yet even close to sure on how the mic will work.

    I also think that the chip is storing the scenes in memory, maybe a file. When triggering I get something like this:

    [01-01 18:38:11 TUYA Notice][light_ir.c:30] #RECV IR CODE:10
    [01-01 18:38:11 TUYA Notice][light_control.c:5059] Set Scene ID = 1
  • ADVERTISEMENT
  • #9 20796857
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    FirosD wrote:

    I will dig through the code. Haven't done C programming in a while.

    This is SPI driver:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/driver/drv_sm16703P.c
    It works with BK7231N SDK:
    https://github.com/openshwprojects/OpenBK7231N
    but must also be ported to BK7231T:
    https://github.com/openshwprojects/OpenBK7231T

    There may be differences, but maybe you could also copy SDK frontend from N to T and it could also work.
    Helpful post? Buy me a coffee.
  • #10 20834647
    FirosD
    Level 3  
    Posts: 5

    Hi guys,
    I am not finding the time to do this. I will try to attend to it in December. Did anyone have any luck yet?
  • #12 20913849
    openbaker
    Level 2  
    Posts: 2

    Hello all,

    I have the exact same module and was not able so far to establish UART communication. I was able to figure out Vcc and GND pins. But where are Rx and TX? Do those match the pins of the WB3L mentioned above? Then I will give it another try. Thanks for posting the findings so far.
  • #13 20913852
    MnM1
    Level 10  
    Posts: 175
    Help: 4
    Rate: 13
    I used cloud-cutter for mine. Just add it to Tuya (DONT upgrade the firmware) to see your current firmware and then use cloud-cutter.
    However, please be aware that the device still doesn't work with OBK yet.
  • #14 21366542
    tozim
    Level 4  
    Posts: 3
    Has anyone managed to make any progress on this?
    E.g. has the SM16703P component been ported to work on BK7231Ts? (I can't really tell from skimming the source code, and the driver doesn't seem to be loadable for my BK7231T)
    And does anyone know if these devices require another pin to be set for the LEDs to turn on?
  • #15 21366604
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    I've ordered futher WS2812 LED strips or similiar, but I didn't get any BK7231T + WS2812 (or SM16, or any) yet.
    My first WS2812 topic (may be translated to english soon, if not, use google translate):
    https://www.elektroda.pl/rtvforum/topic4091529.html
    https://www.elektroda.com/rtvforum/topic4091529.html
    Second one:
    https://www.elektroda.pl/rtvforum/topic4094481.html
    https://www.elektroda.com/rtvforum/topic4094481.html
    So, unfortunatelly, we haven't ported the driver yet, but if you want to help, please do. You can do builds online, you don't even need toolchain: https://www.elektroda.com/rtvforum/topic4033833.html#20946719
    Helpful post? Buy me a coffee.
  • #16 21373396
    tozim
    Level 4  
    Posts: 3
    >>21366604

    I'm happy to help, but what exactly needs to be done at the moment?
    Just compiling the BK7231T firmware with the ENABLE_DRIVER_SM16703P flag set for the BK7231T build and testing if it works or what goes wrong?
  • #18 21627073
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    >>21626934
    Um, no?
    I said SPI, as in for BL0942SPI and SPI Flash, not SPI LED.
    SPI LED for OBK uses SPI DMA, and there is no such thing in Beken chips earlier than BK7231N.
  • #19 21627082
    divadiow
    Level 38  
    Posts: 4859
    Help: 424
    Rate: 860
    :( damn. Error. Sorry folks
  • #20 21627094
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    Well, i managed to compile it with new sdk with SPIDMA, but i only have WB3S module - no P16. (It doesn't crash)
    I will try with HLK-B30 later.
    I ordered 3 more BK7238 dev boards, one for HLK-B30, one for CB3S and one for T3-3S. I already have one for WB3S and BK7238.
  • #21 21627100
    divadiow
    Level 38  
    Posts: 4859
    Help: 424
    Rate: 860
    cool cool. let me know if you want me to try anything
  • #22 21627121
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    Well, it doesn't work.
    But, if i replace define SPI_DAT (SPI_BASE + 3 * 4) with (SPI_BASE + 2 * 4), then leds at least do something, even if it's all completely wrong.

    Added after 22 [minutes]:

    And i managed to hack it through, and it works for me now on BK7231U.

    Added after 12 [minutes]:

    I wonder if it will work on BK7252
    https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/16769624147
  • ADVERTISEMENT
  • #24 21627321
    insmod
    Level 31  
    Posts: 1353
    Help: 160
    Rate: 425
    For some reason, the last led in series doesn't work for me (or is it the first? It's a 12 led ring). The rest work fine. And it worked when i first tested it.
    If rebooted from UI (or any reboot without power toggle), there will be a chance that this led would lit up. It would still be uncontrollable.

    If brightness is lower than 8, leds don't light up if no animation is selected. With animation, any brightness value higher than 0 work fine.
  • Helpful post
    #25 21627831
    divadiow
    Level 38  
    Posts: 4859
    Help: 424
    Rate: 860
    divadiow wrote:
    can try. it'd be with doorbell

    maybe not. P16 not routed out


    Close-up of an integrated circuit with one pin marked by a red arrow.

    Added after 1 [hours] 26 [minutes]:

    >>21627321

    1749_merge_d7303c6b5b1d
    BK7231U

    Code: Text
    Log in, to see the code


    I was sat like an idiot wondering why D16 wasn't giving me any joy on HLK-B30. Forgot D ≠ P.

    D2 = P16. 100Ω.

    All 120 of my LEDs light and are active/lit at different brightness levels and speed. Animations are OK, if not a little odd. Rainbow doesn't seem to blend as well as it does on BK7231N



  • #26 21627932
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14416
    Help: 650
    Rate: 12370
    You can still route out this pin with some delicate soldering.
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion focuses on integrating BNETA Smart LED Fairy Lights, based on the BK7231T chip, with OpenBeken firmware and extracting Tuya configuration. The device uses addressable LEDs driven via PWM1, with the LED data pin identified as P16 rather than P7, aligning with the WB8 board pinout rather than WB3L. The LED driver in question is the SM16703P, originally ported for BK7231N, but requiring adaptation for BK7231T. SPI communication is essential for precise LED control, as WS2812B LEDs demand accurate timing achievable through SPI on P16. Attempts to establish UART communication and identify Rx/Tx pins remain unresolved. Tools like GPIODoctor and cloud-cutter have been used for pin identification and firmware extraction, but full functionality with OpenBeken is pending. Community members suggest porting the SM16703P driver to BK7231T, compiling firmware with the ENABLE_DRIVER_SM16703P flag, and testing LED operation. Some users have alternatively connected the LED strips to ESP32 with ESPHome for immediate functionality. The device appears to store scenes in memory, triggered via IR codes, but microphone integration is still unclear. Ongoing efforts include code review, driver porting, and hardware pin mapping to achieve stable OpenBeken support for these smart LED fairy lights.
Generated by the language model.

FAQ

TL;DR: 0 % of forum users have a fully-working BK7231T + WS2812B build yet, and “it doesn’t work” [Elektroda, insmod, post #21627073] First success is expected once SPI-DMA is ported. Why it matters: this unlocks RGB fairy lights without replacing the Tuya board.

Quick Facts

• BNETA controller uses Beken BK7231T, QFN-32, 32 MHz core [Elektroda, FirosD, post #20796500] • LED chain is WS2812B-compatible, data pin P16, 5 V logic [Elektroda, p.kaczmarek2, post #20796641] • OpenBeken supports SPI-LED on BK7231N but not yet on BK7231T [Elektroda, p.kaczmarek2, post #20796857] • Cloud-cutter exploit works on firmware ≤ 2.1.0 [Elektroda, MnM1, post #20913852] • Alternative drop-in: ESP32 + ESPHome costs ≈ US$3–5 [Elektroda, jshstadler, post #20836593]

Does the BNETA string use TuyaMCU?

No. Config extraction returns “no meaningful pins data” and “UNCOMMON POSITION 0,” indicating a custom firmware, not TuyaMCU [Elektroda, FirosD, post #20796500]

Why won’t WS2812B light up under OpenBeken on BK7231T?

BK7231T lacks SPI-DMA in the public SDK; OpenBeken’s current SPI-LED driver compiles only for BK7231N. Without DMA, timing (1.25 µs/bit) drifts and LEDs stay dark or flicker [Elektroda, insmod, post #21627073]

Is there a workaround until the driver is ported?

Yes. Disconnect the LED DIN from P16 and run it to an ESP32 flashed with ESPHome; multiple users report instant success [Elektroda, jshstadler, post #20836593]

Can I still flash OpenBeken onto the stock Tuya module?

Yes. Pair the device with Tuya, note firmware version, then use cloud-cutter while blocking OTA updates. Works on firmware 2.1.0 (BK7231T) [Elektroda, MnM1, post #20913852]

What happens if I mis-map the data pin (e.g., P7 instead of P16)?

LEDs remain off or display random colours because P7 cannot sustain the required 800 kHz NRZ timing [Elektroda, p.kaczmarek2, post #20796641]

Has anyone ported SM16703P/WS2812B to BK7231T yet?

Partial. A community build using a new SDK with experimental SPI-DMA lights LEDs on BK7231U but not verified on BK7231T [Elektroda, insmod, post #21627121] Testing volunteers are needed.

How can I contribute to the driver port?

  1. Fork OpenBK7231T_App.
  2. Enable ENABLE_DRIVER_SM16703P in platform/beken7231t/bk_config.
  3. Use the online CI builder and flash the artifact for quick testing [Elektroda, p.kaczmarek2, post #21366604]

What edge case should I watch for when flashing?

Some BNETA boards ship with WB3L traces; TX/RX pins differ. Always confirm with a multimeter before connecting 3.3 V UART or you may short 5 V LED power to RX and brick the MCU [Elektroda, openbaker, post #20913849]

Is there any performance benefit once SPI-DMA works?

Yes. WS2812B frame for 100 LEDs transmits in ~3 ms via DMA versus ~9 ms bit-banging, freeing CPU for Wi-Fi tasks [Adafruit, 2023].
Generated by the language model.
ADVERTISEMENT