logo elektroda
logo elektroda
X
logo elektroda

Sonoff B02-BLA60 E27 LED Bulb-opening, pics, flashing, boot log, module info [BL602][SM-030][BP5772]

divadiow 390 5
ADVERTISEMENT
  • Helpful post
    #1 21490196
    divadiow
    Level 34  
    Sonoff B02-BL-A60 ES/E27 LED CW+WW bulb from Ali Express
    https://www.aliexpress.com/item/1005001933250712.html
    Product page displaying the SONOFF smart Wi-Fi LED bulb.
    https://sonoff.tech/product/smart-lighting/b02-bl-b05-bl/

    Box of Sonoff B02-BL-A60 Wi-Fi bulb. Packaging of a Sonoff Wi-Fi Smart LED Bulb. Packaging of a Wi-Fi Smart LED bulb. Blue box with description of B02 bulb compatibility with SONOFF products. Sonoff LED bulb on a carpet. Close-up of a Wi-Fi LED bulb with technical information on the casing. View of the interior of an LED bulb with visible electronic circuit and LED diodes. LED module with electronic components and light diodes. Disassembled LED bulb lying on a blue table.

    Removal of positive plug and then too brutal a removal of the screw fitting. Broke it even more trying to to reshape
    A light bulb shown in close-up, held in a vise. Close-up of a damaged LED bulb with a detached metal screw base. Metal cylinder with grooves and holes on a blue background.

    spares box to the rescue
    A box with various electronic components, such as LED bulbs, mounting brackets, and electronic circuits.

    more internals
    Open plastic casing with a visible circuit board and protruding wires. Printed circuit board with electronic components on a blue background. Close-up of a circuit board with visible electronic components. LED bulb PCB with multiple LED diodes and electronic components on a blue background. Close-up of an electronic circuit board with a green YX-12 module and a capacitor. Electronic circuit with capacitors and other components on a blue surface. Circuit board of a Sonoff B02-BL-A60 bulb with visible electronic components.
    SM-030 module with a 400V capacitor and circuit board.

    Despite the pads being quite small it was still possible to solder without removing the whole module. Ground pin to the LED disc was used.
    Close-up of an electronic module with visible component labels. Close-up of a circuit board with soldered wires. PCB with wires connected to components Circuit board with connected wires on a specialized workstation.

    10k resistor from boot (GPIO8) to 3.3v to get into UART download mode

    RX/TX labels on SM-030 module are where theyre to go to, so RX pad to USB-TTL RX, TX to USB-TTL TX.

    eWeLink factory boot log at 2000000 then 921600 baud.
    Code: Text
    Log in, to see the code


    not very revealing.

    Flash ID read
    Screenshot of Bouffalo Lab Dev Cube interface with the Flash tab open.
    Flash dump to file
    Screenshot of the Bouffalo Lab Dev Cube software interface for the BL602/604 module.
    OpenBL602 flash with custom mac in dts file
    Screenshot of Bouffalo Lab Dev Cube 1.9.0 software with a tab for flashing BL602/604 chips.

    P20 = warm white
    P21 = cold white

    Code: JSON
    Log in, to see the code


    and with all wires desoldered, donor fitting in place and OpenBL602 configured
    Sonoff B02-BL-A60 LED bulb lying on a tabletop. Illuminated LED bulb with visible diodes on the circuit board.
    OpenBL602 software interface with LED brightness and temperature adjustment slider.




    SM-030 (developed and designed by Shenzhen kuzhai Technology Co., Ltd) module is an interesting form factor, the first of these I've had.
    https://fcc.report/FCC-ID/2A2SV-SM-030

    Technical drawing of the bottom view of an electronic connector with pin labels RXD, TXD, ADC, PWM5, PWM4, PWM3/CT, PWM2/SDA/BR, PWM1/SCL, GND, and 3V3.
    Each edge pad is the same both sides, making soldering choices easier.

    Diagram of SM-030 module pin functions.
    Bottom view of a circuit board with connection labels SM-030 electronic module with visible components.

    PWM control is courtesy of the Bright Power (BP Semi) BP5772 - a highly integrated dual-channel PWM dimming LED linear constant current driver chip

    Diagram of BP5772 chip with pin labels.




    Flash efuse and firmware backups can be found at https://github.com/openshwprojects/FlashDumps/tree/main/IoT/BL602
    Sonoff_B02-BL-A60_SM-030_(FWLED-SN0205PWM-LIGHT-BL602L_v1.1.1).bin



    eWeLink app paired visuals. No firmware update offered
    App screen with detected Sonoff B02-BL-A60 bulb. eWeLink app with connected Sonoff B02-BL-A60 bulb Interface of the app controlling the Sonoff B02-BL-A60 LED bulb on a smartphone, showing brightness and light temperature settings. Device settings for Sonoff B02-BL-A60 bulb on a smartphone screen.



    8X2-A60-WIFI-CW-BP-G1
    TP230-9-A60-WIFI-CW-G2
  • ADVERTISEMENT
  • #2 21490543
    ferbulous
    Level 18  
    You should use one of these and tilt it left and right to remove the bottom screw and it should pop off easily
    E27 bulb adapter with plug and switch.
  • ADVERTISEMENT
  • #3 21490576
    divadiow
    Level 34  
    Good thinking. I have similar actually but I don't know why I haven't made use of them for this purpose. 🤷‍♂️
  • ADVERTISEMENT
  • #4 21502915
    aurismat
    Level 2  
    Hi, I was trying to do the same flash procedure to my own Sonoff B02-BL-A60 bulb with the procedure as seen both here and in B05-made video by Elektroda.

    After some issues with temperamental flashing, I eventually succeeded in flashing the chip, but I couldn't get it to boot - it would seem to boot just enough to bring up the access point and even connect to it, but not enough to bring up the webUI to configure it.

    For the record, I lacked a reasonable power supply so I just used an ESP-32 to supply the UART adapter and the chip with stable-ish 3.3v(my meter showed 3.2v, but I'm not sure I trust it to be accurate). Everything else I connected as per the diagram seen in the B05 flashing video.

    Attaching a full boot log I've pulled from reading the UART when using dev cube. What seems to catch my attention that it crashed, and the last message was that 'romfs magic is NOT correct'. Anyone ever run into this and know how to fix it?

    Full log:
    
    Start Wi-Fi fw @169ms
    1th channel,lo_vco_freq_cw=132
    2th channel,lo_vco_freq_cw=131
    3th channel,lo_vco_freq_cw=130
    4th channel,lo_vco_freq_cw=129
    5th channel,lo_vco_freq_cw=128
    6th channel,lo_vco_freq_cw=127
    7th channel,lo_vco_freq_cw=125
    8th channel,lo_vco_freq_cw=124
    9th channel,lo_vco_freq_cw=123
    10th channel,lo_vco_freq_cw=122
    11th channel,lo_vco_freq_cw=121
    12th channel,lo_vco_freq_cw=120
    13th channel,lo_vco_freq_cw=119
    14th channel,lo_vco_freq_cw=118
    15th channel,lo_vco_freq_cw=116
    16th channel,lo_vco_freq_cw=115
    17th channel,lo_vco_freq_cw=114
    18th channel,lo_vco_freq_cw=113
    19th channel,lo_vco_freq_cw=112
    20th channel,lo_vco_freq_cw=111
    21th channel,lo_vco_freq_cw=110
    0th channel,vco_idac_cw=9
    1th channel,vco_idac_cw=8
    2th channel,vco_idac_cw=8
    3th channel,vco_idac_cw=8
    4th channel,vco_idac_cw=8
    5th channel,vco_idac_cw=7
    6th channel,vco_idac_cw=7
    7th channel,vco_idac_cw=7
    8th channel,vco_idac_cw=7
    9th channel,vco_idac_cw=7
    10th channel,vco_idac_cw=7
    11th channel,vco_idac_cw=7
    12th channel,vco_idac_cw=7
    13th channel,vco_idac_cw=7
    14th channel,vco_idac_cw=7
    15th channel,vco_idac_cw=7
    16th channel,vco_idac_cw=7
    17th channel,vco_idac_cw=7
    18th channel,vco_idac_cw=7
    19th channel,vco_idac_cw=6
    20th channel,vco_idac_cw=6
    LO locked 9 122
    rosdac_i_gc3=29
    rosdac_i_gc2=29
    rosdac_i_gc1=29
    rosdac_i_gc0=29
    rosdac_q_gc3=35
    rosdac_q_gc2=35
    rosdac_q_gc1=35
    rosdac_q_gc0=35
    rbb_cap1_fc_i=22,rbb_cap2_fc_i=22,rbb_cap1_fc_q=22,rbb_cap2_fc_q=22
    new rbb_cap1_fc_i=46,rbb_cap2_fc_i=46,rbb_cap1_fc_q=46,rbb_cap2_fc_q=46
    LO locked 9 122
    amp=128,step=32,adc_mean_i=42
    amp=160,step=16,adc_mean_i=61
    amp=176,step=8,adc_mean_i=70
    amp=184,step=4,adc_mean_i=75
    amp=188,step=2,adc_mean_i=77
    amp=190,step=1,adc_mean_i=78
    amp=191,step=0,adc_mean_i=78
    tmx_cs=0, tmxcs_pwr_avg=29644, tmxcs_pwr_avg>>10=28
    tmx_cs=1, tmxcs_pwr_avg=38364, tmxcs_pwr_avg>>10=37
    tmx_cs=2, tmxcs_pwr_avg=50645, tmxcs_pwr_avg>>10=49
    tmx_cs=3, tmxcs_pwr_avg=65786, tmxcs_pwr_avg>>10=64
    tmx_cs=4, tmxcs_pwr_avg=77454, tmxcs_pwr_avg>>10=75
    tmx_cs=5, tmxcs_pwr_avg=76412, tmxcs_pwr 
    [02:08:45.622] - Starting bl602 now....
    Booting BL602 Chip...
    ██████╗ ██╗      ██████╗  ██████╗ ██████╗
    
    ██╔══██╗██║     ██╔════╝ ██╔═████╗╚════██╗
    
    ██████╔╝██║     ███████╗ ██║██╔██║ █████╔╝
    
    ██╔══██╗██║     ██╔═══██╗████╔╝██║██╔═══╝
    
    ██████╔╝███████╗╚██████╔╝╚██████╔╝███████╗
    
    ╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝ ╚══════╝
    
    
    
    ------------------------------------------------------------
    RISC-V Core Feature:RV32-ACFIMX
    Build Version:      release_bl_iot_sdk_1.6.22-22-g1d4ff804-dirty
    Std Driver Version: 541807d
    PHY   Version:      a0_final-73-g62481a0
    RF    Version:      79cc6b9
    Build Date:         Mar 30 2025
    Build Time:         22:29:53
    Boot Reason:        BL_RST_POWER_OFF
    ------------------------------------------------------------
    Heap 126944@0x42023020, 5888@0x4204a900
    Boot2 consumed 82ms
    
    blog init set power on level 2, 2, 2.
    [IRQ] Clearing and Disable all the pending IRQ...
    ------------------TRNG TEST---------------------------------
    **********TRNG TEST rand[4be76d2c]**************
    **********TRNG TEST rand[73221a4f]**************
    ------------------------------------------------------------
    [         0][INFO  : hal_boot2.c: 285] [HAL] [BOOT2] Active Partition[0] consumed 596 Bytes
    [         0][INFO  : hal_boot2.c:  82] ======= PtTable_Config @0x4200f0a4=======
    [         0][INFO  : hal_boot2.c:  83] magicCode 0x54504642; version 0x0000; entryCnt 7; age 0; crc32 0x12DF9A26
    [         0][INFO  : hal_boot2.c:  89] idx  type device activeIndex     name   Address[0]  Address[1]  Length[0]   Length[1]   age
    [         0][INFO  : hal_boot2.c:  91] [00]  00     0         0            FW  0x00010000  0x000d8000  0x000c8000  0x00088000  0
    [         0][INFO  : hal_boot2.c:  91] [01]  02     0         0           mfg  0x00160000  0x00000000  0x00032000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [02]  03     0         0         media  0x00192000  0x00000000  0x00057000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [03]  04     0         0           PSM  0x001e9000  0x00000000  0x00008000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [04]  05     0         0           KEY  0x001f1000  0x00000000  0x00002000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [05]  06     0         0          DATA  0x001f3000  0x00000000  0x00005000  0x00000000  0
    [         0][INFO  : hal_boot2.c:  91] [06]  07     0         0       factory  0x001f8000  0x00000000  0x00007000  0x00000000  0
    [         0][INFO  : bl_flash.c:  96] ======= FlashCfg magiccode @0x42049c18, code 0x47464346 =======
    [         0][INFO  : bl_flash.c:  97] mid       0xEF
    [         0][INFO  : bl_flash.c:  98] clkDelay    0x1
    [         0][INFO  : bl_flash.c:  99] clkInvert    0x1
    [         0][INFO  : bl_flash.c: 100] sector size   4KBytes
    [         0][INFO  : bl_flash.c: 101] page size   256Bytes
    [         0][INFO  : bl_flash.c: 102] ---------------------------------------------------------------
    [         0][INFO  : hal_board.c:1249] [MAIN] [BOARD] [FLASH] addr from partition is 001f8000, ret is 0
    [         0][INFO  : hal_board.c:1257] [MAIN] [BOARD] [XIP] addr from partition is 231e7000, ret is 0
    [         0][INFO  : hal_board.c: 208] MAC address mode length 3
    [         0][INFO  : hal_board.c: 212] MAC address mode is MBF
    [         0][INFO  : hal_board.c: 194] Set MAC addrress 28:BB:E
    [02:08:45.723] - D:30:C8:6D
    [         0][INFO  : hal_board.c: 955] country_code : 86
    [         0][INFO  : hal_board.c: 323] xtal_mode length 2
    [         0][INFO  : hal_board.c: 327] xtal_mode is MF
    [         0][INFO  : hal_board.c: 251] xtal dtb in DEC :36 36 0 60 60
    [         0][INFO  : hal_board.c: 986] channel_div_table :
    [         0][BUF: hal_board.c: 987] c4 4e ec 1e cb b7 fc 1e d2 20 0d 1f d8 89 1d 1f df f2 2d 1f e5 5b 3e 1f ec c4 4e 1f f2 2d 5f 1f f9 96 6f 1f 00 00 80 1f 06 69 90 1f 0d d2 a0 1f 13 3b 
    [         0][BUF: hal_board.c: 987] b1 1f 89 9d d8 1f f8 81 1f 20 
    [         0][INFO  : hal_board.c: 997] channel_cnt_table :
    [         0][BUF: hal_board.c: 998] 8a a7 e3 a7 3c a8 95 a8 ed a8 46 a9 9f a9 f8 a9 51 aa aa aa 03 ab 5c ab b5 ab 8a ac 4d 46 00 00 6c e6 09 23 90 2f 02 42 00 d0 09 23 00 d0 09 23 00 d0 
    [         0][BUF: hal_board.c: 998] 09 23 00 d0 09 23 
    [         0][INFO  : hal_board.c:1006] lo_fcal_div : 1387
    [         0][INFO  : hal_board.c:1025] pwr_table_11b :20 20 20 18
    [         0][INFO  : hal_board.c:1045] pwr_table_11g :18 18 18 18 18 18 14 14
    [         0][INFO  : hal_board.c:1065] pwr_table_11n :18 18 18 18 18 16 14 14
    [         0][INFO  : hal_board.c: 523] pwr_mode length 2
    [         0][INFO  : hal_board.c: 527] pwr_mode is bf
    [         0][INFO  : hal_board.c: 415] pwr_offset from dtb:
    [         0][BUF: hal_board.c: 416] 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 
    [         0][INFO  : hal_board.c: 421] pwr_offset from dtb (rebase on 10):
    [         0][BUF: hal_board.c: 504]   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
    [         0][INFO  : hal_board.c:1086] set pwr_table_ble = 13 in dts
    [         0][INFO  : hal_board.c: 687] ap_ssid string[0] = bl_test_005, ap_ssid_len = 11
    [         0][INFO  : hal_board.c: 698] ap_psk string[0] = 12345678, ap_psk_len = 8
    [         0][INFO  : hal_board.c: 707] ap_channel = 11
    [         0][INFO  : hal_board.c: 635] [STA] ap_ssid string[0] = yourssid, ap_ssid_len = 8
    [         0][INFO  : hal_board.c: 646] [STA] ap_psk string[0] = yourapssword, ap_psk_len = 12
    [         0][INFO  : hal_board.c: 654] auto_connect_enable = 0
    [         0][INFO  : hal_board.c: 749] Troom_os = -1, lentmp = 4
    [         0][INFO  : hal_board.c: 758] linear_or_follow = 1, lentmp = 4
    [         0][INFO  : hal_board.c: 767] Tchannels:2412,2427,2442,2457,2472,
    [         0][INFO  : hal_board.c: 781] Tchannel_os:180,170,160,140,120,
    [         0][INFO  : hal_board.c: 795] Tchannel_os_low:200,190,180,160,130,
    [         0][INFO  : hal_board.c: 808] en_tcal = 0, lentmp = 4
    sizeof(StackType_t)=4
    [OS] Starting aos_loop_proc task...
    [OS] Starting TCP/IP Stack...
    -------------------->>>>>>>> LWIP tcp_port 56155
    [OS] Starting OS Scheduler...
    [BL] [SEC] TRNG Handler
    === 32 task inited
    ====== bloop dump ======
      bitmap_evt 0
      bitmap_msg 0
    --->>> timer list:
      32 task:
        task[31] : SYS [built-in]
          evt handler 0x2306b110, msg handler 0x2306b0e0, trigged cnt 0, bitmap async 0 sync 0, time consumed 0us acc 0ms, max 0us
        task[30] : empty
        task[29] : empty
        task[28] : empty
        task[27] : empty
        task[26] : empty
        task[25] : empty
        task[24] : empty
        task[23] : empty
        task[22] : empty
        task[21] : empty
        task[20] : empty
        task[19] : empty
        task[18] : empty
        task[17] : empty
        task[16] : empty
        task[15] : empty
        task[14] : empty
        task[13] : empty
        task[12] : empty
        task[11] : empty
        task[10] : empty
        task[09] : empty
        task[08] : empty
        task[07] : empty
        task[06] : empty
        task[05] : empty
        task[04] : empty
        task[03] : empty
        task[02] : empty
        task[01] : empty
        task[00] : empty
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name PSM
          id 0
          offset 0x001e9000(2002944)
          size 0x00008000(32Kbytes)
          xip_addr 0x231d8000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [EF] Found Valid PSM partition, XIP Addr 231d8000, flash addr 001e9000
    *default_env_size = 0x00000001
    ENV start address is 0x00000000, size is 32768 bytes.
    EasyFlash V4.0.99 is initialize success
    .
    You can get the latest version on https://github.com/armink/EasyFlash .
    [        28][INFO  : hal_uart.c: 364] uart[0] rx_buf_size 512, tx_buf_size 512
    [        29][INFO  : hal_uart.c: 379] uart[0] cts status = disable lentmp = 7
    [        30][INFO  : hal_uart.c: 379] uart[0] rts status = disable lentmp = 7
    [        30][INFO  : hal_uart.c: 402] id = 0, tx = 16, rx = 7, cts = 255, rts = 255 baudrate = 2000000.
    [        31][INFO  : hal_uart.c: 410] bl_uart_init 0 ok.
    [        31][INFO  : hal_uart.c: 411] bl_uart_init 0 baudrate = 2000000 ok.
    [        33][INFO  : hal_uart.c: 364] uart[1] rx_buf_size 512, tx_buf_size 512
    [        34][INFO  : hal_uart.c: 379] uart[1] cts status = disable lentmp = 7
    [        34][INFO  : hal_uart.c: 379] uart[1] rts status = disable lentmp = 7
    [        35][INFO  : hal_uart.c: 402] id = 1, tx = 4, rx = 3, cts = 255, rts = 255 baudrate = 115200.
    [        35][INFO  : hal_uart.c: 410] bl_uart_init 1 ok.
    [        36][INFO  : hal_uart.c: 411] bl_uart_init 1 baudrate = 115200 ok.
    [        36][INFO  : hal_gpio.c: 202] [HAL] [GPIO] Max num is 40
    [        37][INFO  : hal_gpio.c: 177] New CONF: GPIO05: feature 0, active 1, mode 0, time 100
    [        38][INFO  : loopset_led.c:  75] [LED] New Trigger: PIN 5, active level Lo, type Blink
    [        39][INFO  : hal_gpio.c: 115] [gpio1] status = disable
    [        39][ERROR
    : hal_gpio.c: 216] gpio1: unvalid GPIO config
    [        40][ERROR
    : hal_gpio.c: 130] gpio2: unvalid GPIO config button
    [        40][ERROR
    : hal_gpio.c: 216] gpio2: unvalid GPIO config
    [        41][INFO  : hal_gpio.c: 106] gpio3 NOT found
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name media
          id 0
          offset 0x00192000(1646592)
          size 0x00057000(348Kbytes)
          xip_addr 0x23181000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [        42][ERROR
    : bl_romfs.c: 146] romfs magic is NOT correct
    
  • ADVERTISEMENT
  • #5 21502979
    divadiow
    Level 34  
    Code: Text
    Log in, to see the code
    has been seen even on the boot log of factory firmware so I wouldn't worry about this.

    BL602 is notoriously fussy with power so it's more likely to be that. does it crash and stop though or does it boot loop? Have you tried it soldered back in and on mains power in a safe way?
  • #6 21503004
    aurismat
    Level 2  
    >>21503004

    Update on my situation: seems like @divadiow was correct - all it was just the BL602 being pissy about it's 3.3v line. Upon getting a more 'normal' breadboard to set up the power and boot pins, not only it flashed first try but also brought up the AP without issue. Reassembling the bulb as we speak, if all works well I'll reassemble it with some thermal glue I've got today along with proper power supplying.

    To those who read this in the future - have a solid power supply that can provide stable 3.3v! ;)

    Anyway, thanks for your help.
ADVERTISEMENT