logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/SM2185N] Spectrum Smart 9W RGBCW light bulb Flashing And Driver

leśny_ziutek 3030 16

TL;DR

  • A Spectrum Smart 9W RGBCW E27 bulb with a BK7231N/SM2185N controller was torn down and prepared for alternative firmware work.
  • Tuya-cloudcutter failed on firmware v1.5.21, so the bulb was opened and flashed over UART instead.
  • The light uses an I2C driver, SM2185N, with standard connections: P26 is CLK and P24 is DATA.
  • Teardown and UART flashing succeeded, but SM2135 and SM2235 driver support was initially problematic before an edit noted that SM2235 actually works.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • LED GLS 9W E-27 Spectrum Smart bulb with color-changing feature.
    https://spectrumled.pl/en/catalogue/product/W...4412/led-gls-9w-e-27-spectrum-smart-woj-14412

    You can buy it on allegro.pl

    Packaging of Spectrum Smart LED 9W E27 bulb with Wi-Fi and Bluetooth features.

    Unfortunately, I have upgraded it to the latest firmware (v1.5.21) so the tuya-cloudcutter didn't work. These are my first steps in this topic, no previous experience with smart bulbs, Tuya, alternative firmwares, etc., hence this fault ;(

    Dodano po 16 [minuty]:

    Fortunately, the teardown and the subsequent UART flashing were successful.

    Disassembled smart LED bulb with visible internal components.

    This bulb uses an I2C driver, SM2185N.

    LED circuit board with electronic components and LEDs in various colors.

    Unfortunately, it doesn't work with the available I2C drivers (tried SM2135 and SM2235). Edit: The SM2235 actually works, see below.

    The board looks like this:

    Close-up of a circuit board with soldered wires and visible tracks and electronic components.

    Connections seem to be standard: P26 is CLK, P24 is DATA.

    See the attached documentation that I found here. It seems to contain the full specification of the protocol used by this chip.
    Attachments:
    • SM2185N_QZOBZIV.pdf (676.95 KB) You must be logged in to download this attachment.

    Cool? Ranking DIY
    About Author
    leśny_ziutek
    Level 12  
    Offline 
    leśny_ziutek wrote 52 posts with rating 9, helped 3 times. Live in city Łódź-Widzew. Been with us since 2006 year.
  • ADVERTISEMENT
  • #2 20812496
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9

    Flashed it using the Nucleo board as the USB to UART converter. It should provide enough power for flashing and WiFi, which cannot be said about the FTDI module which I usually use in such cases.

    Nucleo board with connected cables to a module.

    I couldn't get neither BK7231GUIFlashTool nor hid_download_py to work with my Linux/Debian PC. Fortunately the ltchiptool in command line mode works:

    Backup:

    
    $ ltchiptool flash read -d /dev/ttyACM0 -b 115200 BK7231N woj14412-backup.img
    


    Flashing:

    
    $ ltchiptool flash write -d /dev/ttyACM0 -b 115200 ../bk7231flasher/firmwares/OpenBK7231N_QIO_1.17.306.bin
    


    Dodano po 16 [minuty]:

    Two more photos:

    A circuit board with electronic components and four soldered wires.

    Close-up of a circuit board with soldered capacitors and colored wires.

    I hope it will be possible to write a driver for SM2185N. For now I have the very first smart bulb and the very first OpenBeken device but no light ;)

    The next one will be this BL2028N based two channel smart switch:

    Two-zone mini relay Spectrum WOJ+14632 with packaging.

    but this time I will try to be more careful and not upgrade it.
  • ADVERTISEMENT
  • #3 20812649
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    Nice find, we will support is, will you be able to help with testing?

    Here is translated datasheet:
    Attachments:
    • SM2185N_QZOBZIV.zh-CN.en.pdf (1.38 MB) You must be logged in to download this attachment.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #4 20812676
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    @leśny_ziutek from a brief look, it seems that SM2235 driver may work here, the first control byte matches exactly the what I would expect from that driver, the total number of bytes also matches, and it's also 1024 values per each channel
    Helpful post? Buy me a coffee.
  • #5 20812819
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9
    Hmm... Tried it without success. Will try one more time.

    Are there logs from I2C communication available anywhere?
  • ADVERTISEMENT
  • Helpful post
    #6 20812827
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    No, but the communication is very simple.
    Code: C / C++
    Log in, to see the code

    Bit shift for sending 10 bit value:
    Code: C / C++
    Log in, to see the code

    The constants:
    Code: C / C++
    Log in, to see the code

    Byte meaning in SM2235:
    Bit diagram for SM2235 LED

    The same from SM2185:
    Addressing scheme and instructions for SM2185
    Compare the images, it seems it matches.

    @leśny_ziutek maybe there is some obvious oversight or a mistake made, for example, when you test, do you have SM2235 driver running, is it listed on the main page? Maybe you've chosen wrong GPIO or didn't restart the device?

    Can you attach Tuya CFG partition JSON?
    https://www.youtube.com/watch?v=WunlqIMAdgw
    Helpful post? Buy me a coffee.
  • #7 20812898
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9

    p.kaczmarek2 wrote:
    Didn't restart the device?


    Definitely restarted the device when I tried SM2135 but unsure about SM2235. Will try again...

    p.kaczmarek2 wrote:
    Can you attach Tuya CFG partition JSON?
    https://www.youtube.com/watch?v=WunlqIMAdgw


    Ok. I'll try it too.
  • Helpful post
    #8 20812968
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    SM2135 will certainly not work. It only sends 8 bytes, not 11, and the colors are 8-bit, not 10 bit. Futhermore, the first byte sent is different, so your driver will most likely just ignore SM2135 packets.
    Helpful post? Buy me a coffee.
  • #9 20813757
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9
    It works with SM2235 driver!

    Looks like I didn't restart the device when tested this driver.

    Small problem is the reversed "Warm <--- ---> Cool" setting.
  • #10 20813879
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    Have you tried to remap the channels?

    Added after 29 [seconds]:

    Also please attach Tuya CFG partition, so I can add automatic GPIO config for SM2185.
    Helpful post? Buy me a coffee.
  • #11 20814024
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9

    SM2235_Map 2 1 0 3 4 command fixed the issue with the reversed warm/cool. The original mapping was 2 1 0 4 3. Thanks!

    I've downloaded the BK7231N_TuyaConfig_obk1F03214D.bin but now have a problem with "drag and drop" it to the bk7231flasher (running in Linux using mono). Is there any other way to load it?
  • #12 20814110
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    Please attach it here and I will check this out.

    Tomorrow morning I will update flasher to also have file open dialog, i was not aware that drag and drop is broken on linux
    Helpful post? Buy me a coffee.
  • #13 20814428
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9
    Here you are.
    Attachments:
    • BK7231N_TuyaConfig_obk1F03214D.bin (72 KB) You must be logged in to download this attachment.
  • #14 20814470
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    Your config indicates that this LED driver is used internally as SM2235.
    Screenshot of firmware programming tool showing JSON section and description.
    Code: JSON
    Log in, to see the code

    Now I will update the flasher for you.

    Added after 7 [minutes]:

    EDIT: Relased https://github.com/openshwprojects/BK7231GUIFlashTool/releases/tag/v1.1.3 can you check?
    Helpful post? Buy me a coffee.
  • #15 20814653
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9

    Now I can load the bin file and obtain the JSON and the text description.

    As I've written before, I didn't use BKFlasher to flash this device because of some transmission errors. Instead, I used ltchiptool in cmd mode (GUI mode doesn't work). This is normal if you live without Windows. I'm used to it ;)

    To sum up, all you need to do to get this bulb to work is:

    1. Configure Module:

    - set P24 (PWM4) to SM2235DAT,

    - set P26 (PWM5) to SM2235CLK.

    2. Configure General/Flags:

    - select Flag 4 - [LED] Force show RGBCW controller (for example, for SM2135 LEDs, or for DGR sender),

    - optionally select Flag 12 - [LED] Remember LED driver state (RGBCW, enable, brightness, temperature) after reboot.

    3. Restart the device.

    4. In the Web App execute SM2235_Map 2 1 0 3 4 command to swap the Cool and Warm channels.
  • #16 20831649
    leśny_ziutek
    Level 12  
    Posts: 52
    Help: 3
    Rate: 9
    Code: JSON
    Log in, to see the code
  • #17 20842623
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14512
    Help: 651
    Rate: 12517
    Thank you, device has been added: https://github.com/OpenBekenIOT/webapp/commit/aa9e7d1f0a5d957c2c6929fb25a193277229bd72
    It should be soon live at : https://openbekeniot.github.io/webapp/devicesList.html
    Please submit any other device you may have, we're going to get up to 500 devices soon!
    Helpful post? Buy me a coffee.
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the Spectrum Smart 9W RGBCW light bulb (model WOJ+14412) which utilizes the BK7231N chip and the SM2185N driver. After a firmware upgrade to v1.5.21, the user faced issues with flashing the device using Tuya-cloudcutter. However, they successfully performed a UART flashing using a Nucleo board and the ltchiptool command line tool. The SM2185N driver was initially incompatible, but the SM2235 driver was found to work after some adjustments, including remapping the color channels. The user shared configuration details and steps to enable the bulb's functionality, including setting specific pins for data and clock signals. The device has been added to the OpenBeken device list for broader community support.
Generated by the language model.

