logo elektroda
logo elektroda
X
logo elektroda

Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252

divadiow 1719 68
ADVERTISEMENT
  • #31 21704503
    p.kaczmarek2
    Moderator Smart Home
    What could be messed up? Only bootloader, assuming it's like BK7231N (so UART still works with broken bootloader)
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #32 21704523
    insmod
    Level 28  
    >>21704503
    Bootloader here is like on BK7231T. If erased - recovery only via spi.
    Thankfully, spi pins are available on this board.
    I've had to use them once.
  • #33 21705509
    p.kaczmarek2
    Moderator Smart Home
    Is bootloader readable via wrap around address hack?

    I did:
    1. EF erase all
    2. EF read:
    BK7231 Easy UART Flasher interface showing message Only 0xff bytes read!
    On BK7231T, I was able to read bootloader that way...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #34 21705531
    insmod
    Level 28  
    >>21705509
    It was readable for me.
    Perhaps you got 4mb variant?
  • #35 21705565
    p.kaczmarek2
    Moderator Smart Home
    Ah this explain things. Ok, now it seems I have overwritten bootloader and it no longer reacts to UART getting bus. Ok, let's try CH341 method as @divadiow described in the first post.

    Added after 41 [minutes]:

    Ok, progress report.

    CH341 from this vid:



    tool from @divadiow post.
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252

    Method:
    1. run Beken SPI TOOL
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    2. manually CEN to ground:
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    3. it gets SPI:
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    4. neo detects:
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252

    Added after 1 [minutes]:

    5. OpenBK7252_QIO_1.18.184.bin boots
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    Helpful post? Buy me a coffee.
  • #36 21705646
    divadiow
    Level 36  
    yay cool. also cool you made use of the 341 SPI tool :D

    just thought, presumably the BK7252U release caters for 2mb variants partition-wise - ie no adjustment for 4mb. I'll find partitions code
  • ADVERTISEMENT
  • #37 21705658
    p.kaczmarek2
    Moderator Smart Home
    Where does this SPI tool come from?

    Ok, what's next? Is there any project for this particular BK with working camera?
    Helpful post? Buy me a coffee.
  • #38 21705669
    divadiow
    Level 36  
    p.kaczmarek2 wrote:
    Where does this SPI tool come from?


    here. source there for anyone who wants to fiddle because I think timings could be better. sometimes it takes many resets (if using D2)

    divadiow wrote:
    I wanted to see if I could use weixin_44067125's Python script but with fewer dependencies, prettier text, infinite retries (instead of 10) and perhaps package it up as a single exe.

    After a few hours toiling around with 32bit Python, ChatGPT, pyinstaller and the CH341 wrapper by jimjiang2 - https://github.com/jimjiang2/ch341dll_wrap_typical_app - I came up with the following that has got two of my Beken devices (so far) into SPI mode.


    p.kaczmarek2 wrote:
    Ok, what's next? Is there any project for this particular BK with working camera?


    I only know of these two https://www.elektroda.com/rtvforum/viewtopic.php?p=21701793#21701793
  • #39 21705701
    p.kaczmarek2
    Moderator Smart Home
    Quote:

    25/09/25
    I have finished my MSc and now have a bit more free time, with many of these cameras still around. It's time to plan a first proper release for this project. I've been working on this for some weeks and right now I have an early version that boots, connects to Wi-Fi, reads and writes from SD card, supports MQTT and most importantly, works with at least 3 different camera sensors: GC0311, HI704 and GC0328. This include storing pictures and streaming using HTTP (with multipart/x-mixed-replace).

    Have you tried building and flashing it?

    Added after 12 [seconds]:

    Src: https://github.com/daniel-dona/beken7252-opencam
    Helpful post? Buy me a coffee.
  • #40 21705704
    divadiow
    Level 36  
    p.kaczmarek2 wrote:
    Have you tried building and flashing it?

    no sir. not yet
  • #41 21705711
    p.kaczmarek2
    Moderator Smart Home
    Helpful post? Buy me a coffee.
  • #42 21705715
    divadiow
    Level 36  
    oh cool. LIVE development.
  • #43 21705726
    insmod
    Level 28  
    I tried porting those changes, but it didn't work.
    I even tried via soft i2c from obk.
    gc0329 and gc0310 wasn't detected even via scani2c soft.
    Another strange thing is that on bk7238 i2c1 and i2c2 are somehow the same. I enabled OBK hw i2c on alt bekens, and scani2c i2c1 and scani2c i2c2 both detect aht10 connected to p20 and p21.

    https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/18136281276 if interested
    BK7252N and BK7252 log is on UART1
  • #44 21705760
    p.kaczmarek2
    Moderator Smart Home
    I'd suggest starting with checking whether Donna's solution is even working for our cameras. We may have different pieces.
    Helpful post? Buy me a coffee.
  • #45 21705817
    divadiow
    Level 36  
    insmod wrote:
    Another strange thing is that on bk7238 i2c1 and i2c2 are somehow the same


    is it a bit like the TXW where I2C1/I2C2 are just internal buses? Is that even correct? hmm dunno
  • Helpful post
    #46 21705834
    insmod
    Level 28  
    >>21705817
    No, TXW is like ESP32 or LN882H, where i2c can be routed to any pin
    Bekens i2c pins are fixed, p0/p1 and p20/p21.

    I checked bk7238 docs, and it has only 1 i2c interface.
  • #48 21705921
    p.kaczmarek2
    Moderator Smart Home
    I could try to help more, but I need to figure how to get original firmware of it

    Added after 4 [minutes]:

    Nice, OTA to Build: Built on Sep 30 2025 16:14:23 version bk7252-cam_857bffe6c2d7 works
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #50 21705944
    p.kaczmarek2
    Moderator Smart Home
    @divadiow flashed all_2M.1220.bin via SPI Flasher:
    
              BK7251_1.0.8
    CPSR:0x000000D3
    R0:0xB2065716
    R1:0xDE7DFFF7
    R2:0xBF7EFFCB
    R3:0xECFD4F67
    R4:0x034CA1A1
    R13:0xFAFBD7DB
    R14(LR):0xFFFBB7BB
    ST:0xC1F39129
    [I/FAL] Fal(V0.4.0)success
    [I/OTA] RT-Thread OTA package(V0.2.4) initialize success.
    [E/OTA] (ota_main:186) App verify failed! Need to recovery factory firmware.
    
    
    go os_addr(0x10000)..........
    
    

    I will flash back OBK and try via RBL

    Added after 8 [minutes]:

    I tried his RBL:
    
        BK7251_1.0.15
    REG:cpsr        spsr        r13         r14
    SVC:0x000000D3              0xF2FAD7CB  0xB4FB93BB
    IRQ:0x000000D2  0x00000010  0xEDCCEF1E  0x753CFFFE  
    FIR:0x000000D1  0x00000010  0xEDD9B36D  0xF32FF7F7  
    SYS:0x000000DF              0x693FFFEF  0xFAEDF877  
    ST:0xC1F39329
    [I/FAL] Fal(V0.4.0)success
    [I/OTA] RT-Thread OTA package(V0.2.8-beken-1133282d-20220604) initialize success.
    
    
    go os_addr(0x10000)..........
    
    
    Helpful post? Buy me a coffee.
  • #52 21705977
    p.kaczmarek2
    Moderator Smart Home
    This has booted:
    
    Tuya_A9_Cam_SC-10024_V1.0.0_(VGA卡片机-schemaID-000003uanz)_keyph8vwhadwsx3a_u0kmecmr7j8roazz_NEO_SPI_1.0.4.bin
    


    Added after 1 [minutes]:

    Wi-Fi window with SmartLife-2640 network and auto-connect checkbox

    Added after 17 [minutes]:

    Paired with Tuya App, but no video. Probably different camera sensor.
    Helpful post? Buy me a coffee.
  • #53 21706031
    divadiow
    Level 36  
    Just OTAd from 1.18.158 to rtthread_uart_2M.1220.bin with this cam https://www.elektroda.com/rtvforum/topic4127023.html

    Spoiler:
    [Flash]id:0xb4015
    --write status reg:4004,2--
    [Flash]init over
    --write status reg:0,2--
    Info:OTA:init OTA, startaddr 0x132000
    Info:OTA:132000
    Info:OTA:133000
    Info:OTA:134000
    Info:OTA:135000
    Info:OTA:136000
    Info:MAIN:Time 100, idle 206210/s, free 342048, MQTT 0(6), bWifi 1, secondsWithNoPing 34, socks 3/24
    Info:GEN:dhcp=0 ip=192.168.1.204 gate=192.168.1.1 mask=255.255.255.0 mac=c8:47:8c:42:88:48
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:OTA:137000
    Info:OTA:138000
    Info:OTA:139000
    Info:OTA:13a000
    Info:OTA:13b000
    Info:OTA:13c000
    Info:OTA:13d000
    Info:OTA:13e000
    Info:OTA:13f000
    Info:OTA:140000
    Info:OTA:141000
    Info:OTA:142000
    Info:MAIN:Time 101, idle 183243/s, free 342048, MQTT 0(6), bWifi 1, secondsWithNoPing 35, socks 3/24
    Info:OTA:143000
    Info:OTA:144000
    Info:OTA:145000
    Info:OTA:146000
    Info:OTA:147000
    Info:OTA:148000
    Info:OTA:149000
    Info:OTA:14a000
    Info:OTA:14b000
    Info:OTA:14c000
    Info:OTA:14d000
    Info:OTA:14e000
    Info:OTA:14f000
    Info:OTA:150000
    Info:OTA:151000
    Info:OTA:152000
    Info:MAIN:Time 102, idle 159259/s, free 343592, MQTT 0(6), bWifi 1, secondsWithNoPing 36, socks 3/24
    Info:OTA:153000
    Info:OTA:154000
    Info:OTA:155000
    Info:OTA:156000
    Info:OTA:157000
    Info:OTA:158000
    Info:OTA:159000
    Info:OTA:15a000
    Info:OTA:15b000
    Info:OTA:15c000
    Info:OTA:15d000
    Info:OTA:15e000
    Info:OTA:15f000
    Info:OTA:160000
    Info:MAIN:Time 103, idle 140777/s, free 343592, MQTT 0(6), bWifi 1, secondsWithNoPing 37, socks 3/24
    Info:OTA:161000
    Info:OTA:162000
    Info:OTA:163000
    Info:OTA:164000
    Info:OTA:165000
    Info:OTA:166000
    Info:OTA:167000
    Info:OTA:168000
    Info:OTA:169000
    Info:OTA:16a000
    Info:MAIN:Time 104, idle 141370/s, free 342920, MQTT 0(6), bWifi 1, secondsWithNoPing 38, socks 3/24
    Info:OTA:16b000
    Info:OTA:16c000
    Info:OTA:16d000
    Info:OTA:16e000
    Info:OTA:16f000
    Info:OTA:170000
    Info:OTA:171000
    Info:OTA:172000
    Info:OTA:173000
    Info:MAIN:Time 105, idle 146644/s, free 354400, MQTT 0(6), bWifi 1, secondsWithNoPing 39, socks 3/24
    Info:OTA:174000
    Info:OTA:175000
    Info:OTA:176000
    Info:OTA:177000
    Info:OTA:178000
    Info:OTA:179000
    Info:OTA:17a000
    Info:OTA:17b000
    Info:MAIN:Time 106, idle 156155/s, free 352856, MQTT 0(6), bWifi 1, secondsWithNoPing 40, socks 3/24
    Info:OTA:17c000
    Info:OTA:17d000
    Info:OTA:17e000
    Info:OTA:17f000
    Info:OTA:180000
    Info:OTA:181000
    Info:OTA:182000
    Info:OTA:183000
    Info:OTA:184000
    Info:OTA:185000
    Info:OTA:186000
    Info:OTA:187000
    Info:OTA:188000
    Info:OTA:189000
    Info:OTA:18a000
    Info:MAIN:Time 107, idle 157660/s, free 345136, MQTT 0(6), bWifi 1, secondsWithNoPing 41, socks 3/24
    Info:OTA:18b000
    Info:OTA:18c000
    Info:OTA:18d000
    Info:OTA:18e000
    Info:OTA:18f000
    Info:OTA:190000
    Info:OTA:191000
    Info:OTA:192000
    Info:OTA:193000
    Info:OTA:194000
    Info:OTA:195000
    Info:OTA:196000
    Info:OTA:197000
    Info:OTA:198000
    Info:MAIN:Time 108, idle 139910/s, free 342048, MQTT 0(6), bWifi 1, secondsWithNoPing 42, socks 3/24
    Info:OTA:199000
    Info:OTA:19a000
    Info:OTA:19b000
    Info:OTA:19c000
    Info:OTA:19d000
    Info:MAIN:Time 109, idle 135209/s, free 348224, MQTT 0(6), bWifi 1, secondsWithNoPing 43, socks 3/24
    Info:OTA:19e000
    Info:OTA:19f000
    Info:OTA:1a0000
    Info:OTA:1a1000
    Info:OTA:1a2000
    Info:OTA:1a3000
    Info:OTA:1a4000
    Info:OTA:1a5000
    Info:OTA:1a6000
    Info:OTA:1a7000
    Info:OTA:1a8000
    Info:OTA:1a9000
    Info:OTA:1aa000
    Info:MAIN:Time 110, idle 194741/s, free 355944, MQTT 0(6), bWifi 1, secondsWithNoPing 44, socks 3/24
    Info:GEN:dhcp=0 ip=192.168.1.204 gate=192.168.1.1 mask=255.255.255.0 mac=c8:47:8c:42:88:48
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:OTA:
    Info:OTA:close OTA, additional 0x130 FF added
    Info:OTA:1ab000
    Info:OTA:close OTA, addr 0x1ab400
    --write status reg:4004,2--
    --write status reg:0,2--
    --write status reg:7c,2--
    Info:MAIN:Time 111, idle 118621/s, free 374128, MQTT 0(6), bWifi 1, secondsWithNoPing 45, socks 2/24
    Info:MAIN:Module reboot in 2...
    Info:MAIN:Time 112, idle 307287/s, free 374128, MQTT 0(6), bWifi 1, secondsWithNoPing 46, socks 2/24
    Info:MAIN:Module reboot in 1...
    bk_reboot(1)
    wdt reboot
    BK7251_1.0.15
    REG:cpsr spsr r13 r14
    SVC:0x000000D3 0x00403D80 0x000127B4
    IRQ:0x000000D2 0x00000010 0x004035A8 0x000112F0
    FIR:0x000000D1 0x00000010 0x004025B8 0x00011300
    SYS:0x000000DF 0x0041C250 0x0008CC6B
    ST:0x00000001
    [I/FAL] Fal(V0.4.0)success
    [I/OTA] RT-Thread OTA package(V0.2.8-beken-1133282d-20220604) initialize success.
    [I/OTA] OTA firmware(app) upgrade(1.18.158->20250930_163838) startup.
    [I/OTA] total_len((736936) >= size_raw(736936), _STREAM_END

    [I/OTA] The partition 'app' is erasing.
    ###############BBBBBBBBBBB###[I/OTA] The partition 'app' erase success.
    [I/OTA] OTA Write: [> ] 0%
    [I/OTA]
    [I/OTA] OTA Write: [> ] 0%
    [I/OTA]
    [I/OTA] OTA Write: [> ] 0%
    [I/OTA]
    [I/OTA] OTA Write: [=> ] 1%
    [I/OTA]
    [I/OTA] OTA Write: [==> ] 2%
    [I/OTA]
    [I/OTA] OTA Write: [===> ] 3%
    [I/OTA]
    [I/OTA] OTA Write: [===> ] 3%
    [I/OTA]
    [I/OTA] OTA Write: [====> ] 4%
    [I/OTA]
    [I/OTA] OTA Write: [====> ] 4%
    [I/OTA]
    [I/OTA] OTA Write: [====> ] 4%
    [I/OTA]
    [I/OTA] OTA Write: [=====> ] 5%
    [I/OTA]
    [I/OTA] OTA Write: [======> ] 6%
    [I/OTA]
    [I/OTA] OTA Write: [======> ] 6%
    [I/OTA]
    [I/OTA] OTA Write: [=======> ] 7%
    [I/OTA]
    [I/OTA] OTA Write: [========> ] 8%
    [I/OTA]
    [I/OTA] OTA Write: [========> ] 8%
    [I/OTA]
    [I/OTA] OTA Write: [=========> ] 9%
    [I/OTA]
    [I/OTA] OTA Write: [=========> ] 9%
    [I/OTA]
    [I/OTA] OTA Write: [=========> ] 9%
    [I/OTA]
    [I/OTA] OTA Write: [==========> ] 10%
    [I/OTA]
    [I/OTA] OTA Write: [===========> ] 11%
    [I/OTA]
    [I/OTA] OTA Write: [============> ] 12%
    [I/OTA]
    [I/OTA] OTA Write: [============> ] 12%
    [I/OTA]
    [I/OTA] OTA Write: [=============> ] 13%
    [I/OTA]
    [I/OTA] OTA Write: [=============> ] 13%
    [I/OTA]
    [I/OTA] OTA Write: [==============> ] 14%
    [I/OTA]
    [I/OTA] OTA Write: [==============> ] 14%
    [I/OTA]
    [I/OTA] OTA Write: [===============> ] 15%
    [I/OTA]
    [I/OTA] OTA Write: [================> ] 16%
    [I/OTA]
    [I/OTA] OTA Write: [=================> ] 17%
    [I/OTA]
    [I/OTA] OTA Write: [=================> ] 17%
    [I/OTA]
    [I/OTA] OTA Write: [==================> ] 18%
    [I/OTA]
    [I/OTA] OTA Write: [==================> ] 18%
    [I/OTA]
    [I/OTA] OTA Write: [==================> ] 18%
    [I/OTA]
    [I/OTA] OTA Write: [===================> ] 19%
    [I/OTA]
    [I/OTA] OTA Write: [====================> ] 20%
    [I/OTA]
    [I/OTA] OTA Write: [=====================> ] 21%
    [I/OTA]
    [I/OTA] OTA Write: [=====================> ] 21%
    [I/OTA]
    [I/OTA] OTA Write: [======================> ] 22%
    [I/OTA]
    [I/OTA] OTA Write: [======================> ] 22%
    [I/OTA]
    [I/OTA] OTA Write: [=======================> ] 23%
    [I/OTA]
    [I/OTA] OTA Write: [=======================> ] 23%
    [I/OTA]
    [I/OTA] OTA Write: [========================> ] 24%
    [I/OTA]
    [I/OTA] OTA Write: [=========================> ] 25%
    [I/OTA]
    [I/OTA] OTA Write: [=========================> ] 25%
    [I/OTA]
    [I/OTA] OTA Write: [==========================> ] 26%
    [I/OTA]
    [I/OTA] OTA Write: [===========================> ] 27%
    [I/OTA]
    [I/OTA] OTA Write: [===========================> ] 27%
    [I/OTA]
    [I/OTA] OTA Write: [===========================> ] 27%
    [I/OTA]
    [I/OTA] OTA Write: [============================> ] 28%
    [I/OTA]
    [I/OTA] OTA Write: [=============================> ] 29%
    [I/OTA]
    [I/OTA] OTA Write: [==============================> ] 30%
    [I/OTA]
    [I/OTA] OTA Write: [==============================> ] 30%
    [I/OTA]
    [I/OTA] OTA Write: [===============================> ] 31%
    [I/OTA]
    [I/OTA] OTA Write: [===============================> ] 31%
    [I/OTA]
    [I/OTA] OTA Write: [================================> ] 32%
    [I/OTA]
    [I/OTA] OTA Write: [================================> ] 32%
    [I/OTA]
    [I/OTA] OTA Write: [=================================> ] 33%
    [I/OTA]
    [I/OTA] OTA Write: [==================================> ] 34%
    [I/OTA]
    [I/OTA] OTA Write: [===================================> ] 35%
    [I/OTA]
    [I/OTA] OTA Write: [===================================> ] 35%
    [I/OTA]
    [I/OTA] OTA Write: [====================================> ] 36%
    [I/OTA]
    [I/OTA] OTA Write: [====================================> ] 36%
    [I/OTA]
    [I/OTA] OTA Write: [====================================> ] 36%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================> ] 37%
    [I/OTA]
    [I/OTA] OTA Write: [======================================> ] 38%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================> ] 39%
    [I/OTA]
    [I/OTA] OTA Write: [========================================> ] 40%
    [I/OTA]
    [I/OTA] OTA Write: [========================================> ] 40%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================> ] 41%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================> ] 41%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================> ] 42%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================> ] 42%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================> ] 43%
    [I/OTA]
    [I/OTA] OTA Write: [============================================> ] 44%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================> ] 45%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================> ] 45%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================> ] 45%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================> ] 46%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================> ] 46%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================> ] 47%
    [I/OTA]
    [I/OTA] OTA Write: [================================================> ] 48%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================> ] 49%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================> ] 49%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================> ] 50%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================> ] 50%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================> ] 51%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================> ] 51%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================> ] 52%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================> ] 53%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================> ] 53%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================> ] 54%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================> ] 54%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================> ] 55%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================> ] 55%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================> ] 56%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================> ] 57%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================> ] 58%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================> ] 58%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================> ] 59%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================> ] 59%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================> ] 59%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================> ] 60%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================> ] 61%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================> ] 62%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================> ] 63%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================> ] 63%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================> ] 63%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================> ] 64%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================> ] 65%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================> ] 66%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================> ] 66%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================> ] 67%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================> ] 68%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================> ] 68%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================> ] 68%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================================> ] 69%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================================> ] 69%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================================> ] 70%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================> ] 71%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================> ] 71%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================================> ] 72%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================> ] 73%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================> ] 73%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================> ] 73%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================> ] 74%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================> ] 74%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================> ] 75%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================> ] 76%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================> ] 77%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================> ] 77%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================> ] 77%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================> ] 78%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================> ] 79%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================> ] 80%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================> ] 80%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================================> ] 81%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================> ] 82%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================> ] 82%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================> ] 82%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================> ] 83%
    [I/OTA]
    [I/OTA] OTA Write: [====================================================================================> ] 84%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================================================> ] 85%
    [I/OTA]
    [I/OTA] OTA Write: [=====================================================================================> ] 85%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================================================> ] 86%
    [I/OTA]
    [I/OTA] OTA Write: [======================================================================================> ] 86%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================================> ] 87%
    [I/OTA]
    [I/OTA] OTA Write: [=======================================================================================> ] 87%
    [I/OTA]
    [I/OTA] OTA Write: [========================================================================================> ] 88%
    [I/OTA]
    [I/OTA] OTA Write: [=========================================================================================> ] 89%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================================> ] 90%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================================> ] 90%
    [I/OTA]
    [I/OTA] OTA Write: [==========================================================================================> ] 90%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [===========================================================================================> ] 91%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================================> ] 92%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================================> ] 92%
    [I/OTA]
    [I/OTA] OTA Write: [============================================================================================> ] 92%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================================> ] 93%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================================> ] 93%
    [I/OTA]
    [I/OTA] OTA Write: [=============================================================================================> ] 93%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [==============================================================================================> ] 94%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [===============================================================================================> ] 95%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================================> ] 96%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================================> ] 96%
    [I/OTA]
    [I/OTA] OTA Write: [================================================================================================> ] 96%
    [I/OTA]
    [I/OTA] OTA Write: [=================================================================================================> ] 97%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================================> ] 98%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================================> ] 98%
    [I/OTA]
    [I/OTA] OTA Write: [==================================================================================================> ] 98%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================================>] 99%
    [I/OTA]
    [I/OTA] OTA Write: [===================================================================================================>] 99%
    [I/OTA] total_len((736936) >= size_raw(736936), _STREAM_END

    [I/OTA]
    [I/OTA] OTA Write: [====================================================================================================] 100%
    [E/OTA] (ota_erase_dl_rbl:24) ota_erase_dl_rbl

    [E/OTA] (ota_erase_dl_rbl:32) ota_erase_dl_rbl erase:132000



    go os_addr(0x10000)..........


    just trying to locate UART1. Only 1 TX pad on this PCB. Not sure we ever did get the BK7252U48 datasheet/diagram, only 68

    Added after 56 [minutes]:

    location no great surprise given where TX2 can be traced to

    Close-up of BEKEN BK7252UQN48 chip with labeled UART1_TX pin

    Code: Text
    Log in, to see the code
  • #54 21706676
    p.kaczmarek2
    Moderator Smart Home
    Did you get OpenCam running?

    I am trying to improve my workflow. I need automatic CEN reset. Do you know is my CH341 same as yours, does it have D2? I've found:
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    but it seems that connecting CEN To same pin does not work for me...
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    I connected CEN to pin 17:
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    I am using programmer jumper mode.

    Added after 3 [minutes]:

    Edit: found this tool

    Added after 8 [minutes]:

    Wait... my D2 works, I didn't click "write"....
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252

    Added after 55 [seconds]:

    And since my D2 works from this tool, this brings the question, why it is not working with Beken_SPI_CH341A_1.0.exe?

    Also.... this has 5V logic level on CEN. That's not good in the long run.

    Added after 1 [minutes]:

    Yes, I can use D2 to reset Beken via CEN:
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252

    Added after 1 [minutes]:

    Huh, I reconnected everything and it worked now:
    Screenshot showing debugging messages while initializing Beken chip via SPI
    Probably those timings are NOT that good, as you said.

    Added after 5 [minutes]:

    That's how I connected it:
    EEPROM programmer with connected wires and illuminated LEDs
    And again, it's attempting in a loop with no sucess. Oh wait... attempt 88
    Terminal window showing successful SPI mode entry for Beken IC
    Helpful post? Buy me a coffee.
  • #55 21706724
    divadiow
    Level 36  
    Yeh. The timings suck. Sometimes it's hundreds of tries. If I'm not desperate I just let it run or if need quick result do CEN manually a few times.

    Added after 5 [minutes]:

    initially I had to solder to CH341A pin for IO2
    CH341 programmer on black PCB and wired microcontroller setup
  • Helpful post
    #56 21706759
    p.kaczmarek2
    Moderator Smart Home
    Ok I tried to improve it a bit, can you try this version?
    Visual Studio with C# code running and console showing SPI mode messages
    Helpful post? Buy me a coffee.
  • #57 21706832
    divadiow
    Level 36  
    much better. almost straight away.

    Detected SPI NOR memory chips XT25F32B using a chip reading tool and CH341.

    are you thinking eventual EF integration?
  • #58 21706853
    p.kaczmarek2
    Moderator Smart Home
    I only changed number D2 sent to follow the approach I did in the Raspberry Pi/Banana PI flasher on my Github. Why did you reduce it in the first place? Or was it copied from someone's else tool?

    Maybe EF, maybe standalone for a start. I would like to help with those cameras, but we need a workflow for that. Automatic flashing once binary changes.
    Helpful post? Buy me a coffee.
  • #59 21706859
    divadiow
    Level 36  
    Hmm. Can't really remember. Resources used were from links shown at end of python programme
  • #60 21706885
    p.kaczmarek2
    Moderator Smart Home
    OK i can read flash, however... at first it looked corrupt, but now it reminds me something. Is this a CRC? That one problematic CRC that was mentioned in one of the thread, every few bytes?
    Taobao Tuya BK7252UQN68 Bare A9 Cam PCB (SC-10024 v1.0.0) - UART/SPI Flash Backup - OpenBK7252
    I am referring to the string references.
    Helpful post? Buy me a coffee.

Topic summary

A bare A9-type PCB (SC-10024 v1.0.0) featuring the BK7252UQN68 chip was purchased from Taobao without camera, battery, or casing. The board includes an 18-pin camera connector, two buttons, and two LEDs (red and two-tone blue/green). Attempts to obtain an SDK from the seller were unsuccessful. Efforts to locate Tuya firmware download URLs programmatically also failed. Flashing combined OpenBK7252 firmware files enabled OTA functionality on first boot, confirming OTA support despite requiring SPI flash programming. Logs indicate successful OTA initialization and app partition erase/write operations. Some malloc failures were observed, possibly due to differences in memory allocation methods between OTA and default A9 bootloader environments. Further testing or suggestions for additional experiments were requested.
Summary generated by the language model.
ADVERTISEMENT