logo elektroda
logo elektroda
X
logo elektroda

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

FirosD 1890 15
ADVERTISEMENT
  • #1 20796500
    FirosD
    Level 3  
    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.
  • ADVERTISEMENT
  • #2 20796531
    p.kaczmarek2
    Moderator Smart Home
    Hello, have you tried GPIODoctor to just guess which GPIO pins are used?
    Helpful post? Buy me a coffee.
  • #3 20796611
    FirosD
    Level 3  
    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
    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.
  • ADVERTISEMENT
  • Helpful post
    #5 20796651
    MnM1
    Level 10  

    It's one of these devices:

    Link

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

    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  

    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  
    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
  • #9 20796857
    p.kaczmarek2
    Moderator Smart Home
    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  

    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  

    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  
    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.
  • ADVERTISEMENT
  • #14 21366542
    tozim
    Level 4  
    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
    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  
    >>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?

Topic summary

The discussion revolves around using BNETA Smart LED Fairy Lights with OpenBeken firmware. The user successfully flashed the firmware and identified the BK7231T chip, noting the LED connections. They attempted to extract the Tuya configuration but faced challenges. Various participants suggested using GPIODoctor to identify GPIO pins and discussed the correct data pin for the LEDs, indicating that P16 is necessary for WS2812B compatibility. There were mentions of porting drivers from BK7231N to BK7231T and using alternative solutions like ESP32 with ESPHome. Some users reported difficulties with UART communication and recommended using cloud-cutter for firmware management.
Summary generated by the language model.
ADVERTISEMENT