logo elektroda
logo elektroda
X
logo elektroda

Flashing DT-BL200 module in CozyLife ES/E27 RGBCW bulb so it can run without cloud

divadiow 1716 8
ADVERTISEMENT
  • Helpful post
    #1 20982854
    divadiow
    Level 34  
    One of these bulbs was one of my first purchases back in November 2023, but I destroyed the DT-BL200 module accidentally. I've since bought another from Ali. The product page is already gone https://vi.aliexpress.com/item/1005005730079037.html

    Screenshot of a product showing an RGB-CW WiFi E27 bulb with voice control and dimming features.

    It is perhaps the same CozyLife bulb @blakadder posted about here https://www.elektroda.com/rtvforum/topic3889041-120.html#20151469

    The DT-BL200 is a Bouffalo Labs BL602L20 (L=Light, 2=16mbit/2mb flash) and is rarely mentioned on the forums.
    Technical diagram of Bouffalo Labs BL602 module

    One of the first posts with some info is here https://www.elektroda.com/rtvforum/topic3900145.html

    Inside is the DT-BL200 without RF shield in this instance. Using my own photo and other images around, I made this to help orient me from the top looking down. I did not desolder the module.

    Close-up of DT-BL200 module with labeled pins and chip area.

    D8 = GPIO8 = pull high using 10k resistor/3.3v to enter flash download mode on power-up

    First, I captured the boot log at UART 2000000 baud.

    [20:23:59.220] - serial type is general
    [20:23:59.269] - Open COM10 Success
    [20:24:25.113] - Starting bl602 now....
    Reset cause 0: BL_RST
    [20:24:25.118] - _POWER_OFF
    Heap 127408@0x42020e50, 5920@0x420488e0
    blog init set power on level 2, 2, 2.
    [IRQ] Clearing and Disable all the pending IRQ...
    [         0][BUF: hal_board.c: 606]  10  10  10  10  10  10  10  10  10  10  10  10  10  10
    [BL] [SEC] TRNG Handler
    ====== bloop dump ======
    --->>> timer list:
    [MTD] >>>>>> Hanlde info Dump >>>>>>
    name PSM
    id 0
    offset 0x000f8000(1015808)
    size 0x00002000(8Kbytes)
    xip_addr 0x230e7000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [EF] Found Valid PSM partition, XIP Addr 230e7000, flash addr 000f8000
    *default_env_size = 0x00000001
    ENV start address is 0x00000000, size is 8192 bytes.
    [20:24:25.148] - EasyFlash V4.0.99 is initialize success.
    You can get the latest version on https://github.com/armink/EasyFlash .
    [20:24:25.225] -
    [BL] Initi Wi-Fi with MAC #### 24:94:94:EE:7F:97 ####
    hostname: Bouffalolab_BL602-ee7f97
    [WF] country code CN used, num of channel 13
    -----------------------------------------------------
    [I
    [20:24:25.226] - PC] [TX] Low level size 204, driver size 92, total size 296
    Enable BMX IRQ
    [version] lmac 5.4.0.0
    [version] version_machw_1 000055FB
    [version] version_machw_2 000001B3
    [version] version_phy_1 00822111
    [version] version_phy_2 00000000
    [version] features 000089DF
    [ME] HT supp 1, VHT supp 0
    [WF] country code CN used, num of channel 13
    ____               _     _  __
    / ___|___ _____   _| |   (_)/ _| ___
    | |   / _ \_  / | | | |   | | |_ / _ \
    | |__| (_) / /| |_| | |___| |  _|  __/
    \____\___/___|\__, |_____|_|_|  \___|
    |___/
    cozylife_app_info
    CozyLife SDK Version: 0.3.2
    CozyLife SDK Build Sep  9 2021 10:51:17
    cozylife_app_info
    Product Id: p93sfg
    Firmware Version: 1.1.1
    Firmware Build Sep  9 2021 10:51:30
    dohome_hal_wifi_set_sleep_flag not support now
    [20:24:25.289] -
    device id:
    [20:24:25.321] - 1609473600 [L] [     lib_log] udplog_init on: 0, 192.168.2.2:7789
    ADC freq: 8333Hz. ,div:9
    [20:24:25.392] - [       279][WARN  : bl_mtd.c: 201] addr@0x23080800 is xip flash, size 12
    [20:24:28.750] - [WIFI] [IND] SCAN Done
    [20:24:28.768] - AP01  rssi:-84  channel:11  ssid:EE-5XC2JC
    AP02  rssi:-45  channel:8  ssid:xxxxx
    AP03  rssi:-87  channel:6  ssid:xxxxx
    AP04  rssi:-85  channel:6  ssid:xxxxx
    AP05  rssi:-85  channel:6  ssi
    [20:24:28.772] - d:xxxxx
    AP06  rssi:-41  channel:6  ssid:xxxxx
    AP07  rssi:-41  channel:6  ssid:xxxxx
    AP08  rssi:-87  channel:1  ssid:xxxxx
    AP09  rssi:-58  channel:2  ssid:xxxxx
    AP10  rssi:-98  channel:1  ssid:xxxxx
    AP11  rssi:-98  channel:1  ssid:xxxxx
    AP12  rssi:-55  channel:1  ssid:xxxxx
    AP13  rssi:-85  channel:1  ssid:xxxxx
    [APP] [EVT] SCAN Done 3657, SCAN Result: OK
    [20:24:30.444] - [      5331][WARN  : bl_mtd.c: 201] addr@0x23080800 is xip
    [20:24:30.445] - flash, size 12
    [20:24:32.293] - [WIFI] [IND] SCAN Done
    AP01  rssi:-98  channel:11  ssid:xxxxx
    AP02  rssi:-81  channel:11  ssid:xxxxx
    AP03  rssi:-85  channel:11  ssid:xxxxx
    AP04  rssi:-84  channel:11  ssid:xxxxx
    AP05  rssi:-44  channel:8  ssid:xxxxx
    AP06  rssi:-89  channel:6  ssid:xxxxx
    AP07  rssi:-87  channel:6  ssi
    [20:24:32.296] - d:xxxxx
    AP08  rssi:-86  channel:6  ssid:xxxxx
    AP09  rssi:-41  channel:6  ssid:xxxxx
    AP10  rssi:-41  channel:6  ssid:xxxxx
    AP11  rssi:-84  channel:1  ssid:xxxxx
    AP12  rssi:-57  channel:2  ssid:xxxxx
    AP13  rssi:-98  channel:1  ssid:xxxxx
    AP14  rssi:-98  channel:1  ssid:xxxxx
    AP15  rssi:-55  channel:1  ssid:xxxxx
    AP16  rssi:-85  channel:1  ssid:xxxxx
    [APP] [EVT] SCAN Done 7168, SCAN Result: OK
    1609473607 [L] [    lib_wifi] wifi_start_config
    [      7180][WARN  : bl_mtd.c: 201] addr@0x23081200 is xip flash, size 11
    [20:24:32.486] - [lwi
    [20:24:32.487] - p] netif status callback
    IP: 192.168.11.1
    MK: 255.255.255.0
    GW: 0.0.0.0
    [WF] MM_ADD_IF_REQ Sending: AP
    [WF] MM_ADD_IF_REQ Done
    [WF] vif_index from LAMC is 0
    [lwip] netif status callback
    IP: 192.168.4.1
    MK: 255.255.255.0
    GW: 0.0.0.0
    [DHCP] ip_start: [192.168.4.2]
    [DHCP] ip_start: [192.168.4.254]
    [WF] APM_START_REQ Sending with vif_index 0
    [WF] APM_START_REQ Done
    [WF] status is 00
    [WF] vif_idx is 00
    [WF] ch_idx is 00
    [WF] bcmc_idx is 03
    [APP] [EVT] Unknown code 11, 7373
    BD_ADDR:(MSB)24:94:94:ee:7f:98(LSB)
    [20:24:32.519] - 1609473607 [L] [     lib_ble] ble mac: 24:94:94:ee:7f:98
    16094
    [20:24:32.520] - 73607 [L] [     lib_ble] bt_enabled
    
    [20:24:42.531] - [     17417][WARN  : bl_mtd.c: 201] addr@0x23081200 is xip flash, size 11


    then the flash ID using BLDevCube 1.8.9

    [20:45:33.401] - 8160/38592
    [20:45:33.497] - 12240/38592
    [20:45:33.593] - 16320/38592
    [20:45:33.689] - 20400/38592
    [20:45:33.784] - 24480/38592
    [20:45:33.880] - 28560/38592
    [20:45:33.976] - 32640/38592
    [20:45:34.072] - 36720/38592
    [20:45:34.120] - 38592/38592
    [20:45:34.136] - Run img
    [20:45:34.265] - Load helper bin time cost(ms): 2817.768310546875
    [20:45:34.375] - Flash load shake hand
    [20:45:34.388] - default set DTR high
    [20:45:34.498] - clean buf
    [20:45:34.502] - send sync
    [20:45:34.731] - ack is 4f4b
    [20:45:34.776] - Read mac addr
    [20:45:34.792] - macaddr: 977fee949424
    [20:45:34.793] - flash set para
    [20:45:34.793] - ========= flash read jedec ID =========
    [20:45:34.808] - Read flash jedec ID
    [20:45:34.809] - flash jedec id: ef401580
    [20:45:34.809] - Finished
    [20:45:34.815] - get flash size: 0x00200000
    [20:45:34.816] - ========= flash read jedec ID =========
    [20:45:34.824] - Read flash jedec ID
    [20:45:34.825] - flash jedec id: ef401580
    [20:45:34.825] - Finished


    I also took a 2mb backup of the flash, attached. The whole chip tick is for the erase function only. Read chip requires address input.
    Bouffalo Lab Dev Cube interface with chip configuration.

    Now, despite having soldered each pin to a dupont cable, keeping my wires short and using an external <5A 3.3v PSU, I had great difficulty getting the device to boot after flashing OBK. DevCube 1.8.9 would flash successfully, using old (from the Elektroda 1.4.8 pack) and new boot2, partition files, but it would never boot to AP or even give any UART boot output. I tried several versions of OpenBL602 going back to April 2022.

    Using 1.4.8 DevCube however (it seemed happy with the flashID for once) was successful, but the boot would either loop or the AP would show briefly and disappear or show but nothing could connect to it. Suspect boot log errors would change between flash attempts. I've seen unknown gpio like here https://www.elektroda.com/rtvforum/topic3889041-120.html#20135575 and romfs magic now correct, like here https://www.elektroda.com/rtvforum/topic3889041-390.html#20973684

    Flashing gpio app booted OK https://github.com/lupyuen/lupyuen.github.io/blob/master/src/led.md

    Powering from the mains as if a normal finished device made no difference to times when it was boot looping on 3.3v. I was at a loss, but after quite a number of attempts I think my final working one was using blflash! Maybe just a fluke. I think I'll get a BL602 dev board to see if I can find a pattern to what works and what doesn't. I also tried CH340 and FTDI USB-TTL adaptors.

    After finally getting into OBK console (browsing to 192.168.169.1) I could use the GPIO doctor to find all 5 PWM pins. Those were

    P14 - RED - PWM1
    P20 - GREEN - PWM2
    P21 - BLUE - PWM3
    P22 - COLD WHITE - PWM4
    P3 - WARM WHITE - PWM5

    which makes the OBK template

    Code: JSON
    Log in, to see the code


    PCB text: XLD-QFLWP-YT2.1
    Various pics:

    Screenshot of Bouffalo Lab Dev Cube showing successful flashing configuration. Bouffalo Lab Dev Cube screen with flashed configuration. View of a PCB labeled XLD-QFLWP-YT2.1 with various conductive traces, set against a wooden surface. Electronic module without RF shield on a wooden table. Electronic module of a bulb with visible capacitors and transistors. Electronic module with a microchip and components on a circuit board. Close-up of BL602L20 chip on a circuit board Circuit board with electronic components and attached wires on a wooden surface. Close-up of an electronic module on a circuit board with a visible integrated circuit and components. Metal cover for DT-BL200 module with cutout and connector. LED Smart Bulb with user manual and packaging. Cracked smart bulb on a carpet Back of RGB smart bulb packaging. View of a device interface showing the device ID, signal strength, and firmware version.
    Smart Bulb and its packaging on a carpet.
  • ADVERTISEMENT
  • #2 20983441
    p.kaczmarek2
    Moderator Smart Home
    Out of curiosity, do you know a matching ESP or Beken module? With the same pinout as DT-BL200?

    Added after 1 [minutes]:

    EDIT: I've found answer to my own question:
    Quote:

    This module can replace modules such as: BW2L, CB2L, DT-BL200, TYWE2L, WB2L, WBR2L, WR2L
    This module is designed for bulbs so the pinout labeling shows colors.

    Module is almost pin compatible with BW2L,CB2L,DT-BL200,TYWE2L,WB2L,WBR2L,WR2L

    It can still be used for any application, just like any other module. It has almost all of the GPIOs broken out (excluding GPIO2) and that includes the A0 analog GPIO.

    Pin diagram of the DMP-L1 module with pin labels shown on the sides.
    ESP WiFi module DT-Light powered by DOITING.
    that's from @BlackAdder page, interesting

    Added after 1 [minutes]:

    Regarding flashing issues - did you power it from mains when booting up?

    I already had reports saying that people tried to power BL602 with low quality/low current power supplies and it was boot looping all the time, but it worked once they soldered it back to the original circut.
    Helpful post? Buy me a coffee.
  • #3 20983664
    divadiow
    Level 34  
    p.kaczmarek2 wrote:
    Regarding flashing issues - did you power it from mains when booting up?


    yes. I switched to mains after every different flash with a subsequent boot loop to rule out potential 3.3v issue.
  • ADVERTISEMENT
  • #4 20983683
    p.kaczmarek2
    Moderator Smart Home
    This is very strange, can you document what you did?
    This person has a similiar issue: https://www.elektroda.pl/rtvforum/topic4039068.html
    Helpful post? Buy me a coffee.
  • #5 20983728
    divadiow
    Level 34  
    hmm. I did so many things I couldn't possibly be accurate in my recollections. Generally speaking BL602s are a pain so far.
    All apart from the this time: https://www.elektroda.com/rtvforum/topic4024917.html

    but that was also when I used 5v DC, the BL602s are so fussy with power, which we know of course. I'd have to buy another bulb and start from the beginning. I wish there were more hours in the day!

    p.kaczmarek2 wrote:
    This module can replace modules such as: BW2L, CB2L, DT-BL200, TYWE2L, WB2L, WBR2L, WR2L
    This module is designed for bulbs so the pinout labeling shows colors.

    Module is almost pin compatible with BW2L,CB2L,DT-BL200,TYWE2L,WB2L,WBR2L,WR2L

    It can still be used for any application, just like any other module. It has almost all of the GPIOs broken out (excluding GPIO2) and that includes the A0 analog GPIO.


    yes! I saw this too when googling. Interesting also is that the PCB for this DT-BL200 bulb is almost identical to other bulb PCBs I've seen. for example https://www.elektroda.com/rtvforum/topic4007008.html

    Seems theyre module agnostic sometimes. Old module stock? who knows.

    Added after 38 [minutes]:

    I have two bulbs untouched in boxes and was hoping for another DT-BL200. I've popped their heads off. They're both QM-02L (CB2L variant) like here https://www.elektroda.com/rtvforum/topic3941220.html

    :(

    Added after 6 [hours] 1 [minutes]:

    Should I keep posting new variants I get as new threads @p.kaczmarek2 ? I don't want to be seen to be spamming the forum
  • ADVERTISEMENT
  • Helpful post
    #6 20984381
    p.kaczmarek2
    Moderator Smart Home
    Please post all the information you can get.
    If you get a totally new device, post new thread.
    If you get a device that has a short thread, but you can do a better thread (more detailed article), create a new thread, it can be marked as "detailed" on our list:
    https://github.com/OpenBekenIOT/webapp/blob/gh-pages/devices.json
    If you get a device that already has a detailed thread with a well write-up, just post information to the existing thread, share the flash backup, etc.
    Helpful post? Buy me a coffee.
  • #7 21169140
    diepeterpan
    Level 1  
    >>20982854 Thank you, this helped a lot, no problems, worked 100%.
  • ADVERTISEMENT
  • #9 21177100
    p.kaczmarek2
    Moderator Smart Home
    Sure, if you want, add info to docs here:
    https://github.com/openshwprojects/OpenBK7231...d8cf361c354742aa4a5/src/cmnds/cmd_main.c#L689
    and I will merge it and update docs.
    Spoiler:

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

    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around flashing the DT-BL200 module found in the CozyLife ES/E27 RGBCW bulb to operate without cloud dependency. The user initially damaged their DT-BL200 module and sought assistance after purchasing a replacement. Participants shared insights on the module's specifications, including its Bouffalo Labs BL602L20 chipset, and discussed issues related to power supply quality affecting the flashing process. Recommendations included documenting the flashing steps and contributing to existing threads for better community support. The importance of using stable power sources and potential compatibility with other modules was also highlighted.
Summary generated by the language model.
ADVERTISEMENT