So board reads... MINI-01_MAIN_V02 2022-05-19 and camera... KXD-XTP-Z30-23-2020V1.0 ?
So board reads... MINI-01_MAIN_V02 2022-05-19 and camera... KXD-XTP-Z30-23-2020V1.0 ?
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie taminsmod wrote:>>21349910 There is this: https://portrait.gitee.com/Dozingfiretruck/xr872_sdk/blob/master/project/example/jpeg/main.c
But it looks like only for GC0308 and GC0328C sensors
bool canUsePin(int pin) {
#if PLATFORM_ESP8266
if (pin == 6) {
return false;
}
if (pin == 7) {
return false;
}
#endif
return true;
}
startDriver MultiPinI2CScanner
divadiow wrote:I will wire up AHT20
, MQTT 0(12), bWifi 1, secondsWithNoPing 129, socks 0/0
Info:I2C:Pins SDA = 4, SCL =5, adr 0x50 (dec 1)
Info:MAIN:Time 199, idle 0/s, free 26780, MQTT 0(12), bWifi 1, secondsWithNoPing 130, socks 0/0
Info:I2C:Pins SDA = 4, SCL =5, adr 0x68 (dec 1)
Info:I2C:Next SDA = 4, SCL =8
Info:MAIN:Time 200, idle 0/s, free 26604, MQ
p.kaczmarek2 wrote:Well, this AHT20 I2C address does not look okay. Strange.
| Chip | BROM version | Flags | FlashID payload | PhoenixMC GUI FlashID | XR809 | 0x01 | 0x02 | 20 40 15 00 | 0x2040150000000000 | XF16 | 0x02 | 0x06 | C7 40 14 00 | 0xC740140000000000 | XR872 | 0x02 | 0x06 | C8 40 17 00 | 0xC840170000000000 | XR806 | 0x03/0X04 | 0x06 | EF 40 15 00 | 0xEF40150000000000 |
| FlashID | Manufacturer | Chip | 20 40 15 | XMC | 16-Mbit SPI flash | C7 40 14 | GigaDevice | 8-Mbit SPI flash | C8 40 17 | GigaDevice | 64-Mbit SPI flash | EF 40 15 | Winbond | 16-Mbit SPI flash |
| Field | Value | Sync | 55 → OK | Request opcode | 0x18 | Response magic | BROM | Payload length | 4 | Payload | SPI flash JEDEC ID |
Quote:
Unfinished BT for XR806 (makefile/config problems)
TL;DR: With 1MB stock flash, many XF16 A9 cameras can be dumped and restored over UART, and one contributor confirmed "OpenXR872 ... boots on 1mb flash" only after fixing the image layout. This FAQ helps XR872/XF16 camera owners back up firmware, understand AWIH partitions, fix PhoenixMC/UART issues, and avoid bad SPI-flash writes. [#21530564]
Why it matters: XF16 A9 cameras look identical externally, but small changes in flash size, OTA layout, console settings, and sensor wiring decide whether firmware boots, flashes, or bricks.
| Method | What works best | Main strengths | Main failure mode |
|---|---|---|---|
| PhoenixMC over UART | Read/write on XF16/XR872 without opening some A9 units | No desoldering; can restore stock dumps | Custom builds may lose UART flashing after power cycle if console support is wrong |
| CH341A + SOIC8 clip | Quick first dump attempts | Cheap; widely available | In-circuit reads often return bad IDs like 1313 or 8E8029 |
| CH341A with desoldered flash | Most reliable SPI backup/restore | Stable verification; works with replacement chips | Some flash chips still fail erase/write unless decoupling is added |
| Bus Pirate | Usually poor choice here | Can talk SPI/UART | Backfeeds power and often fails chip detection |
Key insight: The hardest XF16 problems were not caused by the XR872 core. They came from image layout, OTA header placement, console enablement, and fragile SPI flash behavior on specific 1MB chips.
1313, 8E8029, and then stable C74014 on the same 1MB camera, while a desoldered read later became consistent and verified correctly. Shared power rails, leakage from the rest of the board, bad clip contact, and marginal CH341A supply decoupling all caused false IDs. A clean off-board read or UART dump was much more trustworthy than an in-circuit first pass. [#21522287]0xa5ff5a00, 0xa5fe5a01, 0xa5fd5a02, 0xa5fa5a05, and 0xa5f95a06 to boot_40M.bin, app.bin, app_xip.bin, wlan_bl.bin, and wlan_fw.bin. Searching a dump for those little-endian markers was enough to start slicing it for Ghidra or manual comparison. [#21589985]IpcP2pStart, device rtuid, and p2pID, then worked with YSX or YSXLite. The same protocol is what cam-reverse and related reversing notes target, including video extraction and CGI-style control. Multiple posts linked the protocol directly to the apps and to the reverse-engineering workflow. [#21353025]image max size is invalid and missing XIP section errors on the 1MB setup, while the 2MB chip could tolerate the oversized placement. [#21525075]max_size around 880K. Later they proved that a no-OTA image booted on 1MB stock flash, then refined the layout so the OTA header sat at 1020K with 4K size instead of the breaking 1024K arrangement. After that, 1MB XF16 boards booted OpenXR872 normally. As one post put it, “ota was the problem.” [#21530564]#define PRJCONF_CONSOLE_EN 1, which restored the upgrade command path and made Open comm OK ! survive fresh power cycles on 1MB XF16 boards. Before that fix, some builds could still be reflashed only until RAM state was lost, which made the problem look random. After the console option was re-enabled, PhoenixMC download-mode entry became reliable again. [#21536774]upgrade, then repeated U sync bytes; a receptive firmware answers with OK and a BROM response. Later reversing tied that behavior to the XR command handler where cmd_upgrade_exec() reboots with PRCM_CPUA_BOOT_FROM_SYS_UPDATE. That is why stock firmware and console-enabled OpenXR872 can enter download mode over UART without grounding PB02 or PB03 at all. [#21534886][FD I]: mode: 0x4, CPU at 240000000 Hz, HF clock at 40000000 Hz, SDK build date, MAC addresses, sensor probe results such as detect sp0828, and AP behavior such as 192.168.238.1 on stock firmware. It also shows whether the camera starts in AP mode, tries STA mode, fails SD mount, or enters iLnkP2P. For XF16 debugging, the UART log is the fastest way to identify variant, sensor, and failure stage. [#21219273]libc6-i386, lib32z1, and lib32stdc++6. Without those, WSL reported missing loader errors even when the path was correct. Once the 32-bit compatibility packages were installed, make lib and example builds such as hello_demo started compiling normally. [#21522159]25QH32CHIG failed repeatedly, then passed once a capacitor was added across the supply. Some users also had to experiment with protection-register handling, but the strongest repeated fix was better decoupling on the programmer side. [#21709832]ov9660, ov7740, sp2518, gc0310, gc0328, gc0329, hi0704, hi0708, and sp0828. Start by reusing initialization tables and SCCB/I2C setup from the closest supported driver, then confirm the actual sensor with ribbon markings or UART detection logs. For XF16 A9 specifically, sp0828 was repeatedly detected in stock logs, while separate posts confirmed useful initialization arrays existed for hi704-class parts. That makes driver adaptation a sensor-data problem more than a core XR872 problem. [#21547719]005affa5, 015afea5, 025afda5, 055afaa5, and 065af9a5 to locate boot, app, app_xip, wlan_bl, and wlan_fw boundaries. The SDK’s mkimage.exe is the packer that assembles those partitions into one AWIH image, so it is the right binary to study if you want PhoenixMC-style slicing for Ghidra. The thread specifically identified mkimage.exe as the image-creation step. [#21587062]