logo elektroda
logo elektroda
X
logo elektroda

Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

patentjyp 11244 61
ADVERTISEMENT
  • #1 20531652
    patentjyp
    Level 5  
    I bought a 3-gang switch from Aliexpress.

    https://www.aliexpress.com/item/1005005118608300.html

    The switch contains a module with BL602 chip.

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    As shown in the first photo, the module is SDV-002_V1.2.

    I could not find any information on this module. The closest one I found was BL-62B module with the same number of pins and partially pin compatible with ESP-07.

    In the second photo, three transistors in the upper right corner are connected to the pin header, and I am guessing that they drive the relays, hence connected to GPIOs on the left side of the module.

    I am also guessing that GPIOs on the right side of the module are connected to a 10-pin touch chip at the upper center of the board for driving the three touch switches.

    The via at the bottom (right under the marking "20221122") is connected to the WIFI LED on the other side of the board.

    However, there are my guesses. I could not find any info on this module...

    Any help on the pinouts of this module would be appreciated.
  • ADVERTISEMENT
  • #2 20531756
    p.kaczmarek2
    Moderator Smart Home
    I don't know this particular module but we know BL602 pinout:
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    You can easily map the pins that way, especially if you have physical access to the board and the multimeter with a continuity test mode.

    I've started the job for you, can you finish the mapping? You need to probe remaining pins with multimeter to check where they are going;
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    Added after 3 [minutes]:

    Btw I noticed one more thing.
    it looks like TYWE3S form.
    The VDD/GND locations are matching, and it seems CEN/RST are connected.
    Maybe TXD0 and RXD0 are in the same place as well?
    See:
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    Helpful post? Buy me a coffee.
  • #3 20531763
    patentjyp
    Level 5  
    I will remove the module and take a photo of the bottom surface of the module.

    Added after 19 [minutes]:

    Here are the photos of the module and the PCB without the module.

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    There are some pins that I am not familiar with: B, G, W pins and C, R pins...

    These pins are used to drive relays and touch switches..

    BTW, the pads on the PCB for TX, RX and EN pins are not connected to anything (No PCB traces on the back side).
  • #4 20531840
    p.kaczmarek2
    Moderator Smart Home
    Why do you think that RX is not connected? It looks like connected:
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    Helpful post? Buy me a coffee.
  • #5 20531946
    patentjyp
    Level 5  
    In the module, RX is connected, but if you look at the PCB, it's just a pad without any connection.
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
  • ADVERTISEMENT
  • #6 20531955
    p.kaczmarek2
    Moderator Smart Home
    It doesn't matter much. For BL602, for flashing, you need RX, TX and boot, please see:
    https://www.youtube.com/watch?v=bs0ylC6xRs0
    https://www.youtube.com/watch?v=L6d42IMGhHw
    Btw, where are those pads connected?
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    Helpful post? Buy me a coffee.
  • #7 20532117
    patentjyp
    Level 5  
    They are connected to GPIOs which are connected to the touch chip.

    See the photo below.

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
  • #8 20532121
    p.kaczmarek2
    Moderator Smart Home
    It's strange, I'd rather expect that this pin header slot is for programming.

    So, do you know where boot signal is?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 20532137
    gyenchev
    Level 5  
    I have the same modules(1 Gang) and just today I thought to find a custom firmware for them, so I stumbled upon this forum.

    I believe that following your discussion we already know where TX, RX, VCC and GND are located. I see that on one of the pictures patentjyp provided of the desoldered module there is a BT pad which I believe is the BOOT signal. It would be great if patentjyp can check with a multimeter if this BT pad is also connected somewhere on the other side of the board(or if you can point me to which is the BOOT signal from the datasheet you have provided above), that way we will not need to desolder the whole module in order to be able to flash OpenBK7231T.

    Looking forward to more information on the topic. If I can be of any help please let me know.

    EDIT to add: So if I found correctly in https://www.elektroda.com/rtvforum/topic3927070.html the signal for BOOT is called PAD_GPIO_8 and if I follow correctly it is pulled down to ground by R2. So it might be possible to solder a wire to R2 and apply 3.3V to start the boot process. Am I following correctly ?
  • #10 20532739
    patentjyp
    Level 5  
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    BT_EN pad is not connected to anything. There are no copper traces on neither side of the PCB.

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    Here, BT_EN is connected to pin 14 (CHIP_EN) of BL602 (tested with multimeter). Therefore, this BT_EN pin is indeed BOOT.

    I will try flashing later today.

    Added after 2 [hours] 4 [minutes]:

    Can anyone point me to a link where I can download BL602 flashing tools for Windows?
  • #11 20532765
    p.kaczmarek2
    Moderator Smart Home
    patentjyp wrote:

    Here, BT_EN is connected to pin 14 (CHIP_EN) of BL602 (tested with multimeter). Therefore, this BT_EN pin is indeed BOOT.


    But I can see two pads here: one EN, second BT. Are you saying they are connected together?
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    I also think that correct BT pin is GPIO8. EN is something else.

    Here is SDK with BlDevCube.exe (older version):
    https://github.com/openshwprojects/OpenBL602
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    Helpful post? Buy me a coffee.
  • Helpful post
    #12 20533595
    gyenchev
    Level 5  
    So I can confirm that soldering a wire to R2 and connecting it to VCC during power on is enough to put the module in BOOT mode. TX and RX pins are as described. I put VCC and GND on the pads that are on the main board. Now I have to figure out how to configure the module so that it works as it should.

    Here is a pic of the setup I made. Don’t judge the bad soldering as I do not have the necessary equipment :|

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
  • #13 20533601
    p.kaczmarek2
    Moderator Smart Home
    That's the great progress, so most important part is done.

    But I think we still need to check the meaning of the following pins:
    patentjyp wrote:

    There are some pins that I am not familiar with: B, G, W pins and C, R pins...

    I started doing sketch in paint few posts above but we need complete pin mapping for this module.
    Helpful post? Buy me a coffee.
  • #14 20533692
    gyenchev
    Level 5  
    This is what I traced so far (I don't have my multimeter with me):
    EN, BC and EN1 seem to not be connected to anything.
    IO1 is connected to the WIFI LED on the other side of the board.
    B, G, W are connected to PA6, PA5, PA3 respectively, which in turn are connected to the HELIOS IC( Not sure what it does) which in turn is connected to the buttons on the other side of the board through R23, R22, R17 so I believe that B,G,W are either input from the buttons, or output to the button LEDs.

    On the right side of the module(as shown in picture) TX and RX are just pads and not connected to anything (Soldering a wire is possible)
    C, R and IO1, are pulled to ground, but control Q5, Q4, Q3 which in turn control the relays.

    IO2 and IO3 seem to not be connected anywhere.

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    If I followed the traces correctly the pins should map as follows:

    EN --> ??
    BC --> ??
    EN1 --> ??
    IO0 --> GPIO_12(WIFI LED)
    B --> GPIO_20(Button not sure if left or right)
    G --> GPIO_14(Middle button) Found by trial and error
    W --> GPIO_2(Button not sure if left or right)
    C --> GPIO_21(Relay)
    R --> GPIO_3 (Relay for 1 gang)
    IO1 --> GPIO_1(Relay)
    IO2 --> GPIO_0
    IO3 --> GPIO_22

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs


    It's getting late so I am not sure what else we need to figure out. Some of the pins we might need to find by trial and error, because I do not have the module desoldered and I am looking through the pictures uploaded in this thread.

    Someone with 3 gang switch should flash and test which GPIO is for left/right button and which GPIO is for which relay.

    P.S.: I have one 2-gang switch the same model. I think it uses the other two buttons and leaves the middle empty. I will see if I have time these days to flash it also and then I will be able to
    map all of the signals. Maybe even write a post on flashing/etc.
  • ADVERTISEMENT
  • #15 20535155
    gyenchev
    Level 5  
    Ok... So I managed to flash my 2 gang wall switch and here are the pin configurations I came up with:

    1-Gang:
    PIN_3 -> Rel
    PIN_12 -> WifiLED
    PIN_14 -> Btn
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    2-Gang
    PIN_1 -> Rel (CH1)
    PIN_2 -> Btn (CH1)
    PIN_12 -> WifiLED
    PIN_20 -> Btn(CH0)
    PIN_21 -> Rel(CH0)

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    3-Gang
    PIN_1 -> Rel (CH2)
    PIN_2 -> Btn (CH2)
    PIN_3 -> Rel (CH1)
    PIN_12 -> WifiLED
    PIN_14 -> Btn (CH1)
    PIN_20 -> Btn(CH0)
    PIN_21 -> Rel(CH0)

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    If you mess up the channels different buttons control different relays e.g. you press the left button but the relay for the right clicks and the right LED changes state.

    Currently I want to find a way to invert the button LED so that the buttons are illuminated blue when the relay is on and red when the relay is off, but I believe that the schematic is designed that way and there is nothing that we can do using software. I found that if I set Wifi_LED_n to PIN_12 it inverts the LED state, but doing so for the relays just inverts their initial state.

    P.S: p.kaczmarek2 is there anything else that we need to reverse engineer for these wall switches?
  • #16 20535243
    p.kaczmarek2
    Moderator Smart Home
    Well done! One could also try doing a binary backup with BLDevCube.exe. It is possible when you enter advanced mode of the flasher.
    Helpful post? Buy me a coffee.
  • #17 20535290
    gyenchev
    Level 5  
    I do not have a Windows machine at the moment. I used https://github.com/spacemeowx2/blflash on MacOS to write the firmware to the devices. Also, I have overwritten all of the devices that I have with OpenBK, so no original dump can be made. I believe these are Sonoff knockoffs that have some kind of modified software written to them, as if you hold the button for 5 seconds on the original firmware while in pairing mode it goes into DIY mode and creates an AP with the name ITEAD_......

    ETA: I managed to find some leftover info in the eWeLink app from when I paired the 1-Gang switch to the app.

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs

    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs


    It seems that it is using the firmware of some kind of relay found on Amazon… https://www.amazon.com/QIACHIP-Ewelink-Wireless-Self-Locking-Latching/dp/B0BCVDS3VM?th=1
  • #18 20535790
    p.kaczmarek2
    Moderator Smart Home
    @gyenchev , can you provide those configs by copying JSON template from "Launch Web Application"?
    It takes some time to type them manually from screenshots.


    So the device was bought here (link in the first post)? Price is very low.
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs
    Helpful post? Buy me a coffee.
  • #19 20535955
    gyenchev
    Level 5  
    p.kaczmarek2 wrote:
    @gyenchev , can you provide those configs by copying JSON template from "Launch Web Application"?
    It takes some time to type them manually from screenshots.


    So the device was bought here (link in the first post)? Price is very low.
    Info on BL602 Module SDV-002_V1.2 from Aliexpress 3-Gang Switch, Pin Compatibility & GPIOs


    Mine were bougth from different seller under a different brand name, but are virtually the same.

    BGN 14.15 62% Off | EWelink Smart Life Light Switch WiFi Bluetooth RF433 Touch Light Switch Alexa Alice Google Voice Control Neutral Wire Install
    https://a.aliexpress.com/_mMd943w

    Added after 8 [hours] 52 [minutes]:

    1-Gang
    
    {
      "vendor": "Axus",
      "bDetailed": "0",
      "name": "Axus EWelink Smart Life Light Switch WiFi Bluetooth RF433",
      "model": "1-Gang",
      "chip": "BL602",
      "board": "SDV-002_V1.2",
      "flags": "536871936",
      "keywords": [
        "Axus",
        "1-Gang"
      ],
        "pins": {
        "3": "Rel;1",
        "12": "WifiLED;0",
        "14": "Btn;1"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/3576912100_1681149522.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic3970659.html"
    }
    


    2-Gang
    
    {
      "vendor": "Axus",
      "bDetailed": "0",
      "name": "Axus EWelink Smart Life Light Switch WiFi Bluetooth RF433",
      "model": "2-Gang",
      "chip": "BL602",
      "board": "SDV-002_V1.2",
      "flags": "536871936",
      "keywords": [
        "Axus",
        "2-Gang"
      ],
      "pins": {
        "1": "Rel;1",
        "2": "Btn;1",
        "12": "WifiLED;0",
        "20": "Btn;0",
        "21": "Rel;0"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/3576912100_1681149522.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic3970659.html"
    }
    


    3-Gang
    
    {
      "vendor": "Axus",
      "bDetailed": "0",
      "name": "Axus EWelink Smart Life Light Switch WiFi Bluetooth RF433",
      "model": "3-Gang",
      "chip": "BL602",
      "board": "SDV-002_V1.2",
      "flags": "536871936",
      "keywords": [
        "Axus",
        "3-Gang"
      ],
        "pins": {
        "1": "Rel;2",
        "2": "Btn;2",
        "3": "Rel;1",
        "12": "WifiLED;0",
        "14": "Btn;1",
        "20": "Btn;0",
        "21": "Rel;0"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/3576912100_1681149522.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic3970659.html"
    }
    


    NOTE: The configuration for 3-Gang is not tested on a real device as I do not have one at my disposal. @patentjyp have you managed to flash your devices and can you test?

    Added after 24 [minutes]:

    Still looking for a way to dim the brightness of the button LEDs, but I believe that they are hardwired. Any ideas are appreciated.

    What I found so far is that if the relay pin is set to PWM and I change the PWM value the color of the button switches between blue through purple up until the relay clicks and the button becomes red.
    Strange thing is that if I set the pin for the relay as a button the button becomes dim to my liking.
  • #20 20677137
    andreaszwander
    Level 1  

    >>20531763
    I would suggest it could be

    R.. Red
    G.. Green
    B.. Blue
    W.. White
    C.. Common
  • #21 20679515
    p.kaczmarek2
    Moderator Smart Home
    Isn't C a "cool white" and W "warm white" in case of RGBCW lamps?

    Still, this device is not a LED lamp.
    Helpful post? Buy me a coffee.
  • #22 20814462
    chlebok
    Level 10  
    Hello, I have same module, but have problem. I wrote binary succesfuly, but after reset can't connect. The module isn't visible in wifi. I tried first with 2M partition. I tried with 2,000,000 baud rate option aswell. Boot pin pull-up is removed avfer flash.
    Can't find what is wrong. @p.kaczmarek2 help me :)

    The interface of the Bouffalo Lab Dev Cube application with flash settings loaded for BL602.

    Logs
    [21:55:06.102] - ========= Interface is Uart =========
    [21:55:06.107] - eflash loader bin is eflash_loader_40m.bin
    [21:55:06.109] - ========= chip flash id: ef4015 =========
    [21:55:06.114] - create partition.bin, pt_new is True
    [21:55:06.126] - fw_boot_head_gen xtal: 40M
    [21:55:06.129] - Create bootheader using chips\bl602\img_create_iot\efuse_bootheader_cfg.ini
    [21:55:06.130] - Updating data according to 
    [21:55:06.131] - Created file len:176
    [21:55:06.134] - Create efuse using chips\bl602\img_create_iot\efuse_bootheader_cfg.ini
    [21:55:06.135] - Updating data according to 
    [21:55:06.137] - Created file len:128
    [21:55:06.143] - ========= sp image create =========
    [21:55:06.144] - Image hash is b'c5e2ce515a5783ac80efdd4910238a466572f882b53b3284e63c763e1da9847f'
    [21:55:06.144] - Hash ignored
    [21:55:06.145] - Header crc ignored
    [21:55:06.145] - Write flash img
    [21:55:06.147] - Encrypt efuse data
    [21:55:06.155] - fw_boot_head_gen xtal: 40M
    [21:55:06.160] - Create bootheader using chips\bl602\img_create_iot\efuse_bootheader_cfg.ini
    [21:55:06.161] - Updating data according to 
    [21:55:06.163] - Created file len:176
    [21:55:06.165] - Create efuse using chips\bl602\img_create_iot\efuse_bootheader_cfg.ini
    [21:55:06.167] - Updating data according to 
    [21:55:06.169] - Created file len:128
    [21:55:06.175] - ========= sp image create =========
    [21:55:06.183] - Image hash is b'cc5359a93ec6856a986e7f8ab5d32227da205ddbc502198c3d4511ba31a321d8'
    [21:55:06.183] - Header crc: b'82f202ab'
    [21:55:06.184] - Write flash img
    [21:55:06.189] - Encrypt efuse data
    [21:55:06.191] - FW Header is 176, 3920 still needed
    [21:55:06.193] - FW OTA bin header is Done. Len is 4096
    [21:55:06.265] - BL60X_OTA_Ver1.0
    [21:55:06.348] - FW OTA bin is Done. Len is 759904
    [21:55:06.778] - OTA XZ file len = 404528
    [21:55:06.779] - Partiton len = 557056
    [21:55:06.780] - BL60X_OTA_Ver1.0
    [21:55:06.828] - FW OTA xz is Done
    [21:55:06.829] - ========= eflash loader config =========
    [21:55:06.831] - Image offset = 8192
    [21:55:06.878] - =========C:/Users/PCchleb/Downloads/BouffaloLabDevCube-v1.8.6(1)/chips/bl602/device_tree/bl_factory_params_IoTKitA_40M.dts ——> C:\Users\PCchleb\Downloads\BouffaloLabDevCube-v1.8.6(1)\chips\bl602/device_tree/ro_params.dtb=========
    [21:55:07.035] - Version: eflash_loader_v2.4.7
    [21:55:07.035] - Program Start
    [21:55:07.035] - ========= eflash loader cmd arguments =========
    [21:55:07.036] - Config file: C:\Users\PCchleb\Downloads\BouffaloLabDevCube-v1.8.6(1)\chips\bl602\eflash_loader/eflash_loader_cfg.ini
    [21:55:07.038] - serial port is COM3
    [21:55:07.039] - cpu_reset=False
    [21:55:07.039] - chiptype: bl602
    [21:55:07.039] - ========= Interface is uart =========
    [21:55:07.039] - com speed: 500000
    [21:55:07.041] - Eflash load helper file: C:\Users\PCchleb\Downloads\BouffaloLabDevCube-v1.8.6(1)\chips\bl602\eflash_loader/eflash_loader_40m.bin
    [21:55:07.041] - ========= load eflash_loader.bin =========
    [21:55:07.042] - Load eflash_loader.bin via uart
    [21:55:07.042] - ========= image load =========
    [21:55:07.345] - FLc0c0 unknown
    [21:55:07.346] - Not ack OK
    [21:55:07.346] - FLc0c0 unknown
    [21:55:07.346] - result: FLc0c0 unknown
    [21:55:07.683] - tx rx and power off, press the machine!
    [21:55:07.684] - cutoff time is 0.1
    [21:55:07.791] - power on tx and rx
    [21:55:08.603] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [21:55:08.604] - clean buf
    [21:55:08.726] - send sync
    [21:55:08.941] - ack is c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c04f4b
    [21:55:09.048] - shake hand success
    [21:55:09.063] - get_boot_info
    [21:55:09.065] - data read is b'01000000000000000300000075cb9a4cb97c1500'
    [21:55:09.065] - ========= chipid: 7cb94c9acb75 =========
    [21:55:09.065] - last boot info: None
    [21:55:09.065] - sign is 0 encrypt is 0
    [21:55:09.065] - segcnt is 1
    [21:55:09.071] - segdata_len is 38464
    [21:55:09.164] - 4080/38464
    [21:55:09.256] - 8160/38464
    [21:55:09.348] - 12240/38464
    [21:55:09.441] - 16320/38464
    [21:55:09.533] - 20400/38464
    [21:55:09.625] - 24480/38464
    [21:55:09.718] - 28560/38464
    [21:55:09.810] - 32640/38464
    [21:55:09.902] - 36720/38464
    [21:55:09.942] - 38464/38464
    [21:55:09.943] - Run img
    [21:55:10.047] - Load helper bin time cost(ms): 3005.0126953125
    [21:55:10.154] - Flash load shake hand
    [21:55:10.282] - default set DTR high
    [21:55:10.385] - clean buf
    [21:55:10.508] - send sync
    [21:55:10.723] - ack is 4f4b
    [21:55:10.814] - Read mac addr
    [21:55:10.815] - macaddr: 75cb9a4cb97c
    [21:55:10.815] - flash set para
    [21:55:10.816] - ========= flash read jedec ID =========
    [21:55:10.817] - Read flash jedec ID
    [21:55:10.817] - flash jedec id: ef401580
    [21:55:10.817] - Finished
    [21:55:10.821] - get flash size: 0x00200000
    [21:55:10.821] - Program operation
    [21:55:10.822] - Dealing Index 0
    [21:55:10.822] - ========= programming chips\bl602\img_create_iot\whole_img_boot2.bin to 0x00000000
    [21:55:10.826] - ========= flash load =========
    [21:55:10.827] - ========= flash erase =========
    [21:55:10.827] - Erase flash from 0x0 to 0xb98f
    [21:55:10.896] - erase pending
    [21:55:11.046] - erase pending
    [21:55:11.079] - erase pending
    [21:55:11.111] - erase pending
    [21:55:11.142] - erase pending
    [21:55:11.259] - Erase time cost(ms): 432.0087890625
    [21:55:11.320] - decompress write rx timeout: 24.576
    [21:55:11.396] - decompress flash load 22128
    [21:55:11.444] - Load 2048/22128 {"progress":9}
    [21:55:11.492] - Load 4096/22128 {"progress":18}
    [21:55:11.540] - Load 6144/22128 {"progress":27}
    [21:55:11.587] - Load 8192/22128 {"progress":37}
    [21:55:11.635] - Load 10240/22128 {"progress":46}
    [21:55:11.682] - Load 12288/22128 {"progress":55}
    [21:55:11.729] - Load 14336/22128 {"progress":64}
    [21:55:11.777] - Load 16384/22128 {"progress":74}
    [21:55:11.824] - Load 18432/22128 {"progress":83}
    [21:55:11.871] - Load 20480/22128 {"progress":92}
    [21:55:11.909] - Load 22128/22128 {"progress":100}
    [21:55:11.910] - Load 22128/22128 {"progress":100}
    [21:55:11.911] - Write check
    [21:55:11.995] - Flash load time cost(ms): 674.236572265625
    [21:55:11.995] - Finished
    [21:55:11.997] - Sha caled by host: cf7321b7a337021dd92984959adb2b62dacb95ed7d9c991de87365af835249d0
    [21:55:11.997] - xip mode Verify
    [21:55:12.011] - Read Sha256/47504
    [21:55:12.012] - Flash xip readsha time cost(ms): 14.829345703125
    [21:55:12.012] - Finished
    [21:55:12.013] - Sha caled by dev: cf7321b7a337021dd92984959adb2b62dacb95ed7d9c991de87365af835249d0
    [21:55:12.013] - Verify success
    [21:55:12.072] - Dealing Index 1
    [21:55:12.072] - ========= programming chips\bl602\partition\partition.bin to 0x0000E000
    [21:55:12.076] - ========= flash load =========
    [21:55:12.077] - ========= flash erase =========
    [21:55:12.077] - Erase flash from 0xe000 to 0xe10f
    [21:55:12.133] - erase pending
    [21:55:12.254] - Erase time cost(ms): 177.3583984375
    [21:55:12.323] - Load 272/272 {"progress":100}
    [21:55:12.323] - Load 272/272 {"progress":100}
    [21:55:12.323] - Write check
    [21:55:12.377] - Flash load time cost(ms): 61.345703125
    [21:55:12.378] - Finished
    [21:55:12.379] - Sha caled by host: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [21:55:12.379] - xip mode Verify
    [21:55:12.383] - Read Sha256/272
    [21:55:12.383] - Flash xip readsha time cost(ms): 2.97509765625
    [21:55:12.383] - Finished
    [21:55:12.384] - Sha caled by dev: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [21:55:12.384] - Verify success
    [21:55:12.439] - Dealing Index 2
    [21:55:12.439] - ========= programming chips\bl602\partition\partition.bin to 0x0000F000
    [21:55:12.443] - ========= flash load =========
    [21:55:12.443] - ========= flash erase =========
    [21:55:12.443] - Erase flash from 0xf000 to 0xf10f
    [21:55:12.501] - erase pending
    [21:55:12.623] - Erase time cost(ms): 179.181640625
    [21:55:12.691] - Load 272/272 {"progress":100}
    [21:55:12.692] - Load 272/272 {"progress":100}
    [21:55:12.692] - Write check
    [21:55:12.745] - Flash load time cost(ms): 61.34765625
    [21:55:12.746] - Finished
    [21:55:12.746] - Sha caled by host: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [21:55:12.747] - xip mode Verify
    [21:55:12.749] - Read Sha256/272
    [21:55:12.749] - Flash xip readsha time cost(ms): 1.98583984375
    [21:55:12.749] - Finished
    [21:55:12.750] - Sha caled by dev: fd6af18fc4aaf2807277cac767ca19d12af7b55f5ecbb8902ef28bc2430524aa
    [21:55:12.750] - Verify success
    [21:55:12.807] - Dealing Index 3
    [21:55:12.808] - ========= programming chips\bl602\img_create_iot\whole_img.bin to 0x00010000
    [21:55:12.812] - ========= flash load =========
    [21:55:12.814] - ========= flash erase =========
    [21:55:12.814] - Erase flash from 0x10000 to 0xc985f
    [21:55:12.873] - erase pending
    [21:55:13.104] - erase pending
    [21:55:13.309] - erase pending
    [21:55:13.530] - erase pending
    [21:55:13.742] - erase pending
    [21:55:13.946] - erase pending
    [21:55:14.176] - erase pending
    [21:55:14.400] - erase pending
    [21:55:14.620] - erase pending
    [21:55:14.839] - erase pending
    [21:55:15.061] - erase pending
    [21:55:15.281] - erase pending
    [21:55:15.428] - erase pending
    [21:55:15.458] - erase pending
    [21:55:15.582] - Erase time cost(ms): 2768.010986328125
    [21:55:15.644] - decompress write rx timeout: 24.576
    [21:55:16.014] - decompress flash load 404528
    [21:55:16.061] - Load 2048/404528 {"progress":0}
    [21:55:16.108] - Load 4096/404528 {"progress":1}
    ...
    [21:55:25.342] - Load 403456/404528 {"progress":99}
    [21:55:25.368] - Load 404528/404528 {"progress":100}
    [21:55:25.370] - Load 404528/404528 {"progress":100}
    [21:55:25.371] - Write check
    [21:55:25.450] - Flash load time cost(ms): 9805.93017578125
    [21:55:25.450] - Finished
    [21:55:25.455] - Sha caled by host: 24599529e7209425bfd2749bdc115ee209bf537a40bd65641be1312ac65a3b85
    [21:55:25.455] - xip mode Verify
    [21:55:25.663] - Read Sha256/759904
    [21:55:25.663] - Flash xip readsha time cost(ms): 207.3798828125
    [21:55:25.663] - Finished
    [21:55:25.665] - Sha caled by dev: 24599529e7209425bfd2749bdc115ee209bf537a40bd65641be1312ac65a3b85
    [21:55:25.665] - Verify success
    [21:55:25.727] - Dealing Index 4
    [21:55:25.727] - ========= programming chips\bl602\device_tree\ro_params.dtb to 0x001F8000
    [21:55:25.731] - ========= flash load =========
    [21:55:25.731] - ========= flash erase =========
    [21:55:25.732] - Erase flash from 0x1f8000 to 0x1f975d
    [21:55:25.788] - erase pending
    [21:55:25.817] - erase pending
    [21:55:25.940] - Erase time cost(ms): 208.176025390625
    [21:55:26.002] - decompress write rx timeout: 24.576
    [21:55:26.066] - decompress flash load 1584
    [21:55:26.103] - Load 1584/1584 {"progress":100}
    [21:55:26.104] - Load 1584/1584 {"progress":100}
    [21:55:26.104] - Write check
    [21:55:26.185] - Flash load time cost(ms): 183.519287109375
    [21:55:26.186] - Finished
    [21:55:26.187] - Sha caled by host: 2030ce2a98174d1e1bc02905472a5c55ff0df9d7274c49efd787982af2430e58
    [21:55:26.187] - xip mode Verify
    [21:55:26.192] - Read Sha256/5982
    [21:55:26.192] - Flash xip readsha time cost(ms): 3.63134765625
    [21:55:26.192] - Finished
    [21:55:26.193] - Sha caled by dev: 2030ce2a98174d1e1bc02905472a5c55ff0df9d7274c49efd787982af2430e58
    [21:55:26.193] - Verify success
    [21:55:26.248] - Program Finished
    [21:55:26.248] - All time cost(ms): 19213.0625
    [21:55:26.371] - close interface
    [21:55:26.372] - [All Success]
  • #23 20814476
    p.kaczmarek2
    Moderator Smart Home
    What does the debug log output on the same UART port says after RESET?
    Helpful post? Buy me a coffee.
  • #24 20814624
    chlebok
    Level 10  
    Dont' know baud rate. Trying on 2 000 000 and 115200 UART port says nothing

    Log output
    Spoiler:
    [13:28:03.577] - Flash load shake hand
    [13:28:03.831] - default set DTR high
    [13:28:03.944] - clean buf
    [13:28:04.068] - send sync
    [13:28:04.282] - ack is c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c04f4b
    [13:28:06.329] - FLc0c0 unknown
    [13:28:06.330] - Not ack OK
    [13:28:06.330] - FLc0c0 unknown
    [13:28:06.330] - Read log
    [13:28:06.330] - Read Fail


    Acces point still doesn't exist. But:
    A few tries later I got logs finally (before reset)
    Spoiler:
    [14:03:01.578] - Flash load shake hand
    [14:03:01.847] - default set DTR high
    [14:03:01.950] - clean buf
    [14:03:02.074] - send sync
    [14:03:02.287] - ack is 4f4b
    [14:03:02.553] - Read log
    [14:03:02.553] - log:
    [14:03:02.553] - ========================================================
    [14:03:02.553] - system clock=160M
    MCU SDK:e7b1eec38de23ec8fa328ec083fd19d7e6f34969
    BSP Driver:589340c3152815f47dc18e90f1c38b2e104fe69c
    BSP Common:53a909df50503d5716ebda7a9412933a775c3c82
    Xtal=4
    flash pin=0
    Flash detect:801540ef
    Flash ID=1540ef
    F80M
    QE
    BDR: 115606
    C
    RMA
    JID
    E
    CW
    Simple Malloc 1192
    Simple Malloc 28452
    Simple Malloc 32768
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    Simple Free 4203e3cc
    Simple Free 420374a8
    Simple Free 42037000
    WC
    xip
    burst wrap
    XRSha
    exit
    E
    W
    WC
    xip
    burst wrap
    XRSha
    exit
    E
    W
    WC
    xip
    burst wrap
    XRSha
    exit
    E
    CW
    Simple Malloc 1192
    Simple Malloc 28452
    Simple Malloc 32768
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    CW
    Simple Free 4203e3cc
    Simple Free 420374a8
    Simple Free 42037000
    WC
    xip
    burst wrap
    XRSha
    exit
    E
    CW
    Simple Malloc 1192
    Simple Malloc 28452
    Simple Malloc 32768
    Simple Free 4203e3cc
    Simple Free 420374a8
    Simple Free 42037000
    WC
    xip
    burst wrap
    XRSha
    exit
    return
    return
    BBDR: 115273
    C
    RL
    [14:03:02.614] - ========================================================
    [14:03:02.615] - Finished


    Moreover, after reset mcu sending trashes. I tried with many baudrates. Always sends random (readable or not readable) characters.
    edit: My mistake. My cheeap USB to serial adapter has broken, because of high baudrate.

    I just got logs after reset on 2000000 baudrate via logic analyser.
    '0'ErrorStarting bl602 now....
    Booting BL602 Chip...
    '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151' '226''150''136''226''150''136''226''149''151'      '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151'  '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151' '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151'
    '226''150''136''226''150''136''226''149''148''226''149''144''226''149''144''226''150''136''226''150''136''226''149''151''226''150''136''226''150''136''226''149''145'     '226''150''136''226''150''136''226''149''148''226''149''144''226''149''144''226''149''144''226''149''144''226''149''157' '226''150''136''226''150''136''226''149''148''226''149''144''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151''226''149''154''226''149''144''226''149''144''226''149''144''226''149''144''226''150''136''226''150''136''226''149''151'
    '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''148''226''149''157''226''150''136''226''150''136''226''149''145'     '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151' '226''150''136''226''150''136''226''149''145''226''150''136''226''150''136''226''149''148''226''150''136''226''150''136''226''149''145' '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''148''226''149''157'
    '226''150''136''226''150''136''226''149''148''226''149''144''226''149''144''226''150''136''226''150''136''226''149''151''226''150''136''226''150''136''226''149''145'     '226''150''136''226''150''136''226''149''148''226''149''144''226''149''144''226''149''144''226''150''136''226''150''136''226''149''151''226''150''136''226''150''136''226''150''136''226''150''136''226''149''148''226''149''157''226''150''136''226''150''136''226''149''145''226''150''136''226''150''136''226''149''148''226''149''144''226''149''144''226''149''144''226''149''157'
    '226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''148''226''149''157''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151''226''149''154''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''148''226''149''157''226''149''154''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''148''226''149''157''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''150''136''226''149''151'
    '226''149''154''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''157' '226''149''154''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''157' '226''149''154''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''157'  '226''149''154''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''157' '226''149''154''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''144''226''149''157'
    
    
    ------------------------------------------------------------
    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:         Nov 13 2023
    Build Time:         14:24:33
    Boot Reason:        BL_RST_POWER_OFF
    ------------------------------------------------------------
    Heap 127984@0x42022c10, 5888@0x4204a900
    Boot2 consumed 10ms
    
    blog init set power on level 2, 2, 2.
    [IRQ] Clearing and Disable all the pending IRQ...
    ------------------TRNG TEST---------------------------------
    **********TRNG TEST rand[4018f219]**************
    **********TRNG TEST rand[188023d0]**************
    ------------------------------------------------------------
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c: 285] [HAL] [BOOT2] Active Partition[0] consumed 596 Bytes
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  82] ======= PtTable_Config @0x4200ec0c=======
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  83] magicCode 0x54504642; version 0x0000; entryCnt 7; age 0; crc32 0x12DF9A26
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  89] idx  type device activeIndex     name   Address[0]  Address[1]  Length[0]   Length[1]   age
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [00]  00     0         0            FW  0x00010000  0x000e8000  0x000d8000  0x00088000  0
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [01]  02     0         0           mfg  0x00170000  0x00000000  0x00032000  0x00000000  0
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [02]  03     0         0         media  0x001a2000  0x00000000  0x00047000  0x00000000  0
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [03]  04     0         0           PSM  0x001e9000  0x00000000  0x00008000  0x00000000  0
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [04]  05     0         0           KEY  0x001f1000  0x00000000  0x00002000  0x00000000  0
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [05]  06     0         0          DATA  0x001f3000  0x00000000  0x00005000  0x00000000  0
    [         0]['27'[32mINFO  '27'[0m: hal_boot2.c:  91] [06]  07     0         0       factory  0x001f8000  0x00000000  0x00007000  0x00000000  0
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c:  96] ======= FlashCfg magiccode @0x42049c18, code 0x47464346 =======
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c:  97] mid \t\t0xEF
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c:  98] clkDelay \t0x1
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c:  99] clkInvert \t0x1
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c: 100] sector size\t4KBytes
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c: 101] page size\t256Bytes
    [         0]['27'[32mINFO  '27'[0m: bl_flash.c: 102] ---------------------------------------------------------------
    [         0]['27'[32mINFO  '27'[0m: hal_board.c:1249] [MAIN] [BOARD] [FLASH] addr from partition is 001f8000, ret is 0
    [         0]['27'[32mINFO  '27'[0m: hal_board.c:1257] [MAIN] [BOARD] [XIP] addr from partition is 231e7000, ret is 0
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 208] MAC address mode length 3
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 212] MAC address mode is MBF
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 194] Set MAC addrress 7C:B9:4C:9A:CB:75
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 955] country_code : 86
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 342] xtal_mode is MF
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 363] get xtal from F ready 36 36 0 60 60
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 851] pwr_table_11b :20 20 20 18
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 869] pwr_table_11g :18 18 18 18 18 18 14 14
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 887] pwr_table_11n :18 18 18 18 18 16 14 14
    [         0]['27'[36mBUF'27'[0m: hal_board.c: 606]  10  10  10  10  10  10  10  10  10  10  10  10  10  10 
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 902] set pwr_table_ble = 13 in dts
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 687] ap_ssid string[0] = bl_test_005, ap_ssid_len = 11
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 698] ap_psk string[0] = 12345678, ap_psk_len = 8
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 707] ap_channel = 11
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 635] [STA] ap_ssid string[0] = yourssid, ap_ssid_len = 8
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 646] [STA] ap_psk string[0] = yourapssword, ap_psk_len = 12
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 654] auto_connect_enable = 0
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 749] Troom_os = -1, lentmp = 4
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 758] linear_or_follow = 1, lentmp = 4
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 767] Tchannels:2412,2427,2442,2457,2472,
    [         0]['27'[32mINFO  '27'[0m: hal_board.c: 781] Tchannel_os:180,168,163,160,157,'8'[         0]['27'[32mINFO  '27'[0m: hal_board.c: 795] Tchannel_os_low:199,186,170,165,160,
    [         0]['27'[32mINFO  '27'[0m: 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 54500
    [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 0x23062ffe, msg handler 0x23062fce, 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 .
    [        52]['27'[32mINFO  '27'[0m: hal_uart.c: 364] uart[0] rx_buf_size 512, tx_buf_size 512
    [        53]['27'[32mINFO  '27'[0m: hal_uart.c: 379] uart[0] cts status = disable lentmp = 7
    [        54]['27'[32mINFO  '27'[0m: hal_uart.c: 379] uart[0] rts status = disable lentmp = 7
    [        54]['27'[32mINFO  '27'[0m: hal_uart.c: 402] id = 0, tx = 16, rx = 7, cts = 255, rts = 255 baudrate = 2000000.
    [        55]['27'[32mINFO  '27'[0m: hal_uart.c: 410] bl_uart_init 0 ok.
    [        55]['27'[32mINFO  '27'[0m: hal_uart.c: 411] bl_uart_init 0 baudrate = 2000000 ok.
    [        56]['27'[32mINFO  '27'[0m: hal_uart.c: 364] uart[1] rx_buf_size 512, tx_buf_size 512
    [        58]['27'[32mINFO  '27'[0m: hal_uart.c: 379] uart[1] cts status = disable lentmp = 7
    [        58]['27'[32mINFO  '27'[0m: hal_uart.c: 379] uart[1] rts status = disable lentmp = 7
    [        59]['27'[32mINFO  '27'[0m: hal_uart.c: 402] id = 1, tx = 4, rx = 3, cts = 255, rts = 255 baudrate = 115200.
    [        59]['27'[32mINFO  '27'[0m: hal_uart.c: 410] bl_uart_init 1 ok.
    [        60]['27'[32mINFO  '27'[0m: hal_uart.c: 411] bl_uart_init 1 baudrate = 115200 ok.
    [        60]['27'[32mINFO  '27'[0m: hal_gpio.c: 202] [HAL] [GPIO] Max num is 40
    [        61]['27'[32mINFO  '27'[0m: hal_gpio.c: 177] New CONF: GPIO05: feature 0, active 1, mode 0, time 100
    [        62]['27'[32mINFO  '27'[0m: loopset_led.c:  75] [LED] New Trigger: PIN 5, active level Lo, type Blink
    [        62]['27'[32mINFO  '27'[0m: hal_gpio.c: 115] [gpio1] status = disable
    [        63]['27'[31mERROR '27'[0m: hal_gpio.c: 216] gpio1: unvalid GPIO config
    [        63]['27'[31mERROR '27'[0m: hal_gpio.c: 130] gpio2: unvalid GPIO config button
    [        64]['27'[31mERROR '27'[0m: hal_gpio.c: 216] gpio2: unvalid GPIO config
    [        65]['27'[32mINFO  '27'[0m: hal_gpio.c: 106] gpio3 NOT found
    [MTD] >>>>>> Hanlde info Dump >>>>>>
          name media
          id 0
          offset 0x001a2000(1712128)
          size 0x00047000(284Kbytes)
          xip_addr 0x23191000
    [MTD] <<<<<< Hanlde info End <<<<<<
    [        66]['27'[31mERROR '27'[0m: bl_romfs.c: 146] romfs magic is NOT correct
    Start Wi-Fi fw @110ms
    1th channel,lo_vco_freq_cw=157
    2th channel,lo_vco_freq_cw=156
    3th channel,lo_vco_freq_cw=155
    4th channel,lo_vco_freq_cw=153
    5th channel,lo_vco_freq_cw=152
    6th channel,lo_vco_freq_cw=151
    7th channel,lo_vco_freq_cw=150
    8th channel,lo_vco_freq_cw=148
    9th channel,lo_vco_freq_cw=147
    10th channel,lo_vco_freq_cw=146
    11th channel,lo_vco_freq_cw=144
    12th channel,lo_vco_freq_cw=143
    13th channel,lo_vco_freq_cw=142
    14th channel,lo_vco_freq_cw=141
    15th channel,lo_vco_freq_cw=139
    16th channel,lo_vco_freq_cw=138
    17th channel,lo_vco_freq_cw=137
    18th channel,lo_vco_freq_cw=136
    19th channel,lo_vco_freq_cw=134
    20th channel,lo_vco_freq_cw=133
    21th channel,lo_vco_freq_cw=132
    0th channel,vco_idac_cw=12
    1th channel,vco_idac_cw=11
    2th channel,vco_idac_cw=11
    3th channel,vco_idac_cw=11
    4th channel,vco_idac_cw=12
    5th channel,vco_idac_cw=11
    6th channel,vco_idac_cw=11
    7th channel,vco_idac_cw=11
    8th channel,vco_idac_cw=11
    9th channel,vco_idac_cw=11
    10th channel,vco_idac_cw=11
    11th channel,vco_idac_cw=11
    12th channel,vco_idac_cw=11
    13th channel,vco_idac_cw=11
    14th channel,vco_idac_cw=11
    15th channel,vco_idac_cw=11
    16th channel,vco_idac_cw=11
    17th channel,vco_idac_cw=11
    18th channel,vco_idac_cw=10
    19th channel,vco_idac_cw=10
    20th channel,vco_idac_cw=10
    LO locked 9 146
    rosdac_i_gc3=33
    rosdac_i_gc2=33
    rosdac_i_gc1=33
    rosdac_i_gc0=33
    rosdac_q_gc3=35
    rosdac_q_gc2=35
    rosdac_q_gc1=35
    rosdac_q_gc0=35
    rbb_cap1_fc_i=25,rbb_cap2_fc_i=25,rbb_cap1_fc_q=25,rbb_cap2_fc_q=25
    new rbb_cap1_fc_i=49,rbb_cap2_fc_i=49,rbb_cap1_fc_q=49,rbb_cap2_fc_q=49
    LO locked 9 146
    amp=128,step=32,adc_mean_i=45
    amp=160,step=16,adc_mean_i=64
    amp=176,step=8,adc_mean_i=74
    amp=184,step=4,adc_mean_i=79
    amp=188,step=2,adc_mean_i=82
    amp=190,step=1,adc_mean_i=84
    amp=191,step=0,adc_mean_i=84
    tmx_cs=0, tmxcs_pwr_avg=31756, tmxcs_pwr_avg>>10=31
    tmx_cs=1, tmxcs_pwr_avg=38602, tmxcs_pwr_avg>>10=37
    tmx_cs=2, tmxcs_pwr_avg=47603, tmxcs_pwr_avg>>10=46
    tmx_cs=3, tmxcs_pwr_avg=58854, tmxcs_pwr_avg>>10=57
    tmx_cs=4, tmxcs_pwr_avg=72592, tmxcs_pwr_avg>>10=70
    tmx_cs=5, tmxcs_pwr_avg=86236, tmxcs_pwr_avg>>10=84
    tmx_cs=6, tmxcs_pwr_avg=92334, tmxcs_pwr_avg>>10=90
    tmx_cs=7, tmxcs_pwr_avg=88088, tmxcs_pwr_avg>>10=86
    tmx_cs_max=6, tmxcs_pwr_max=92334, tmxcs_pwr_max>>10=90
    amp=256,step=64,adc_mean_i=-141
    amp=320,step=32,adc_mean_i=-9
    amp=352,step=16,adc_mean_i=64
    amp=368,step=8,adc_mean_i=103
    amp=376,step=4,adc_mean_i=120
    amp=380,step=2,adc_mean_i=131
    amp=382,step=1,adc_mean_i=135
    amp=383,step=0,adc_mean_i=135
    tosdac_i=27,tosdac_q=39,tx_iq_gain_comp=1056,tx_iq_phase_comp=14
    amp=256,step=64,adc_mean_i=55
    amp=320,step=32,adc_mean_i=131
    amp=352,step=16,adc_mean_i=175
    amp=368,step=8,adc_mean_i=197
    tosdac_i=24,tosdac_q=35,tx_iq_gain_comp=1055,tx_iq_phase_comp=17
    amp=256,step=64,adc_mean_i=103
    amp=320,step=32,adc_mean_i=151
    amp=352,step=16,adc_mean_i=176
    amp=368,step=8,adc_mean_i=189
    amp=376,step=4,adc_mean_i=196
    tosdac_i=29,tosdac_q=37,tx_iq_gain_comp=1052,tx_iq_phase_comp=21
    amp=272,step=68,adc_mean_i=81
    amp=340,step=34,adc_mean_i=223
    tosdac_i=30,tosdac_q=41,tx_iq_gain_comp=1045,tx_iq_phase_comp=17
    amp=224,step=56,adc_mean_i=161
    amp=280,step=28,adc_mean_i=236
    tosdac_i=29,tosdac_q=40,tx_iq_gain_comp=1048,tx_iq_phase_comp=21
    amp=272,step=68,adc_mean_i=163
    amp=340,step=34,adc_mean_i=238
    tosdac_i=30,tosdac_q=37,tx_iq_gain_comp=1036,tx_iq_phase_comp=21
    amp=288,step=72,adc_mean_i=149
    amp=360,step=36,adc_mean_i=217
    tosdac_i=25,tosdac_q=36,tx_iq_gain_comp=1028,tx_iq_phase_comp=22
    amp=304,step=76,adc_mean_i=163
    amp=380,step=38,adc_mean_i=236
    tosdac_i=26,tosdac_q=37,tx_iq_gain_comp=1030,tx_iq_phase_comp=20
    [WF] [KEY] [CFG] nVAP is 2, endidx 10, startidx 8
    ------ set default key 0x42021670, key ptr 0x00000000
    ------ set default key 0x42021a48, key ptr 0x00000000
    '154'td_init
    '154'td_reset idx=0
    '154'td_reset idx=1
    Start Wi-Fi fw is Done @189ms
    [APP] [EVT] INIT DONE 145
    
    
    [BL] Initi Wi-Fi with MAC #### 7C:B9:4C:9A:CB:75 ####
         hostname: Bouffalolab_BL602-9acb75
    [WF] country code CN used, num of channel 13
    -----------------------------------------------------
    [IPC] [TX] Low level size 204, driver size 92, total size 296
    Enable BMX IRQ
    [WF] [KEY] [CFG] nVAP is 2, endidx 10, startidx 8
    ------ set default key 0x42021670, key ptr 0x00000000
    ------ set default key 0x42021a48, key ptr 0x00000000
    '154'td_init
    '154'td_reset idx=0
    '154'td_reset idx=1
    [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
    [WF][SM] reload tsen 
    [WF][SM] Exiting ifaceDown state
    [WF][SM] State Action ###ifaceDown### --->>> ###idle###
    [WF][SM] Entering idle state
    [APP] [EVT] MGMR DONE 159, now 203ms
    ---------STA enable
    [lwip] netif status callback
      IP: 0.0.0.0
      MK: 0.0.0.0
      GW: 0.0.0.0
    [APP] [WIFI] [T] 161
    [APP]   Get STA 0x4201cfec from Wi-Fi Mgmr, pmk ptr 0x420133d4, ssid ptr 0x420133b0, password 0x42013418
    [APP]    Empty Config
    [APP]    Try to set the following ENV with psm_set ,nd, then reboot
    [APP]    NOTE: conf_ap_pmk MUST be psm_unset when conf is changed
    [APP]    env: conf_ap_ssid
    [APP]    env: conf_ap_psk
    [APP]    env(optinal): conf_ap_pmk
    Entering initLog()...
    ,nds registered!
    initLog() done!
    [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
    EasyFlash V4.0.99 is initialize success.
    You can get the latest version on https://github.com/armink/EasyFlash .
    [       715]['27'[33mWARN  '27'[0m: bl_mtd.c: 201] addr@0x2309e0d4 is xip flash, size 8
    
    Main_Init_Before_Delay done
    
    Main_Init_Delay
    
    Main_Init_Delay done
    Info:MAIN:Main_Init_Before_Delay
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 1 changes count.
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT obl4C9ACB75/ subT obl4C9ACB75/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bl602s/ subT bl602s/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obl4C9ACB75/ subT cmnd/obl4C9ACB75/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bl602s/ subT cmnd/bl602s/+
    Info:MQTT:MQTT_RegisterCallback called for bT obl4C9ACB75/ subT obl4C9ACB75/+/get
    Error:CMD:cmd startScript NOT found (args autoexec.bat)
    Info:MAIN:Main_Init_After_Delay done
    
    Info:MAIN:Time 1, idle 0/s, free 109208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    
    Info:MAIN:Time 2, idle 0/s, free 109208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21 
    
    
    The last line was reapeating in about one second cycle.

    Dodano po 10 [minuty]:

    I have solution. My USB port in PC has some CC limit. Probbably USB current limit reset the moduel while is starting. (I powered the module via this port) After change to powerbank (for test) the AccessPoint works well. I love debugging... xD Bug is small, but so anoying. I spent few hours...
  • #25 20815709
    p.kaczmarek2
    Moderator Smart Home
    I am happy to hear it's resolved. How did you power that device? USB port should be able to provide at least 500mA so I am suprised... maybe used LDO is the culprit?
    Helpful post? Buy me a coffee.
  • #26 20815848
    chlebok
    Level 10  

    Exactly! The problem was with the "D-Sun PL2303" (pl2303HXA) budget USB to UART adapter I had for years. Now I've just discovered there is only an internal 3V3 LDO on this board with 4mA current! (DS for pl2303HXD)
    USB to UART adapter D-Sun PL2303.
  • #27 20815897
    p.kaczmarek2
    Moderator Smart Home
    Well, I would say that this has no chance of working. I am always using an external LDO, AMS1117-3.3V or TC1264-3.3V, which can provide enough of current, you can see that on our guides:


    Helpful post? Buy me a coffee.
  • #28 20816033
    chlebok
    Level 10  

    I see :) I have another problem. LiteFS doesn't work. Can't create file or do nothing else in FileSystem tab. No correct response. (I compared with working OBK)
    I tried in console with results:
    Error:CMD:cmd lfs_mount NOT found (args )
    Info:CMD:[WebApp Cmd 'lfs_mount' Result] Unknown command

  • #29 20816125
    p.kaczmarek2
    Moderator Smart Home
    LittleFS is not enabled on BL602 due to the small size of memory on this chip. You can use "Short startup command" instead.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the SDV-002_V1.2 module featuring the BL602 chip, commonly found in a 3-gang switch purchased from Aliexpress. Users are seeking information on pin compatibility, GPIO configurations, and flashing procedures. Initial inquiries focus on mapping the pinout, with suggestions to use a multimeter for continuity testing. Users share insights on the connections for RX, TX, and boot signals, as well as the functionality of GPIOs linked to touch switches and relays. Several users successfully flash their devices with custom firmware, discussing configurations for different gang models and addressing issues like response time delays. The conversation also touches on the need for proper boot mode setup and the challenges faced with USB to UART converters. Ultimately, users express gratitude for shared knowledge and provide templates for device configurations.
Summary generated by the language model.
ADVERTISEMENT