logo elektroda
logo elektroda
X
logo elektroda

[BL602L10] Flashing BL602L10 Cozylife Sensor: OpenBK Compatibility and Soldering Tips

minusync 1782 25
ADVERTISEMENT
  • #1 21267361
    minusync
    Level 9  
    Paraphrasing known movie character - Life is a box of chocolate your never know what u get. So ordering from Aliexpress couple of temperature sensors I got this surprise:

    Electronic board with a BL602L10 chip on a wooden surface.
    The image shows a set including a white Cozylife hygrometer, its circuit board, and a user manual placed on a wooden table. Printed circuit board with visible electronic components.

    This has BL602L10 chip and unfortunately I did not find any OpenBK instructions for this device. As chip naming suggests it has only 1MB Flash. BL602L10 is L=Light, 1 = 1MB.
    So I am not sure if I am able to flash it at all, however some people have managed to do this like here
    https://www.elektroda.com/rtvforum/topic4039068.html
    Also does OpenBK flashing software not support this chip. For this u need BLDevCube.exe from
    https://github.com/bouffalolab/bl_iot_sdk (use: tools/flash_tool)

    For soldering u need to get access backside of board. Soldering battery terminals will probably melt your device case so best option will be with just a little help of solder iron try prying it open just a enough to get access for wires.

    [url=https://obrazki.elektroda.pl/1670641000_1729195987.jpg]Interior of a plastic case with a visible section of a circuit board featuring pin labels.

    As I understand there is option to flash BL602 OTA but this is for hardcore developers with Linux available. https://www.elektroda.com/rtvforum/topic4050297.html

    So far I managed to solder wires for flashing but had no success to connect it with BLDevCube. With read ID I always get error. Also I would not know what to flash to 1MB.
    I will try to update this if I manage to find some relevant data.
    ___________________________________________________________

    Update and resume about this device.

    Short resume - avoid this device if possible at all cost!

    Necessary pads for flash are backside of board but there is 50/50 chance to destroy the board when desoldering it from battery pads.
    It is theoretically possible to flash it with BLDevCube but from 5 devices I had I was actually able to flash just one! Others just refused to connect to BLDevCube. I had to throw them away.
    This device has only 1mb flash and that means if you are lucky and able to flash it you are only able to flash it UART. No OTA! (L10 means light, with 1mb)

    My personal recommendation, when temperature sensor is needed, is to ditch wifi sensors completely and use Bluetooth analogs (THB2 or similar). I have not been able to achieve more than 4 months of life on any wifi temperature sensor with batteries, similar BT sensor with one battery change would last at least two years.
    Unfortunately there are also door sensors and possibly some other devices with this chip, for those I don't have good alternative. In that case it is just bad luck.
  • ADVERTISEMENT
  • #2 21267559
    divadiow
    Level 34  
    a flurry of 1mb BL602L10s suddenly. I suspect I have the same device arriving today.

    minusync wrote:
    As I understand there is option to flash BL602 OTA but this is for hardcore developers with Linux available. https://www.elektroda.com/rtvforum/topic4050297.html


    This OTA method is only for flashing Zengge/Magic Home devices.

    What have you tried so far? What is BLDC erroring with? which version of BLDC are you using?

    Are you pulling the DL/BOOT pin high with a 10k resistor?

    There are many posts detailing how to flash BL602, but this is a good start to use as a template for any flavour BL device





    Added after 3 [minutes]:

    I notice this image posted is just the thumb link with no link to full size. Confirms Senyslink CHT8315 presence.

    Circuit board with electronic components on a wooden background.

    Added after 2 [minutes]:

    Don't forget to take a backup of the 1mb flash when you get to that point https://www.elektroda.com/rtvforum/topic4051649.html
  • ADVERTISEMENT
  • #3 21267762
    minusync
    Level 9  
    divadiow wrote:
    There are many posts detailing how to flash BL602, but this is a good start to use as a template for any flavour BL device

    I looked before I started at that video. Obviously battery powered temp sensor does not have external 12V power, so I am actually still extremely confused how to get it to boot up

    divadiow wrote:
    Are you pulling the DL/BOOT pin high with a 10k resistor

    I combined something about 9.5K I suppose it should be close enough.

    divadiow wrote:
    this image posted is just the thumb

    In my opinion adding images to elektroda.com is actually bad and I noticed that sometimes when I rearrange them link gets lost or nests itself in the wrong place, but yeah it should be 8315. beginning of the markings are covered with flux but numbers are seen.
  • #4 21267825
    divadiow
    Level 34  
    minusync wrote:
    I looked before I started at that video. Obviously battery powered temp sensor does not have external 12V power, so I am actually still extremely confused how to get it to boot up

    no, indeed. 12v is just the supply used for the device in the video. There'll be a conversion down internally to 3.3v for the BL602.

    To power your temperature sensor for flashing you should use an external 3.3v PSU. Slightly riskier is using 2 strong 1.5v batteries. I have flashed on battery before. Still, ensure your grounds are common with the USB-TTL adaptor.

    Your greatest chance of success is with a decent external 3.3v power source.

    Added after 3 [hours] 14 [minutes]:

    Mine has arrived. Just gonna add some random pics and bits of info as I work my way with this device.
    Printed circuit board with BL602 chip and other electronic components. Close-up of a circuit board with various electronic components. Printed circuit board with pin labels DL, 3.3V, TX, RX, GND, and EN on a green background. Printed circuit board with connection labels: DL, 3.3V, TX, GND, EN, RX. Printed circuit board with various electronic components on a blue background.

    Added after 38 [minutes]:

    unpaired boot log from RX-labelled test pad - 2000000 baud

    Code: Text
    Log in, to see the code


    Added after 54 [minutes]:

    The pads on this device are labelled as to where they're to connect to, not where they're connected from on the BL602.
    soldered up as follows:

    RX pad -> USB-TTL RX
    TX pad -> USB-TTL TX
    DL pad -> 10k ohm resistor -> 3.3v PSU
    VCC battery contact -> 3.3v PSU
    GND battery contact -> PSU negative

    USB-TTL/PSU/IoT device share common ground.

    Compact BL602 device connected to an external 3.3V power supply on a desk. USB-TTL module connected to a circuit board

    On power-up the device is in uart download mode so BL Dev Cube can be used to read flash ID, take backup and then flash firmwares.
    Bouffalo Lab Dev Cube interface with flash identification results.

    Backup
    Screenshot of Bouffalo Lab Dev Cube interface displaying configuration options for BL602/604 flash.
    I had to reduce read speed to 500000 because 1000000 and 2000000 were producing errors.

    The backup file is attached.

    After disconnecting the 10kohm resistor I paired to the Cozylife app to grab some screenshots

    Mobile app screen with option to add a new device. Device information screen showing ID, signal strength, and firmware version. Settings screen of a temperature and humidity sensor showing various configuration options. Screenshot of a temperature and humidity sensor app displaying 24°C and 57%.

    Then the moment of truth flashing OpenBL

    Bouffalo Lab Dev Cube software configuration window with loaded settings for BL602.

    flash success but it hangs on boot, perhaps not surprising given the experience of @mad_maxs in https://www.elektroda.com/rtvforum/topic4039068.html

    Code: Text
    Log in, to see the code


    so, investigation required. Maybe OpenBeken is simply a no-goer for 1mb BL602s given how uncommon they are.
  • ADVERTISEMENT
  • #5 21268244
    minusync
    Level 9  
    divadiow wrote:
    The pads on this device are labelled as to where they're to connect to, not where they're connected from on the BL602.


    They are certainly going to great lengths to screw other people up. Now at least I get handshake success.

    However I must still be doing something wrong bcs everything else is going wrong. Read ID and read flash are both basically giving this:
    [18:52:15.536] - shake hand success
    [18:52:15.551] - get_boot_info
    [18:52:17.568] - ack is b''
    [18:52:17.568] - Not ack OK
    [18:52:17.568] - result:
    [18:52:17.568] - fail
    [18:52:17.568] - Img load fail
    [18:52:17.568] - Load helper bin time cost(ms): 3629.362548828125
    [18:52:17.568] - {"ErrorCode": "0003","ErrorMsg":"BFLB LOAD HELP BIN FAIL"}
    [18:52:17.568] - Burn Retry
    [18:52:17.568] - 0
  • #6 21268270
    divadiow
    Level 34  
    please post some images of your whole wiring setup and the BLDevcube config
  • #7 21268383
    minusync
    Level 9  
    divadiow wrote:
    please post some images of your whole wiring setup and the BLDevcube config


    For just read ID and read flash I did not change anything from default. obviously I have com port and uart 2000000 - without that handshake would not be possible. Also I did try with 500000 read ID and read flash is still
    [20:12:27.749] - shake hand success
    [20:12:27.764] - get_boot_info
    [20:12:29.783] - ack is b''
    [20:12:29.783] - Not ack OK
    [20:12:29.783] - result:
    [20:12:29.783] - fail
    [20:12:29.783] - Img load fail
    [20:12:29.783] - Load helper bin time cost(ms): 3604.04833984375
    [20:12:29.783] - {"ErrorCode": "0003","ErrorMsg":"BFLB LOAD HELP BIN FAIL"}
    [20:12:29.783] - Burn Retry
    [20:12:29.783] - 0
    [20:12:29.783] - Burn return with retry fail

    Hardware side:
    RX pad -> USB-TTL RX
    TX pad -> USB-TTL TX
    DL pad -> 10k ohm resistor ->USB-TTL 3.3v
    VCC pad -> USB-TTL 3.3v
    GND pad -> USB-TTL negative

    However, I noticed that u use version 1.8.9. I downloaded from github and it shows version 1.4.8. Could it be that??
    I started yesterday from Buffalo Lab website but it did show me download time 3H ! From git I got all the repository zip in minute or so.
  • ADVERTISEMENT
  • #9 21268421
    divadiow
    Level 34  
    regarding the flash size issues and OpenBL not booting, I wonder if @p.kaczmarek2 or @insmod has any thoughts. I'm trawling the OpenBL repo for signs something should be set differently depending on the flash size. Or perhaps OBK needs to be told there's no OTA partition at x address.

    Added after 8 [minutes]:

    Screenshot showing two configuration files named partition_cfg_1M.toml and partition_cfg_2M.toml open in Notepad, displaying sections on partitioning.

    Added after 5 [minutes]:

    maybe something in here? https://github.com/openshwprojects/OpenBL602/...components/hal_drv/bl602_hal/hal_boot2.c#L294

    i dunno
  • #10 21268506
    minusync
    Level 9  
    divadiow wrote:
    it's definitely worth a try


    Now it actually reads ID but flash read error remains the same.
    I also noticed that in "flash read jedec ID" for u it reads also mac but for me not. Obviously bcs the error it also does not show me flash size in logs.
  • #11 21268514
    divadiow
    Level 34  
    are your cables too long? are you soldered or pogo pins? how are you powering the device?
  • #12 21269965
    divadiow
    Level 34  
    minusync wrote:
    RX pad -> USB-TTL RXTX pad -> USB-TTL TXDL pad -> 10k ohm resistor ->USB-TTL 3.3v VCC pad -> USB-TTL 3.3vGND pad -> USB-TTL negative


    Just re-reading and notice you're powering from the USB-TTL. You should definitely use an external 3.3v source, especially with BL602s.
  • #13 21276174
    birdman2010
    Level 1  
    Hi all, I can verify that also while having a PSU attached while flashing the device simply will not boot.

    - using dev cube 1.9.0
    - was able to read ID & save original image
    - flash successful

    Please see images attached for my setup. Device is a Cozylife humidity sensor 602L10 based

    Bouffalo Lab Dev Cube 1.9.0 interface for device flashing.
    Printed circuit board with attached wires against a keyboard background.
    Breadboard with connected wires and an electronic sensor.
  • #14 21276187
    divadiow
    Level 34  
    birdman2010 wrote:
    the device simply will not boot

    Indeed, thanks. OpenBeken does not boot on any 1mb BL602 device to date. I do not know what needs changing in the code to fix this.
  • #15 21280390
    divadiow
    Level 34  
    I transplanted the CHT8315 into a TH01 with CHT8310 and 2mb Beken BK7231N as this is more useful in testing than paired with a BL602L10

    Close-up of CHT8315 microchip on a circuit board. Screenshot of the OpenBK user interface displaying temperature, humidity, battery level, and other diagnostic data.
  • #16 21285604
    minusync
    Level 9  
    >>21269965

    I was away, bcs I was actually already able to read the device ID when my computer crashed and after reboot I got errors "wrong line 0x0" or something similar. So I decided that in that process it destroyed my TTL board and I need a new one.
    Now when I finally have 3 different boards it turns out that I am actually still unable to connect any device (also cb2s) so the only logical conclusion for me is that it must be my computer.
    So from now I am not able to deal with new devices for a long time.
  • #17 21313834
    n3othe0ne2199
    Level 1  
    I am a lucky owner of a BL602L10 temp sensor. I've been doing research but I can't figure out why it doesn't boot. I suppose it's something related to the openbeken filesystem and partition table.

    Having a look I could find this code that maybe we need to adapt to the 1MB partition table:

    https://github.com/openshwprojects/OpenBK7231...db20682f4e6448b08d/src/littlefs/our_lfs.h#L48


    
    #elif PLATFORM_BL602
    // start media partition in bldevcube 1.4.8 partition config
    #define LFS_BLOCKS_START 0x192000
    #define LFS_BLOCKS_START_MIN 0x192000
    // end media partition
    #define LFS_BLOCKS_END 0x1E9000
    
  • #19 21372778
    minusync
    Level 9  
    Has anybody solved flash size limit with BL602L10

    Also, I could finally try again with my own device and it goes fine until I try read it.

    [23:45:37.478] - ========= image load =========
    [23:45:37.580] - get_boot_info
    [23:45:37.587] - data read is b'ffffffff0000000003000400a7f242fdd7c41400'
    [23:45:37.588] - ========= chipid: c4d7fd42f2a7 =========
    [23:45:37.589] - last boot info: None
    [23:45:37.590] - eflash loader present
    [23:45:37.591] - Error: Image load fail
    [23:45:37.592] - shakehand with eflash loader found
    [23:45:37.593] - Load helper bin time cost(ms): 114.858642578125
    [23:45:37.594] - ErrorCode: 0003, ErrorMsg: BFLB LOAD HELP BIN FAIL
    [23:45:37.595] - Burn Retry
    [23:45:37.596] - 0
    [23:45:37.596] - Burn return with retry fail


    Of course when it is not possible to flash this device some read error doesn't matter much.
  • #21 21394396
    Noubie
    Level 1  
    1 on the watching. Unfortunately, my skills are not advanced enough to add to the discussion but very interested in the outcome after receiving four of these which I had intended to use on HA but only if I can spring from the clutches of the CozyLife app.
  • #22 21417737
    minusync
    Level 9  
    I have come to the conclusion that battery sensors with wifi are absolutely pointless. I threw away both of those sensors I had and will only use Bluetooth analogs (THB2 or similar) from now on. I have not been able to achieve more than 4 months of life on any wifi temperature sensor with batteries. If wifi and mqtt connection take at least 10 seconds, then BTHome connection time is in milliseconds.
    None of my sensors have been used for that long, but at least theoretically, the life of such a BT sensor with one battery change would be at least two years.
    Openbeken is still great for switches and other permanently powered devices but any battery devices in my opinion it is waste of time for both developers and users.
  • #23 21418209
    vinibali
    Level 6  
    >>21417737 4 months with 2 AA batteries is just great!
  • #24 21419001
    minusync
    Level 9  
    >>21418209
    vinibali wrote:
    4 months with 2 AA batteries is just great!

    This is with very big concessions. To get out 4 months, the temperature cannot be transmitted more frequently than after every 90 minutes. One of my wifi sensors that I still use, uses a scheme where if the temperature does not change much, the update does not occur until every 90 minutes. If the temperature changes quickly, the updates occur even every minute if needed.
  • #25 21433901
    Vdragonb
    Level 1  
    Hello! Person that works on the Zephyr port for those chips here.

    I have acquired one of those from the aliexpress 'CASECASE' store after seeing this thread (needed to confirm BL602L works as expected and also a temp sensor board is nice to add to my setup), I have successfully flashed it with Zephyr RTOS so it is something small in openbeken. I can confirm there is no efuse protection key and it should work like any other BL602 based device (very few have the lock keys) that work with openbeken beside the small memory.

    My setup for flashing was:
    - 18650 battery to and - where battery goes usually
    - TX RX to adapter TX RX (not inverted as mentioned earlier)
    - GND of adapter to GND on test points
    - DL pulled high to enable flashing mode.
    - used BFLB-MCU-TOOL (from pip) to flash it, but devcube worked when I backed up the flash and checked the efuses.
  • #26 21460428
    minusync
    Level 9  
    Just note to anybody who happens to be unfortunate to get BL602 device.
    I have had 5 of those and 4 I had to throw away and I was able to flash only one device.
    My advice is to avoid at any cost one of those devices

Topic summary

The discussion revolves around the BL602L10 temperature sensor from Cozylife, focusing on its compatibility with OpenBK firmware and challenges related to flashing the device. Users share experiences with flashing techniques, including the use of BLDevCube and external power sources. Issues such as boot failures, flash size limitations, and the need for specific configurations are highlighted. Some users report successful flashing with alternative firmware like Zephyr RTOS, while others express frustration with battery-operated Wi-Fi sensors due to short battery life. The conversation emphasizes the importance of proper wiring, power supply, and firmware compatibility for successful device operation.
Summary generated by the language model.
ADVERTISEMENT