FAQ

TL;DR: For BK7231N bulb owners blocked by Tuya firmware v1.5.21, the fix uses 2 GPIOs and UART flashing. As one expert put it, "SM2235 works." Set P24 to data, P26 to clock, restart, then remap warm/cool with SM2235_Map 2 1 0 3 4 to make the Spectrum Smart 9W RGBCW bulb light correctly in OpenBeken. [#20814653]

Why it matters: This thread turns a "flashed but no light" failure into a repeatable OpenBeken setup for a real BK7231N RGBCW bulb.

Option Result on this bulb Key detail
tuya-cloudcutter Failed after update Latest Tuya firmware v1.5.21 blocked the easy path
UART + ltchiptool Worked CLI on Linux flashed BK7231N at 115200 baud
OpenBeken SM2135 driver Did not work Wrong packet length and first byte
OpenBeken SM2235 driver Worked 11-byte, 10-bit behavior matched closely

Key insight: The bulb contains an SM2185N chip, but its Tuya configuration treats it internally like SM2235. That is why the SM2235 driver works after a restart and channel remap.

Quick Facts

  • The bulb discussed is a Spectrum LED GLS 9W E-27 SPECTRUM SMART, model WOJ+14412, built on BK7231N with a CBLC5 board profile. [#20831649]
  • The working I2C-style pin mapping is P24 = SM2235DAT and P26 = SM2235CLK, matching SDA on GPIO 24 and SCL on GPIO 26. [#20814653]
  • Linux flashing succeeded with ltchiptool at 115200 baud for both backup and write operations, while BK7231GUIFlashTool and hid_download_py did not work on that Debian system. [#20812496]
  • SM2235 works because the protocol shape matches: 11 bytes total and 10-bit channel values. SM2135 fails because it sends 8 bytes and uses 8-bit colors. [#20812968]
  • OpenBeken setup also needs Flag 4 to force the RGBCW controller UI, and Flag 12 is optional if you want LED state remembered after reboot. [#20814653]

How do I flash a Spectrum Smart 9W RGBCW bulb with BK7231N and SM2185N using UART after tuya-cloudcutter stops working on firmware v1.5.21?

Use UART flashing instead of tuya-cloudcutter. 1. Open the bulb, connect a stable USB-to-UART adapter, and wire the BK7231N for serial flashing. 2. Back up the firmware, then write an OpenBK7231N binary over UART at 115200 baud. 3. In OpenBeken, set P24 to SM2235DAT, P26 to SM2235CLK, restart, and run SM2235_Map 2 1 0 3 4 if warm and cool are swapped. This exact path restored control on the 9W WOJ+14412 bulb after firmware v1.5.21 blocked the easy method. [#20814653]

Why doesn’t tuya-cloudcutter work on the Spectrum Smart WOJ+14412 bulb after updating to the latest Tuya firmware?

Tuya-cloudcutter stopped working because the bulb had already been updated to Tuya firmware v1.5.21. The owner reported that the cloudcutter path no longer worked after that upgrade, while a teardown and UART flash did work. In this thread, the failure condition is simple: once the bulb was on v1.5.21, software-only conversion failed and physical serial flashing became necessary. [#20812477]

What pin configuration should I use in OpenBeken for a BK7231N bulb with an SM2185N driver on P24 and P26?

Set P24 to SM2235DAT and P26 to SM2235CLK. Then enable Flag 4 to force the RGBCW controller UI, optionally enable Flag 12 to remember state after reboot, and restart the device. Those exact settings were confirmed to make the Spectrum Smart BK7231N bulb work in OpenBeken, with only a later warm/cool remap needed. [#20814653]

Which OpenBeken driver works with the SM2185N LED chip, and why does SM2235 work while SM2135 does not?

Use the SM2235 driver. SM2235 works because its packet format closely matches the SM2185N behavior: the first control byte aligns, the transfer is 11 bytes long, and channel values use 10-bit depth. SM2135 does not work because it sends only 8 bytes, uses 8-bit colors, and starts with a different first byte, so the LED driver likely ignores those packets. [#20812968]

How can I fix reversed warm and cool white channels on an SM2185N bulb using the SM2235_Map command?

Run SM2235_Map 2 1 0 3 4. The original mapping on this bulb was 2 1 0 4 3, which left warm and cool reversed. Changing the last two positions swapped those white channels back to the correct order, fixing the RGBCW behavior without changing the working SM2235 driver. [#20814024]

What are the exact steps to get the Spectrum LED GLS 9W E-27 SPECTRUM SMART bulb working in OpenBeken after flashing?

Do these four steps. 1. In Module config, set P24 to SM2235DAT and P26 to SM2235CLK. 2. In General/Flags, enable Flag 4, and optionally Flag 12. 3. Restart the device. 4. In the Web App, run SM2235_Map 2 1 0 3 4 to swap cool and warm. Those exact steps were posted as the final working recipe for the WOJ+14412 bulb. [#20814653]

How do I back up and flash a BK7231N device from Linux using ltchiptool command line?

Use ltchiptool in CLI mode at 115200 baud. The working backup command was ltchiptool flash read -d /dev/ttyACM0 -b 115200 BK7231N woj14412-backup.img. The working flash command was ltchiptool flash write -d /dev/ttyACM0 -b 115200 ../bk7231flasher/firmwares/OpenBK7231N_QIO_1.17.306.bin. On that Debian system, the command line worked even though the GUI options did not. [#20812496]

BK7231GUIFlashTool vs ltchiptool on Linux: which one is better for flashing BK7231N bulbs and why?

On Linux in this thread, ltchiptool was better because it actually worked. The user could not get BK7231GUIFlashTool or hid_download_py to work on Debian, but ltchiptool in command-line mode completed both backup and flashing. Later, BK7231GUIFlashTool was updated to improve Linux file loading, but the successful flash path here remained ltchiptool CLI. [#20812496]

What is the SM2185N LED driver, and how does it communicate with a BK7231N over I2C?

"SM2185N" is an LED driver IC that controls RGBCW channels, using a simple clock-and-data serial protocol with 10-bit channel values. In this bulb, BK7231N drives it through two lines on P26 for clock and P24 for data, and the thread shows the protocol closely matches the SM2235 byte layout and byte count. [#20812827]

What is the Tuya CFG partition JSON, and how does it help identify GPIOs and LED driver settings for OpenBeken devices?

"Tuya CFG partition JSON" is a device-configuration data block that stores GPIO roles, LED driver settings, and product defaults, letting developers map hardware correctly in replacement firmware. In this bulb, the JSON exposed iicscl as 26, iicsda as 24, cmod as rgbcw, and SM2235-related current settings, which explained the correct OpenBeken pinout and driver choice. [#20814470]

Where can I see I2C communication logs for SM2235 or SM2185N in OpenBeken when troubleshooting a bulb that does not light up?

You cannot see I2C communication logs in this case because none were available in the thread. Instead of logs, the developer shared the actual byte sequence used by the SM2235 driver, including byte 0, byte 1, and the 10-bit channel packing for red, green, blue, cold, and warm. That code-level view was the troubleshooting reference. [#20812827]

Why might an SM2235-based configuration appear not to work until the BK7231N device is restarted?

Because the new driver and GPIO settings may not fully apply until a reboot. In this thread, the bulb initially seemed incompatible with SM2235, but the real issue was that the device likely had not been restarted after selecting that driver. After retrying with a restart, the SM2235 setup worked and only the warm/cool order remained wrong. [#20813757]

What current and channel settings from the Tuya config indicate that an SM2185N bulb is internally treated as an SM2235 device?

The Tuya config shows SM2235-style fields directly. It includes 2235ccur":"2", 2235wcur":"5", cmod":"rgbcw", iicscl":"26", iicsda":"24", and channel indexes iicr":"2", iicg":"1", iicb":"0", iicc":"4", iicw":"3". Those values led the developer to conclude that the bulb internally uses the SM2235 model for control. [#20814470]

Can I use an STM32 Nucleo board as a USB-to-UART adapter for flashing BK7231N smart bulbs, and how does it compare to an FTDI module for power stability?

Yes. The thread reports successful flashing with an STM32 Nucleo board used as a USB-to-UART converter, specifically because it provided enough power for both flashing and Wi-Fi. The same user said their usual FTDI module did not offer comparable power stability for that job, which matters when the bulb must boot and keep radio activity alive during setup. [#20812496]

How do I submit a newly supported BK7231N smart bulb to the OpenBeken devices database with the correct JSON template?

Submit a device JSON that names the vendor, model, chip, board, flags, keywords, pins, image, and wiki link. The confirmed template for this bulb used chip: BK7231N, board: CBLC5, flags: 5140, keywords with SM2185N, and pin roles 24: SM2235DAT;0 and 26: SM2235CLK;0. After submission, the device was added to the OpenBeken database and queued for the public list. [#20831649]
Generated by the language model.
ADVERTISEMENT