logo elektroda
logo elektroda
X
logo elektroda

How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress

gregmarfaing 3636 20
ADVERTISEMENT
  • Helpful post
    #1 20980720
    gregmarfaing
    Level 6  
    I got this device from Aliexpress
    DIY smart switch device and its box on a wooden table. DIY smart switch device and box on a wooden surface. Image of a printed circuit board with wires and electronic components. Interior of a DIY smart switch from Aliexpress with visible module and electronic components. Close-up of an SM-028_V1.3 electronic module held in a servicing clip.
    I desoldered the module to flash it and i didn't see a config working for me so here it is
    {
      "vendor": "Ewelink",
      "bDetailed": "0",
      "name": "DIY smart switch",
      "model": "DIY smart switch",
      "chip": "BL602",
      "board": "SM-028_V1.3",
      "flags": "1024",
      "keywords": [
        "switch",
        "relay",
        "TODO"
      ],
      "pins": {
        "2": "TglChanOnTgl;1",
        "14": "LED_n;1",
        "20": "Btn;1",
        "21": "Rel;1"
      },
      "command": "powersave 1",
      "image": "https://obrazki.elektroda.pl/3889877500_1709032216.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20980720"
    }
  • ADVERTISEMENT
  • Helpful post
    #2 20990062
    p.kaczmarek2
    Moderator Smart Home
    Added, thank you:
    https://github.com/OpenBekenIOT/webapp/commit/296aedc5e8acb2041ed2bc969f52eb82de0a6bc8
    It's good to see another BL602 flashed.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21045630
    Raufaser
    Level 10  
    I got a very similar switch from Aliexpress. (Looks different, but I could take the same config.)

    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress
    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress

    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress

    PCB is different.

    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress

    BL602 PCB in place and desoldered.

    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress

    Wiring and setup of BuffaloDevCube for flashing

    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress Screenshot of Bouffalo Lab Dev Cube program with flashing settings.

    Button, LED and WebIF are working

    How to Flash BL602 Chip on Ewelink SM-028_V1.3 Smart Switch 16A from Aliexpress

    Edit:
    I used BuffaloDevCube incorrectly.
  • ADVERTISEMENT
  • #4 21045698
    miegapele
    Level 15  
    You need to specify dts file in this flasher. If not specified, all devices will get the same MAC address.


    Added after 25 [minutes]:

    Your Mac is probably now C0:50:43:C9:00:01.
  • #5 21046152
    Raufaser
    Level 10  

    Ouch, I didn't know that. Is it worth to reflash in the correct way or is the real MAC address now gone bye bye?
  • #6 21046163
    miegapele
    Level 15  

    Real address would reappear if you reflash. If you have only one such device, it's not a big deal, but if you had two, it would not work properly on the network.
  • #7 21046420
    Raufaser
    Level 10  

    I rewired everything and flashed again. At first, the MAC wouldn't change. Then I toggled "Chip Erase" to true. Now the MAC address is completely different. Hopefully the right one. Thanks again for pointing out my mistake.
  • #8 21047780
    gregmarfaing
    Level 6  

    It's nice to see that my config is useful,
    Anyway about the MAC address, I flashed mine with buffalo 1.4.8 and the MAC address is totally different from the "default" above without changing any setting and the UI is pretty different too
    : Screenshot of Bouffalo Lab Dev Cube 1.4.8 application with Simple Flasher mode open.
  • ADVERTISEMENT
  • #9 21048027
    miegapele
    Level 15  

    Yes, because dts file is mandatory in this flasher
  • #10 21447454
    niterian
    Level 8  
    There's another device that looks different, but the same config works.

    Aliexpress page: https://www.aliexpress.com/item/1005006157882766.html
    I got it for 9.53 PLN, ~2.38 USD


    White Smart Switch DH-2015 with WiFi support, 16A rating, compatible with Alexa, Google Assistant, and SmartThings.

    Name on the package: Smart Switch DH-2015
    Microcontroller module: SM-028_V1.3
    Name on the main board: AIYATO-BRK-01


    Smart Wi-Fi switch DH-2015 with instructions and packaging.
    Printed circuit board with SM-028_V1.3 microcontroller module mounted on it.
    Close-up of a device's mainboard with visible electronic components.

    It connects with eWeLink app.

    TX and RX are inconvenient to reach with soldering iron, so I desoldered the microcontroller module.


    Close-up view of a circuit board with electronic components such as a relay, capacitors, and connectors.
    Electronic kit with breadboard, microcontroller, and wires.

    I've used BouffaloLabDevCube-v1.9.0.zip, it's convenient for me because it also has a Linux version.

    Bouffalo Lab Dev Cube software interface with flash log

    Flash log:
    Spoiler:
    
    [20:55:17.102] - serial type is general
    [20:55:17.150] - Open /dev/ttyUSB0 Success
    [20:55:24.151] - Close /dev/ttyUSB0 Success
    [20:55:24.160] - ========= Interface is Uart =========
    [20:55:24.177] - eflash loader bin is eflash_loader_40m.bin
    [20:55:24.180] - ========= chip flash id: ef4015 =========
    [20:55:24.188] - create partition.bin, pt_new is True
    [20:55:24.202] - fw_boot_head_gen xtal: 40M
    [20:55:24.204] - Create bootheader using /home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini
    [20:55:24.204] - Updating data according to </home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [20:55:24.206] - Created file len:176
    [20:55:24.211] - Create efuse using /home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini
    [20:55:24.213] - Updating data according to </home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [20:55:24.215] - Created file len:128
    [20:55:24.219] - ========= sp image create =========
    [20:55:24.220] - Image hash is b'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
    [20:55:24.220] - Hash ignored
    [20:55:24.220] - Header crc ignored
    [20:55:24.220] - Write flash img
    [20:55:24.221] - Encrypt efuse data
    [20:55:24.223] - fw_boot_head_gen xtal: 40M
    [20:55:24.225] - Create bootheader using /home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini
    [20:55:24.225] - Updating data according to </home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [20:55:24.226] - Created file len:176
    [20:55:24.228] - Create efuse using /home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini
    [20:55:24.229] - Updating data according to </home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [20:55:24.232] - Created file len:128
    [20:55:24.235] - ========= sp image create =========
    [20:55:24.236] - Image hash is b'83891c0734583b9209e28aeaba717f85657b94747f6c4f2cc1c71e7fd874b4e8'
    [20:55:24.236] - Hash ignored
    [20:55:24.237] - Header crc ignored
    [20:55:24.237] - Write flash img
    [20:55:24.238] - Encrypt efuse data
    [20:55:24.244] - fw_boot_head_gen xtal: 40M
    [20:55:24.246] - Create bootheader using /home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini
    [20:55:24.246] - Updating data according to </home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini[BOOTHEADER_CFG]>
    [20:55:24.249] - Created file len:176
    [20:55:24.251] - Create efuse using /home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini
    [20:55:24.252] - Updating data according to </home/niteria/tmp/BL602/chips/bl602/img_create_iot/efuse_bootheader_cfg.ini[EFUSE_CFG]>
    [20:55:24.254] - Created file len:128
    [20:55:24.258] - ========= sp image create =========
    [20:55:24.261] - Image hash is b'd97b76ea1da04152d0006ef7ebd0034ac6c490d04b05b80c616ed2a6839ed1f1'
    [20:55:24.261] - Header crc: b'745e8318'
    [20:55:24.261] - Write flash img
    [20:55:24.266] - Encrypt efuse data
    [20:55:24.268] - FW Header is 176, 3920 still needed
    [20:55:24.268] - FW OTA bin header is Done. Len is 4096
    [20:55:24.332] - BL60X_OTA_Ver1.0
    [20:55:24.396] - FW OTA bin is Done. Len is 790560
    [20:55:24.631] - OTA XZ file len = 422652
    [20:55:24.632] - Partiton len = 557056
    [20:55:24.632] - BL60X_OTA_Ver1.0
    [20:55:24.670] - FW OTA xz is Done
    [20:55:24.670] - ========= eflash loader config =========
    [20:55:24.671] - Image offset = 8192
    [20:55:24.706] - =========/home/niteria/tmp/BL602/chips/bl602/device_tree/bl_factory_params_IoTKitA_40M.dts ——> /home/niteria/tmp/BL602/chips/bl602/device_tree/ro_params.dtb=========
    [20:55:24.812] - True
    [20:55:24.816] - Version: eflash_loader_v2.5.1
    [20:55:24.816] - Program Start
    [20:55:24.816] - ========= eflash loader cmd arguments =========
    [20:55:24.817] - Config file: /home/niteria/tmp/BL602/chips/bl602/eflash_loader/eflash_loader_cfg.ini
    [20:55:24.818] - serial port is /dev/ttyUSB0
    [20:55:24.818] - cpu_reset=False
    [20:55:24.818] - chiptype: bl602
    [20:55:24.818] - ========= Interface is uart =========
    [20:55:24.818] - com speed: 2000000
    [20:55:24.818] - Eflash load helper file: /home/niteria/tmp/BL602/chips/bl602/eflash_loader/eflash_loader_40m.bin
    [20:55:24.819] - ========= load eflash_loader.bin =========
    [20:55:24.819] - Load eflash_loader.bin via uart
    [20:55:24.819] - ========= image load =========
    [20:55:25.020] - Not ack OK
    [20:55:25.020] - FL
    [20:55:25.021] - result: FL
    [20:55:25.285] - tx rx and power off, press the machine!
    [20:55:25.285] - cutoff time is 0.1
    [20:55:25.386] - power on tx and rx
    [20:55:26.109] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [20:55:26.110] - clean buf
    [20:55:26.111] - send sync
    [20:55:26.312] - ack is 4f4b
    [20:55:26.342] - shake hand success
    [20:55:26.353] - get_boot_info
    [20:55:26.357] - data read is b'01000000000000000300040095bc41fb3db81500'
    [20:55:26.357] - ========= chipid: b83dfb41bc95 =========
    [20:55:26.358] - last boot info: None
    [20:55:26.358] - sign is 0 encrypt is 0
    [20:55:26.359] - segcnt is 1
    [20:55:26.368] - segdata_len is 38592
    [20:55:26.453] - 4080/38592
    [20:55:26.538] - 8160/38592
    [20:55:26.622] - 12240/38592
    [20:55:26.708] - 16320/38592
    [20:55:26.793] - 20400/38592
    [20:55:26.878] - 24480/38592
    [20:55:26.963] - 28560/38592
    [20:55:27.048] - 32640/38592
    [20:55:27.134] - 36720/38592
    [20:55:27.174] - 38592/38592
    [20:55:27.177] - Run img
    [20:55:27.280] - Load helper bin time cost(ms): 2461.21337890625
    [20:55:27.381] - Flash load shake hand
    [20:55:27.409] - default set DTR high
    [20:55:27.510] - clean buf
    [20:55:27.513] - send sync
    [20:55:27.721] - ack is 4f4b
    [20:55:27.753] - Read mac addr
    [20:55:27.756] - macaddr: 95bc41fb3db8
    [20:55:27.756] - flash set para
    [20:55:27.757] - ========= flash read jedec ID =========
    [20:55:27.760] - Read flash jedec ID
    [20:55:27.760] - flash jedec id: ef401580
    [20:55:27.760] - Finished
    [20:55:27.767] - get flash size: 0x00200000
    [20:55:27.768] - Program operation
    [20:55:27.768] - ========= flash chip erase all =========
    [20:55:28.779] - erase pending
    [20:55:29.788] - erase pending
    [20:55:30.797] - erase pending
    [20:55:31.805] - erase pending
    [20:55:32.814] - erase pending
    [20:55:33.126] - Chip erase time cost(ms): 5357.541015625
    [20:55:33.129] - Dealing Index 0
    [20:55:33.130] - ========= programming /home/niteria/tmp/BL602/chips/bl602/img_create_iot/whole_img_boot2.bin to 0x00000000
    [20:55:33.145] - ========= flash load =========
    [20:55:33.145] - decompress write rx timeout: 24.576
    [20:55:33.162] - decompress flash load 24060
    [20:55:33.180] - Load 2048/24060 {"progress":8}
    [20:55:33.204] - Load 4096/24060 {"progress":17}
    [20:55:33.220] - Load 6144/24060 {"progress":25}
    [20:55:33.237] - Load 8192/24060 {"progress":34}
    [20:55:33.254] - Load 10240/24060 {"progress":42}
    [20:55:33.271] - Load 12288/24060 {"progress":51}
    [20:55:33.287] - Load 14336/24060 {"progress":59}
    [20:55:33.304] - Load 16384/24060 {"progress":68}
    [20:55:33.321] - Load 18432/24060 {"progress":76}
    [20:55:33.338] - Load 20480/24060 {"progress":85}
    [20:55:33.355] - Load 22528/24060 {"progress":93}
    [20:55:33.368] - Load 24060/24060 {"progress":100}
    [20:55:33.368] - Load 24060/24060 {"progress":100}
    [20:55:33.368] - Write check
    [20:55:33.386] - Flash load time cost(ms): 240.7587890625
    [20:55:33.386] - Finished
    [20:55:33.387] - Sha caled by host: 2f44f91873a18ff35cf93ab5a35dcde41ab8f075e21af450e904699bdabb0c01
    [20:55:33.387] - xip mode Verify
    [20:55:33.405] - Read Sha256/47808
    [20:55:33.406] - Flash xip readsha time cost(ms): 16.298828125
    [20:55:33.406] - Finished
    [20:55:33.408] - Sha caled by dev: 2f44f91873a18ff35cf93ab5a35dcde41ab8f075e21af450e904699bdabb0c01
    [20:55:33.408] - Verify success
    [20:55:33.409] - Dealing Index 1
    [20:55:33.409] - ========= programming chips/bl602/partition/partition.bin to 0x0000E000
    [20:55:33.412] - ========= flash load =========
    [20:55:33.416] - Load 272/272 {"progress":100}
    [20:55:33.417] - Load 272/272 {"progress":100}
    [20:55:33.417] - Write check
    [20:55:33.419] - Flash load time cost(ms): 6.73876953125
    [20:55:33.419] - Finished
    [20:55:33.421] - Sha caled by host: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [20:55:33.421] - xip mode Verify
    [20:55:33.427] - Read Sha256/272
    [20:55:33.427] - Flash xip readsha time cost(ms): 2.95849609375
    [20:55:33.427] - Finished
    [20:55:33.429] - Sha caled by dev: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [20:55:33.431] - Verify success
    [20:55:33.431] - Dealing Index 2
    [20:55:33.431] - ========= programming chips/bl602/partition/partition.bin to 0x0000F000
    [20:55:33.433] - ========= flash load =========
    [20:55:33.438] - Load 272/272 {"progress":100}
    [20:55:33.438] - Load 272/272 {"progress":100}
    [20:55:33.438] - Write check
    [20:55:33.441] - Flash load time cost(ms): 7.166259765625
    [20:55:33.441] - Finished
    [20:55:33.441] - Sha caled by host: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [20:55:33.441] - xip mode Verify
    [20:55:33.446] - Read Sha256/272
    [20:55:33.447] - Flash xip readsha time cost(ms): 2.978759765625
    [20:55:33.447] - Finished
    [20:55:33.449] - Sha caled by dev: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [20:55:33.450] - Verify success
    [20:55:33.450] - Dealing Index 3
    [20:55:33.450] - ========= programming /home/niteria/tmp/BL602/chips/bl602/img_create_iot/whole_img.bin to 0x00010000
    [20:55:33.453] - ========= flash load =========
    [20:55:33.453] - decompress write rx timeout: 24.576
    [20:55:33.594] - decompress flash load 422652
    [20:55:33.610] - Load 2048/422652 {"progress":0}
    [20:55:33.630] - Load 4096/422652 {"progress":0}
    [20:55:33.646] - Load 6144/422652 {"progress":1}
    [20:55:33.662] - Load 8192/422652 {"progress":1}
    [20:55:33.679] - Load 10240/422652 {"progress":2}
    [20:55:33.695] - Load 12288/422652 {"progress":2}
    [20:55:33.712] - Load 14336/422652 {"progress":3}
    [20:55:33.728] - Load 16384/422652 {"progress":3}
    [20:55:33.745] - Load 18432/422652 {"progress":4}
    [20:55:33.761] - Load 20480/422652 {"progress":4}
    [20:55:33.778] - Load 22528/422652 {"progress":5}
    [20:55:33.794] - Load 24576/422652 {"progress":5}
    [20:55:33.810] - Load 26624/422652 {"progress":6}
    [20:55:33.827] - Load 28672/422652 {"progress":6}
    [20:55:33.843] - Load 30720/422652 {"progress":7}
    [20:55:33.859] - Load 32768/422652 {"progress":7}
    [20:55:33.876] - Load 34816/422652 {"progress":8}
    [20:55:33.893] - Load 36864/422652 {"progress":8}
    [20:55:33.909] - Load 38912/422652 {"progress":9}
    [20:55:33.933] - Load 40960/422652 {"progress":9}
    [20:55:33.950] - Load 43008/422652 {"progress":10}
    [20:55:33.966] - Load 45056/422652 {"progress":10}
    [20:55:33.983] - Load 47104/422652 {"progress":11}
    [20:55:33.999] - Load 49152/422652 {"progress":11}
    [20:55:34.016] - Load 51200/422652 {"progress":12}
    [20:55:34.032] - Load 53248/422652 {"progress":12}
    [20:55:34.049] - Load 55296/422652 {"progress":13}
    [20:55:34.066] - Load 57344/422652 {"progress":13}
    [20:55:34.090] - Load 59392/422652 {"progress":14}
    [20:55:34.107] - Load 61440/422652 {"progress":14}
    [20:55:34.123] - Load 63488/422652 {"progress":15}
    [20:55:34.140] - Load 65536/422652 {"progress":15}
    [20:55:34.156] - Load 67584/422652 {"progress":15}
    [20:55:34.173] - Load 69632/422652 {"progress":16}
    [20:55:34.189] - Load 71680/422652 {"progress":16}
    [20:55:34.206] - Load 73728/422652 {"progress":17}
    [20:55:34.222] - Load 75776/422652 {"progress":17}
    [20:55:34.239] - Load 77824/422652 {"progress":18}
    [20:55:34.255] - Load 79872/422652 {"progress":18}
    [20:55:34.272] - Load 81920/422652 {"progress":19}
    [20:55:34.288] - Load 83968/422652 {"progress":19}
    [20:55:34.305] - Load 86016/422652 {"progress":20}
    [20:55:34.323] - Load 88064/422652 {"progress":20}
    [20:55:34.339] - Load 90112/422652 {"progress":21}
    [20:55:34.356] - Load 92160/422652 {"progress":21}
    [20:55:34.373] - Load 94208/422652 {"progress":22}
    [20:55:34.390] - Load 96256/422652 {"progress":22}
    [20:55:34.406] - Load 98304/422652 {"progress":23}
    [20:55:34.423] - Load 100352/422652 {"progress":23}
    [20:55:34.440] - Load 102400/422652 {"progress":24}
    [20:55:34.456] - Load 104448/422652 {"progress":24}
    [20:55:34.473] - Load 106496/422652 {"progress":25}
    [20:55:34.489] - Load 108544/422652 {"progress":25}
    [20:55:34.506] - Load 110592/422652 {"progress":26}
    [20:55:34.522] - Load 112640/422652 {"progress":26}
    [20:55:34.539] - Load 114688/422652 {"progress":27}
    [20:55:34.555] - Load 116736/422652 {"progress":27}
    [20:55:34.572] - Load 118784/422652 {"progress":28}
    [20:55:34.589] - Load 120832/422652 {"progress":28}
    [20:55:34.606] - Load 122880/422652 {"progress":29}
    [20:55:34.623] - Load 124928/422652 {"progress":29}
    [20:55:34.639] - Load 126976/422652 {"progress":30}
    [20:55:34.656] - Load 129024/422652 {"progress":30}
    [20:55:34.672] - Load 131072/422652 {"progress":31}
    [20:55:34.689] - Load 133120/422652 {"progress":31}
    [20:55:34.706] - Load 135168/422652 {"progress":31}
    [20:55:34.722] - Load 137216/422652 {"progress":32}
    [20:55:34.739] - Load 139264/422652 {"progress":32}
    [20:55:34.756] - Load 141312/422652 {"progress":33}
    [20:55:34.773] - Load 143360/422652 {"progress":33}
    [20:55:34.790] - Load 145408/422652 {"progress":34}
    [20:55:34.807] - Load 147456/422652 {"progress":34}
    [20:55:34.830] - Load 149504/422652 {"progress":35}
    [20:55:34.846] - Load 151552/422652 {"progress":35}
    [20:55:34.863] - Load 153600/422652 {"progress":36}
    [20:55:34.879] - Load 155648/422652 {"progress":36}
    [20:55:34.896] - Load 157696/422652 {"progress":37}
    [20:55:34.913] - Load 159744/422652 {"progress":37}
    [20:55:34.929] - Load 161792/422652 {"progress":38}
    [20:55:34.946] - Load 163840/422652 {"progress":38}
    [20:55:34.962] - Load 165888/422652 {"progress":39}
    [20:55:34.984] - Load 167936/422652 {"progress":39}
    [20:55:35.000] - Load 169984/422652 {"progress":40}
    [20:55:35.017] - Load 172032/422652 {"progress":40}
    [20:55:35.033] - Load 174080/422652 {"progress":41}
    [20:55:35.049] - Load 176128/422652 {"progress":41}
    [20:55:35.066] - Load 178176/422652 {"progress":42}
    [20:55:35.083] - Load 180224/422652 {"progress":42}
    [20:55:35.099] - Load 182272/422652 {"progress":43}
    [20:55:35.116] - Load 184320/422652 {"progress":43}
    [20:55:35.132] - Load 186368/422652 {"progress":44}
    [20:55:35.149] - Load 188416/422652 {"progress":44}
    [20:55:35.165] - Load 190464/422652 {"progress":45}
    [20:55:35.181] - Load 192512/422652 {"progress":45}
    [20:55:35.203] - Load 194560/422652 {"progress":46}
    [20:55:35.220] - Load 196608/422652 {"progress":46}
    [20:55:35.237] - Load 198656/422652 {"progress":47}
    [20:55:35.253] - Load 200704/422652 {"progress":47}
    [20:55:35.271] - Load 202752/422652 {"progress":47}
    [20:55:35.287] - Load 204800/422652 {"progress":48}
    [20:55:35.305] - Load 206848/422652 {"progress":48}
    [20:55:35.322] - Load 208896/422652 {"progress":49}
    [20:55:35.339] - Load 210944/422652 {"progress":49}
    [20:55:35.355] - Load 212992/422652 {"progress":50}
    [20:55:35.372] - Load 215040/422652 {"progress":50}
    [20:55:35.389] - Load 217088/422652 {"progress":51}
    [20:55:35.406] - Load 219136/422652 {"progress":51}
    [20:55:35.422] - Load 221184/422652 {"progress":52}
    [20:55:35.438] - Load 223232/422652 {"progress":52}
    [20:55:35.455] - Load 225280/422652 {"progress":53}
    [20:55:35.471] - Load 227328/422652 {"progress":53}
    [20:55:35.488] - Load 229376/422652 {"progress":54}
    [20:55:35.506] - Load 231424/422652 {"progress":54}
    [20:55:35.522] - Load 233472/422652 {"progress":55}
    [20:55:35.539] - Load 235520/422652 {"progress":55}
    [20:55:35.556] - Load 237568/422652 {"progress":56}
    [20:55:35.573] - Load 239616/422652 {"progress":56}
    [20:55:35.590] - Load 241664/422652 {"progress":57}
    [20:55:35.607] - Load 243712/422652 {"progress":57}
    [20:55:35.623] - Load 245760/422652 {"progress":58}
    [20:55:35.639] - Load 247808/422652 {"progress":58}
    [20:55:35.656] - Load 249856/422652 {"progress":59}
    [20:55:35.673] - Load 251904/422652 {"progress":59}
    [20:55:35.689] - Load 253952/422652 {"progress":60}
    [20:55:35.706] - Load 256000/422652 {"progress":60}
    [20:55:35.722] - Load 258048/422652 {"progress":61}
    [20:55:35.739] - Load 260096/422652 {"progress":61}
    [20:55:35.756] - Load 262144/422652 {"progress":62}
    [20:55:35.773] - Load 264192/422652 {"progress":62}
    [20:55:35.789] - Load 266240/422652 {"progress":62}
    [20:55:35.806] - Load 268288/422652 {"progress":63}
    [20:55:35.823] - Load 270336/422652 {"progress":63}
    [20:55:35.839] - Load 272384/422652 {"progress":64}
    [20:55:35.855] - Load 274432/422652 {"progress":64}
    [20:55:35.873] - Load 276480/422652 {"progress":65}
    [20:55:35.890] - Load 278528/422652 {"progress":65}
    [20:55:35.906] - Load 280576/422652 {"progress":66}
    [20:55:35.923] - Load 282624/422652 {"progress":66}
    [20:55:35.939] - Load 284672/422652 {"progress":67}
    [20:55:35.956] - Load 286720/422652 {"progress":67}
    [20:55:35.979] - Load 288768/422652 {"progress":68}
    [20:55:35.995] - Load 290816/422652 {"progress":68}
    [20:55:36.011] - Load 292864/422652 {"progress":69}
    [20:55:36.035] - Load 294912/422652 {"progress":69}
    [20:55:36.061] - Load 296960/422652 {"progress":70}
    [20:55:36.078] - Load 299008/422652 {"progress":70}
    [20:55:36.094] - Load 301056/422652 {"progress":71}
    [20:55:36.125] - Load 303104/422652 {"progress":71}
    [20:55:36.141] - Load 305152/422652 {"progress":72}
    [20:55:36.165] - Load 307200/422652 {"progress":72}
    [20:55:36.181] - Load 309248/422652 {"progress":73}
    [20:55:36.206] - Load 311296/422652 {"progress":73}
    [20:55:36.223] - Load 313344/422652 {"progress":74}
    [20:55:36.245] - Load 315392/422652 {"progress":74}
    [20:55:36.261] - Load 317440/422652 {"progress":75}
    [20:55:36.278] - Load 319488/422652 {"progress":75}
    [20:55:36.302] - Load 321536/422652 {"progress":76}
    [20:55:36.318] - Load 323584/422652 {"progress":76}
    [20:55:36.340] - Load 325632/422652 {"progress":77}
    [20:55:36.356] - Load 327680/422652 {"progress":77}
    [20:55:36.376] - Load 329728/422652 {"progress":78}
    [20:55:36.392] - Load 331776/422652 {"progress":78}
    [20:55:36.408] - Load 333824/422652 {"progress":78}
    [20:55:36.425] - Load 335872/422652 {"progress":79}
    [20:55:36.457] - Load 337920/422652 {"progress":79}
    [20:55:36.473] - Load 339968/422652 {"progress":80}
    [20:55:36.489] - Load 342016/422652 {"progress":80}
    [20:55:36.514] - Load 344064/422652 {"progress":81}
    [20:55:36.530] - Load 346112/422652 {"progress":81}
    [20:55:36.546] - Load 348160/422652 {"progress":82}
    [20:55:36.562] - Load 350208/422652 {"progress":82}
    [20:55:36.578] - Load 352256/422652 {"progress":83}
    [20:55:36.595] - Load 354304/422652 {"progress":83}
    [20:55:36.611] - Load 356352/422652 {"progress":84}
    [20:55:36.627] - Load 358400/422652 {"progress":84}
    [20:55:36.649] - Load 360448/422652 {"progress":85}
    [20:55:36.665] - Load 362496/422652 {"progress":85}
    [20:55:36.682] - Load 364544/422652 {"progress":86}
    [20:55:36.698] - Load 366592/422652 {"progress":86}
    [20:55:36.722] - Load 368640/422652 {"progress":87}
    [20:55:36.747] - Load 370688/422652 {"progress":87}
    [20:55:36.764] - Load 372736/422652 {"progress":88}
    [20:55:36.780] - Load 374784/422652 {"progress":88}
    [20:55:36.805] - Load 376832/422652 {"progress":89}
    [20:55:36.828] - Load 378880/422652 {"progress":89}
    [20:55:36.845] - Load 380928/422652 {"progress":90}
    [20:55:36.869] - Load 382976/422652 {"progress":90}
    [20:55:36.886] - Load 385024/422652 {"progress":91}
    [20:55:36.909] - Load 387072/422652 {"progress":91}
    [20:55:36.926] - Load 389120/422652 {"progress":92}
    [20:55:36.949] - Load 391168/422652 {"progress":92}
    [20:55:36.972] - Load 393216/422652 {"progress":93}
    [20:55:36.989] - Load 395264/422652 {"progress":93}
    [20:55:37.013] - Load 397312/422652 {"progress":94}
    [20:55:37.029] - Load 399360/422652 {"progress":94}
    [20:55:37.063] - Load 401408/422652 {"progress":94}
    [20:55:37.079] - Load 403456/422652 {"progress":95}
    [20:55:37.095] - Load 405504/422652 {"progress":95}
    [20:55:37.120] - Load 407552/422652 {"progress":96}
    [20:55:37.136] - Load 409600/422652 {"progress":96}
    [20:55:37.153] - Load 411648/422652 {"progress":97}
    [20:55:37.170] - Load 413696/422652 {"progress":97}
    [20:55:37.186] - Load 415744/422652 {"progress":98}
    [20:55:37.210] - Load 417792/422652 {"progress":98}
    [20:55:37.235] - Load 419840/422652 {"progress":99}
    [20:55:37.251] - Load 421888/422652 {"progress":99}
    [20:55:37.275] - Load 422652/422652 {"progress":100}
    [20:55:37.276] - Load 422652/422652 {"progress":100}
    [20:55:37.276] - Write check
    [20:55:37.287] - Flash load time cost(ms): 3833.3349609375
    [20:55:37.287] - Finished
    [20:55:37.289] - Sha caled by host: 375f0679af26704f9cac7aa98657add955103c6a04d4c601b6df78b414532e1a
    [20:55:37.289] - xip mode Verify
    [20:55:37.508] - Read Sha256/790560
    [20:55:37.509] - Flash xip readsha time cost(ms): 217.718994140625
    [20:55:37.510] - Finished
    [20:55:37.513] - Sha caled by dev: 375f0679af26704f9cac7aa98657add955103c6a04d4c601b6df78b414532e1a
    [20:55:37.514] - Verify success
    [20:55:37.515] - Dealing Index 4
    [20:55:37.515] - ========= programming chips/bl602/device_tree/ro_params.dtb to 0x001F8000
    [20:55:37.522] - ========= flash load =========
    [20:55:37.523] - decompress write rx timeout: 24.576
    [20:55:37.528] - decompress flash load 1584
    [20:55:37.541] - Load 1584/1584 {"progress":100}
    [20:55:37.542] - Load 1584/1584 {"progress":100}
    [20:55:37.542] - Write check
    [20:55:37.560] - Flash load time cost(ms): 37.101318359375
    [20:55:37.560] - Finished
    [20:55:37.560] - Sha caled by host: 2030ce2a98174d1e1bc02905472a5c55ff0df9d7274c49efd787982af2430e58
    [20:55:37.561] - xip mode Verify
    [20:55:37.567] - Read Sha256/5982
    [20:55:37.568] - Flash xip readsha time cost(ms): 5.524658203125
    [20:55:37.568] - Finished
    [20:55:37.571] - Sha caled by dev: 2030ce2a98174d1e1bc02905472a5c55ff0df9d7274c49efd787982af2430e58
    [20:55:37.571] - Verify success
    [20:55:37.571] - Program Finished
    [20:55:37.571] - All time cost(ms): 12754.686767578125
    [20:55:37.672] - close interface
    [20:55:37.673] - [All Success]
    


    First time I flashed I've made a mistake of not including the dts. I got the wrong MAC (C0:50:43:C9:00:01, same as others reported). It worked, but networking was flaky. After flashing with dts, it networking seems to work a lot better.

    I flashed OpenBL602_1.18.42.bin, but never got it to connect to my network.

    With this pull request https://github.com/openshwprojects/OpenBK7231...ions/runs/12794858548/job/35670919788?pr=1487, which I flashed with OTA, it connected to my network.
  • #11 21537705
    simonedlf1979
    Level 2  
    >>20980720Hi, I tried to connect an external switch to S1/S2 but it doesn't work. How can I solve it?
  • #14 21540501
    p.kaczmarek2
    Moderator Smart Home
    Did you configure your GPIO? Have you extracted Tuya config? Which role is set for your S1/S2 inputs?

    Tuya config extraction: https://www.youtube.com/watch?v=WunlqIMAdgw
    Helpful post? Buy me a coffee.
  • #15 21560709
    AlexzeyK
    Level 9  
    Hello!
    I have such a mini smart relay #21045630
    I successfully flashed it with OB. In "clean" (unconfigured) form I can connect to its access point, configure from the main web menu, reboot and it works.


    OpenBL602 control panel with configuration and restart buttons.
    I'm facing a problem using app-import...
    Here I am pasting a template from the devices page.

    (Ewelink) DIY smart switch in a white box on a wooden surface.

    Screenshot showing a configuration interface for generating and uploading scripts to DIY smart switch devices.

    I immediately see the changes on the homepage.

    Web interface of an OpenBL602 device with power off and technical information displayed.

    The device works until reboot (cold or hot).
    After rebooting I see the same access point, but I can't connect to it. From the WiFi monitor I can see that the access point is there. It works for some time 3-5 minutes and reboots. It is not possible to connect to it.
    Is there any advice for me? What am I doing wrong?
    Immediately after applying the template (without rebooting the device), I made a flash dump from the app flash menu.
    app_flash_...A524A5.bin Download (2 MB)Points: 1 for user
    then I rebooted the device. I couldn't connect to the access point (it's impossible to connect to this network). I did a flash dump in the BuffaloDevCube program.
    bad_flash..dc.bin Download (2 MB)Points: 2 for user
    It is possible to exit this mode only by reflashing the flash file (or a backup of the "clean" firmware, without settings).
    If you flash this backup to "clean firmware" - it is not possible to connect to the access point. The problem is probably somewhere here...
    Any ideas what the problem is?
  • Helpful post
    #16 21560785
    divadiow
    Level 34  
    Powersave should be fixed, but to rule that out, remove powersave 1 - does it work after that?
  • #17 21561399
    AlexzeyK
    Level 9  
    @divadiow Thank you very much, my friend!
    Your advice worked. Now the relay works as it should.
  • #18 21561424
    divadiow
    Level 34  
    interesting. I notice earlier you said you rebooted and it was still broadcasting an AP, have you at any point had powersave 1 enabled and the device in STA mode connected to an AP itself?

    I have just flashed 1.18.106 to a dev board and imported the template in the first post. My device is in STA mode and it is happy with powersave 1 in startup command.
  • #19 21561488
    AlexzeyK
    Level 9  
    >>21561424 yes. I agree with you. The problem is in powersave 1.
    I just flashed 105 firmware and removed the powersave command from the generated script.
    Screenshot showing a configuration panel with three steps: pasting a template, generating a script, and applying the script for a DIY smart switch device.
    Rebooted the device. The device created an access point and I was able to connect to it. Previously (with powersave1) the device created an access point. But it was not possible to connect to it.
    Now I erased the chip. Flashed 106 firmware and did not remove the powersave1 command from the script (ashere ). That is, I repeated everything from my post >>21560709 , but with 106 firmware. The result is the same: the device creates an access point, but it is not possible to connect to it.
  • #20 21561491
    divadiow
    Level 34  
    OK, but what if you join the device to your wifi/router? does powersave 1 work with device in STA mode?
  • #21 21561501
    AlexzeyK
    Level 9  
    >>21561491 Not working)
    I used the script without the powersave1 command. I did all the settings (MQTT, etc.), connected to the wifi router, rebooted. Everything works fine. The device received an IP, connected to the MQTT. Now I entered the powersave1 command, rebooted, and the device no longer appeared on the wifi network. Rebooting several times did not change the situation.

Topic summary

The discussion revolves around flashing the BL602 chip on the Ewelink SM-028_V1.3 smart switch purchased from Aliexpress. Users share their experiences and configurations, emphasizing the importance of specifying the device tree source (dts) file during the flashing process to avoid MAC address conflicts. One user successfully rewired and reflashed their device, correcting the MAC address issue by enabling "Chip Erase." The conversation highlights various configurations, wiring setups, and the necessity of using the correct tools and settings for successful flashing.
Summary generated by the language model.
ADVERTISEMENT