logo elektroda
logo elektroda
X
logo elektroda

Reflashing Boot2 on BL602L20 RGBW Controller with BlDevCube 1.8.9

evaluation 939 8
ADVERTISEMENT
  • #1 21090783
    evaluation
    Level 3  
    Hi everyone,

    first of all I want to thank all for their work to provide clould-free homeautomation!
    Yesterday I got aware that there is this solution similar to Tasmota for i.e. BL602 devices.

    I was able to
    - solder PADs of Bl602L2 RGBW strip device
    - successfully flash OpenBl602 to it (golden USB TTL providing 3.3V) using BlDevCube 1.8.9, 10k between 3.3V and Boot
    - receive serial log in Putty
    - connect to device's Access Point via Smartphone and Laptop

    But I did not manage to connect the device to my OpenWrt (Fritzbox 3390), WPA/WPA2 security.
    It seemed that my SSID/password and IP values were not stored into the memory of the device and after reboot again AP came up with original configuration entries (DHCP, no SSID, ...).

    Finally I decided to erase the chip and flash it again => probably a big mistake.

    I figured out that I need to flash boot2 again.
    - PartitionTable=BouffaloLabDevCube-v1.8.9/chips/bl602/partition/partition_cfg_2M.toml
    - Firmware=OpenBL602_1.17.590.bin
    - boot2=BouffaloLabDevCube-v1.8.9/chips/bl602/builtin_imgs/boot2_isp_bl602_v6.6.1/boot2_isp_debug.bin

    Since then I again get serial logs and the device creates a AccessPoint.

    BUT: I cannot connect anymore.
    Laptop does not even show this AP.
    Smartphone shows it (Channel 1) but cannot connect.

    Obviously I erased too much and have no clue how to get it working again.

    Thanks a lot for any help!

    P.S.:
    Just noticed that AP name has changed after the Erase. Don't know whether this is important to know.
    perviously: OpenBL602_943F9A4D
    now: OpenBL602_43C90001

    Greetings
     Eva

    
    Entering initLog()...
    Commands 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 .
    [ 686][WARN : bl_mtd.c: 201] addr@0x230a1da0 is xip flash, size 8
    [MTD] >>>>>> Hanlde info Dump >>>>>>
    name media
    id 0
    offset 0x001a2000(1712128)
    size 0x00047000(284Kbytes)
    xip_addr 0x23191000
    [MTD] <<<<<< Hanlde info End <<<<<<
    
    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.
    Error:CMD:lfs is absent
    Info:GENIN_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 obl43C90001/ subT obl43C90001/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bl602s/ subT bl602s/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obl43C90001/ subT cmnd/obl43C90001/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bl602s/ subT cmnd/bl602s/+
    Info:MQTT:MQTT_RegisterCallback called for bT obl43C90001/ subT obl43C90001/+/get
    Error:CMD:LFS_ReadFile: lfs is absent
    Info:CMD:CMD_StartScript: failed to get file autoexec.bat
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Time 1, idle 0/s, free 107264, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 2, idle 0/s, free 107264, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 3, idle 0/s, free 107264, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 4, idle 0/s, free 107264, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    [lwip] netif status callback
    IP: 192.168.11.1
    MK: 255.255.255.0
    GW: 0.0.0.0
    [WF] MM_ADD_IF_REQ Sending: AP
    ▒td_start idx=0
    [WF] MM_ADD_IF_REQ Done
    [WF] vif_index from LAMC is 0
    [lwip] netif status callback
    IP: 192.168.169.1
    MK: 255.255.255.0
    GW: 0.0.0.0
    [DHCP] ip_start: [192.168.169.2]
    [DHCP] ip_start: [192.168.169.254]
    [WF][SM] start AP with ssid OpenBL602_43C90001;
    [WF][SM]pwd ;
    [WF][SM]channel 1;
    [WF] APM_START_REQ Sending with vif_index 0
    [WF] received APM Start apm_start_req_handler:77
    [WF] return with other handler
    [WF] APM_START_REQ Done
    [WF] status is 00
    [WF] vif_idx is 00
    [WF] ch_idx is 00
    [WF] bcmc_idx is 03
    [WF][SM] stateGlobalGuard_AP: AP iface has started!
    Info:MAIN:Time 5, idle 0/s, free 107264, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    [APP] [EVT] Unknown code 11, 5834
    [6839][WARN : bl_mtd.c: 201] addr@0x230a1da0 is xip flash, size 8
    Info:MAIN:Time 6, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:MAIN:Time 7, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 8, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 9, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 10, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 11, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 12, idle 0/s, free 106952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/21
    




    WiFi LED controller with QR code and Magic Home logo. Close-up of a small circuit board with a BL602 chip and a capacitor.  Photo of a USB TTL converter on a PCB with electronic components. Close-up of a circuit board with soldered wires and connectors.  Screenshot of Bouffalo Lab Dev Cube with various firmware options.
  • ADVERTISEMENT
  • Helpful post
    #2 21090900
    miegapele
    Level 15  

    You need to specify dts file, that will make correct mac appear. And you probably need to power it from some regulator capable of more current, that chip can't provide that. That is likely why you can't connect
  • ADVERTISEMENT
  • #3 21090924
    evaluation
    Level 3  
    I flashed DTS file "BouffaloLabDevCube-v1.8.9/chips/bl602/device_tree/bl_factory_params_IoTKitA_40M.dts".

    According to this URL
    https://nuttx.apache.org/docs/10.2.0/platforms/risc-v/bl602/index.html
    the 40M is the default dts file for BL602.

    Access Point is visible again for Laptop. I'm able to connect and see OpenBL602 menus.

    Thanks a lot for the help. Back in the game :-)


    Hinzugefügt nach 6 [Stunden] 4 [Minuten]:

    Hi,

    so far everything looked fine.
    I can configure the device and tested with a RGB Strip.

    BUT I noticed that the BL602 chip gets really hot (>100°C) in seconds... even if I completely disconnect the strip and even when powered by TTL stick via 3.3V
    Even when started in flashing mode (with 10k resistor between BOOT and 3.3V).

    So I did several power on/off to eliminate potential configuration issues and tried to flash with some variations of DTS and boot2 images.
    No success...

    Is it normal that BL602 chip gets that hot? Any sugestions how to solve it?
    Did I kill the device somehow?

    Thanks for your insights
     Eva
  • #4 21091404
    miegapele
    Level 15  

    Is it real measurement or it's just temperature device reports? Device report is probably unreliable.
  • ADVERTISEMENT
  • #5 21092206
    evaluation
    Level 3  

    the BL602 chip is really hot, it's not only the value in the WebUI.
    But of course measuring temperature by hand is subjective. So far I was not able to measure it correctly. My Laser thermometer shows silly values and my Tasmota DS18B20 is too slow. I cannot press them together until the DS shows ~50°C continuously increasing slowly.

    BTW also the TTL is getting hot when I power the BL602 over it.
    I'm quite sure that this was different before my erasing/reflashing...

    Could it be that I'm overclocking the BL602 because I flashed wrongly?

    There is a XTAL value in the flashing tool: 40
    Near BL602 there is JWT 40.000C12 chip. Don't know what XTAL means but this seems to fit.

    But to be honest I don't have a clue what I'm doing because all those abbreviations (XTAL, msg, psm, ...) are unknown to me.
  • #6 21092225
    divadiow
    Level 35  
    This suggests powersave may not be working as expected. Using the newer SDK looks to solve this problem, and probably a few other issues, but such an update sounds like a lot of work.

    https://github.com/openshwprojects/OpenBK7231T_App/issues/1157

    Added after 4 [minutes]:

    40m xtal is default for BL602

    @ElektrodaBot What is an xtal in the context of an iot device with controllers like bl602, bk7231n, esp32
  • ADVERTISEMENT
  • #7 21092240
    ElektrodaBot
    AI OpenAI ChatGPT4
    divadiow wrote:
    What is an xtal in the context of an iot device with controllers like bl602, bk7231n, esp32
    Hello! Great to see you here on the forum. Let's dive into your question step-by-step.

    An "xtal" in the context of IoT devices, including those with controllers like the BL602, BK7231N, and ESP32, refers to a crystal oscillator. Crystals are often abbreviated as "xtal" in schematics and discussions.

    What is a Crystal Oscillator?

    A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a precise frequency. This frequency is typically used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers.

    Why is it Important in IoT Devices?

    For IoT devices, having a precise and stable clock is crucial for several reasons:

    1. Timing Accuracy: Many IoT applications require accurate timing for synchronization, data sampling, and communication protocols.

    2. Efficient Communication: IoT devices often use wireless communication protocols like Wi-Fi, Bluetooth, or Zigbee. These protocols require precise timing to function correctly.

    3. Processor Clock: Microcontrollers and processors within these devices rely on a stable clock signal to execute instructions correctly.

    Specific Controllers

    1. BL602: This is a dual-mode (Wi-Fi + BLE) microcontroller. It typically uses an external crystal oscillator to provide the necessary clock frequency for its operations.

    2. BK7231N: Another microcontroller commonly used in smart home devices. It also relies on an external crystal for accurate operation, especially for its Wi-Fi connectivity.

    3. ESP32: A very popular microcontroller with built-in Wi-Fi and Bluetooth. The ESP32 often uses an external 40 MHz crystal oscillator for the main clock source.

    How does it work?

    Inside these microcontrollers, the crystal oscillator drives the clock signal for the processor and other peripherals. It works by converting electrical energy into mechanical vibrations and then back into an electrical signal at a specific frequency. This frequency is very stable due to the physical properties of the crystal.

    Questions for You

    1. Are you designing a circuit with one of these microcontrollers, or are you trying to troubleshoot an existing design?
    2. Do you need advice on selecting a crystal for your application, or are you encountering issues with the one you have?
    3. Are you looking for more detailed information about how to connect an external crystal to one of these microcontrollers?

    Let me know more about your specific situation, and I can provide more targeted advice!
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #8 21092491
    miegapele
    Level 15  

    I never measured my BL602 devices, but 100°C looks too much. Mine show internal temperature of 55-60°C, another in open air shows 40°C. BL602 SDK has provision for calibration, so this could be calibrated and correct. But with Chinese stuff, you can never know.
    Regardless, I don't think wrong flashing could cause anything like this. Usually if you flash something wrong, the device just doesn't work.
    Original firmware might have had some power-saving provisions, which do not work at all with this firmware.
  • #9 21092642
    evaluation
    Level 3  

    miegapele wrote:
    Original firmware might have had some power saving provisions, which does not work at all with this firmware.

    this might have been the case.
    Unfortunately I struggled a lot with Wifi after having flashed OpenBL602 to the device and did not focus on temperature.
    I noticed the high temp after having ERASED the device completely and reflashed it with BOOT, DTS, ...

    Don't know whether simple Firmware flash of OpenBL602 already had this temp issue or it rather was my silly ERASE...

    You mention "power saving feature".
    Just remember that I saw such a command in a device template I activated for the controller.
    I'm currently testing the device under a 8cm fan, still ~80-90°C. So far "powersave 1" or "powersave 0" has no effect.

    If this is really related to a not working powersave feature in current OpenBL602 firmware then I would assume that no one can really work with this firmware version, or?
    Perhaps I open a new topic with OpenBL602 and chip temperature to see if others have the same issue and perhaps even a solution?!

Topic summary

The discussion revolves around reflashing the Boot2 on a BL602L20 RGBW controller using BlDevCube 1.8.9. The user successfully soldered the device, flashed OpenBL602, and connected to its Access Point. However, they encountered issues with the device not storing Wi-Fi credentials, leading to repeated reboots with default settings. After erasing the chip and reflashing, the user noted the BL602 chip overheating (>100°C) even when disconnected from the RGB strip. Responses suggest that the overheating may be due to improper power-saving features in the firmware or incorrect flashing. The importance of using the correct device tree source (DTS) file and ensuring adequate power supply was emphasized. The user is considering opening a new topic to address the temperature issue further.
Summary generated by the language model.
ADVERTISEMENT