logo elektroda
logo elektroda
X

Beken BK7231/BK7252 SPI flashing and recovery - new flasher tool and protocol specs

p.kaczmarek2 2667 98
ADVERTISEMENT
📢 Listen (AI):
  • ADVERTISEMENT
  • #93 21719187
    p.kaczmarek2
    Moderator Smart Home
    Nice, W800 read seem to work.
    BK7231 Easy UART Flasher interface reading firmware from device via COM3
    @insmod by msvc didn't see System.Text.Json and I had to install it via NuGet , is it intended, or is my MSVC old?
    Screenshot of NuGet Package Manager showing System.Text.Json package

    Added after 6 [hours] 34 [minutes]:

    PS: I tried to add retry for BK7231T on UART in EF:
    Flashing tool UI with UART errors and flash process log failing at sector 69362
    It fails to retry everytime.
    On the other hand... on N:
    Screenshot of BK7231 Easy UART Flasher erasing firmware from BK7231N chip
    I cause interference by shorting RX and TX together.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #94 21719650
    insmod
    Level 29  
    >>21718744
    Nothing interesting here

    >>21719187
    Intended.

    Maybe move all the other chips bar bk spi into another topic? But what to call it...
  • #95 21720013
    p.kaczmarek2
    Moderator Smart Home
    Well, considering the discussion is more or less about new features of the flasher, I can say it's marginally acceptable to at least let it stay here.

    I am posting a WiFi flasher demo. Currently, it's a dirty copy of BK7123 flashing routines to C# with serial port changed to TCP socket.
    It is available here: https://www.elektroda.com/rtvforum/topic4148743.html
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #97 21720718
    divadiow
    Level 36  
    >>21720700

    amazing! in that case I might have to have another stab at backing up the ELM327 W600 I still have on stock fw, though the pins are quite small and IC placement particularly awkward. PB6 is right next to VDD33 too. xtal could be removed I guess

    Added after 40 [minutes]:

    very good. does EF acknowledge flash completion for you?

    BK7231 Easy UART Flasher program writing firmware to W600 chip.

    boots, AP, HC-25 web
    Visible Wi-Fi network named HC-25-286dcd0b8d1 with a signal iconHC-25 login page with password field and two buttons on a white background

    Added after 13 [minutes]:

    divadiow wrote:
    does EF acknowledge flash completion for you?

    if writing custom bin*

    OpenW600 written OK and boots. Air602

    BK7231N Easy UART Flasher interface with “Writing done” message

    Added after 1 [minutes]:

    insmod wrote:
    there was no log on any UART

    same.
  • #98 21721526
    divadiow
    Level 36  
    hello.

    I'm curious about the current state of BK7252U backup in EF. I've got a new 2MB BK7252UQN48 and I took an SPI backup with Neo and Beken SPI. Easy Flasher BK7231T and BK7231U uart mode takes identical backup to both SPI - so 4 identical backups. But if you take a BK7252U backup it will get it wrong, creating a different backup to the rest.

    Comparison of two binary files showing identical hex code and confirmation message

    EF says it is starting at 0x11000:

    Code: Text
    Log in, to see the code


    and at the end:

    Code: Text
    Log in, to see the code


    but then makes a 2,097,152 bytes file with UA in the name.

    If you do a custom read from 0x0 for 0x200000 length you get this, which has been seen in posts before:

    Code: Text
    Log in, to see the code


    I gather there's an ongoing issue with 4mb BK7252U and wrap-around but a 2mb backup should just be the same as T/U but with different names?

    Terminal window showing list of duplicate and unique binary files by hash

    I attach all backups for reference.
  • #99 21722488
    divadiow
    Level 36  
    insmod wrote:
    Since it's a 24pin camera, would it work in ESP32-CAM?


    ESP32 modules and OV3660 camera on a blue background

    GPT sketch. it got OmniVision OV3660 right

    Code: Text
    Log in, to see the code


    Detects some stuff if 24-pin doorbell GC0328C inserted

    Code: Text
    Log in, to see the code
📢 Listen (AI):

Topic summary

BK7231GUIFlashTool version 98 and later introduces a new SPI flashing method for Beken BK7231/BK7252 devices using only a CH341 SPI programmer. This method enables recovery of bricked devices with overwritten bootloaders and functions as a general-purpose SPI flasher supporting various memory chips. The approach builds on previous SPI programming techniques using Python and Banana Pi, adapting them for CH341 hardware and C# implementation. Required hardware includes a CH341 programmer and soldering tools for wire attachment. Recent user feedback on version 98 highlights issues such as the tool requiring a COM port selection in SPI mode, lack of CH341A detection warnings, and missing ch341dll.dll errors. The developer has addressed the COM port requirement and plans to add the missing DLL, requesting further debugging via Visual Studio to handle CH341 initialization exceptions.
Summary generated by the language model.
ADVERTISEMENT