logo elektroda
logo elektroda
X
logo elektroda

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

leśny_ziutek  16 3033 Cool? (+1)
📢 Listen (AI):

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.
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.

About Author
leśny_ziutek wrote 52 posts with rating 9 , helped 3 times. Live in city Łódź-Widzew. Been with us since 2006 year.

Comments

leśny_ziutek 13 Nov 2023 01:01

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. https://obrazki.elektroda.pl/4412850100_1699831996_thumb.jpg... [Read more]

p.kaczmarek2 13 Nov 2023 09:17

Nice find, we will support is, will you be able to help with testing? Here is translated datasheet: [Read more]

p.kaczmarek2 13 Nov 2023 09:30

@lesnyziutek 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... [Read more]

leśny_ziutek 13 Nov 2023 10:36

Hmm... Tried it without success. Will try one more time. Are there logs from I2C communication available anywhere? [Read more]

p.kaczmarek2 13 Nov 2023 10:41

No, but the communication is very simple. // Byte 0 Soft_I2C_Start(&g_softI2C,SM2235_BYTE_0); // Byte 1 Soft_I2C_WriteByte(&g_softI2C, SM2235_BYTE_1); // Byte 2 Soft_I2C_WriteByte(&g_softI2C,... [Read more]

leśny_ziutek 13 Nov 2023 11:21

Definitely restarted the device when I tried SM2135 but unsure about SM2235. Will try again... Ok. I'll try it too. [Read more]

p.kaczmarek2 13 Nov 2023 12:07

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 pa... [Read more]

leśny_ziutek 13 Nov 2023 20:05

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. [Read more]

p.kaczmarek2 13 Nov 2023 20:58

Have you tried to remap the channels? Added after 29 : Also please attach Tuya CFG partition, so I can add automatic GPIO config for SM2185. [Read more]

leśny_ziutek 13 Nov 2023 22:10

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... [Read more]

p.kaczmarek2 13 Nov 2023 23:34

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 [Read more]

leśny_ziutek 14 Nov 2023 10:50

Here you are. [Read more]

p.kaczmarek2 14 Nov 2023 11:33

Your config indicates that this LED driver is used internally as SM2235. https://obrazki.elektroda.pl/4636475800_1699957511_thumb.jpg { "rstnum":"5", "rstcor":"c", "Jsonver":"1.1.9", "brightmin":"5", "gmwb":"75", "title20":"1", "deftemp":"100", "gmwg":"70", "wfcfg":"spcl", "colormin":"10", "pmemory":"1", "2235ccur":"2", "gmkb":"60", "iicb":"0", "2235wcur":"5", "cmod":"rgbcw", "mixway":"0", "iicscl":"26", "wt":"20", "cwtype":"0", "prodagain":"0", "rstbr":"50", "remdmode":"0", "colormax":"85", "cagt":"20", "iicw":"3", "notdisturb":"0", "module":"CBLC5", "colorpfun":"0", "iicsda":"24", "cwmaxp":"100", "iicc":"4", "dmod":"7", "gmwr":"100", "rgbt":"10", "gmkg":"60", "onoffmode":"0", "brightmax":"90", "iicg":"1", "wfct":"3", "rsttemp":"100", "category":"0505", "gmkr":"80", "defcolor":"c", "iicr":"2", "defbright":"100", "crc":"74" } ... [Read more]

leśny_ziutek 14 Nov 2023 13:15

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... [Read more]

leśny_ziutek 24 Nov 2023 21:48

{ "vendor": "Spectrum LED / Wojnarowscy Sp. z o.o.", "bDetailed": "0", "name": "LED GLS 9W E-27 SPECTRUM SMART", "model": "WOJ+14412", "chip": "BK7231N", "board": "CBLC5", "flags":... [Read more]

p.kaczmarek2 02 Dec 2023 11:12

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... [Read more]

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.
%}