logo elektroda
logo elektroda
X
logo elektroda

Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

divadiow 13101 234
ADVERTISEMENT
  • ADVERTISEMENT
  • #212 21587276
    insmod
    Level 26  
    >>21587274
    EF and LFS offsets are tailored to 1MB flash. OTA header is moved to 1020K to make sure that 1MB flash still boots, but for those that have more can potentially use OTA in the future.
  • #213 21587286
    divadiow
    Level 35  
    yaaaaay. will test stuff as soon as I can. thank you
  • #214 21587287
    p.kaczmarek2
    Moderator Smart Home
    Did you double check if it works with OTA header outside 1MB space? I seem to remember that somewhere in this thread I concluded that OTA entry for 1MB+space breaks booting on 1MB chips while it still works on 2MB memory.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Helpful post
    #216 21587381
    divadiow
    Level 35  
    XF16 _xradios_0ee37d864e12

    boot to AP and client connect to AP log:
    Code: Text
    Log in, to see the code


    save config OK. wifi joined. startup command, MQTT connected but HA discovery not resulting in any new devices being added. Some of this in logs:
    Code: Text
    Log in, to see the code


    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    LFS OK and persists through reboot. it's v quick to reboot and join wifi.
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    PWM on PA21 to control blue LED on this cam PCB works. dimmer works.

    full pin list!!! 😁❤❤❤
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    oh and this is with 1mb. console upgrade interrupt works still in PhoenixMC
  • #218 21587388
    divadiow
    Level 35  
    divadiow wrote:
    MQTT connected but HA discovery not resulting in any new devices being added

    well that took an age and many reboots/discoveries. I'll restart my HA, but it's not usually sluggish.

    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    Added after 3 [minutes]:

    >>21587386

    ah thank you. that explains what happened to my first board then!

    I can use WXU still
  • #219 21587395
    insmod
    Level 26  
    False alarm, it seems that since 1.2.1 (we use 1.2.2) LDO is used by default, while that problem was when DCDC was used.
    Topic mentions 1.2, not 1.2.0 and i assumed that it is still a problem.
  • #220 21587400
    divadiow
    Level 35  
    phew OK. I'm trying to remember something. I think I left AllWinner board running OBK all night a few weeks ago. hmm
  • ADVERTISEMENT
  • #221 21587644
    johndoudou
    Level 3  
    p.kaczmarek2 wrote:

    Image is created that way:
    
    E:projectIOTtoolsxr-mkimageRelease>mkimage.exe
    

    so you would want mkimage source


    If that tool is responsible to assemble the different partitions into a bin file starting with AWIH, yes we need to reverse it :-)
  • ADVERTISEMENT
  • #223 21587748
    divadiow
    Level 35  
    >>21587395
    I do note however that the AllWinner XR806 board came with
    Code: Text
    Log in, to see the code

    https://github.com/openshwprojects/FlashDumps...R806AF2L_BaseboardV1.0_Dev_Board-divadiow.bin

    could that just mean code can be toggled to use DCDC/LDO but maybe SDK default changed?

    Added after 12 [minutes]:

    Code: Text
    Log in, to see the code


    https://github.com/divadiow/xr806_sdk/blob/f7...aab4dd18c7b947c2f261/ChangeLog.md?plain=1#L57
  • #224 21588441
    johndoudou
    Level 3  
    >>21587646

    Thanks, I want to start reverse engineering the content of the stock firmware to find all accepted "commands" by the camera (on/off, record video to SD card, AP/client mode etc.)
    I saw that there are different "apps" inside a firmware: boot, app, app_xip, wlan_bl, wlan_fw, wlan_sdd
    https://obrazki.elektroda.pl/7685058500_1744977818_bigthumb.jpg

    So we need first to "slice" the stock firmware bin to then start reverse-engineer interesting apps.
  • #226 21589963
    johndoudou
    Level 3  
    >>21588563

    Thanks, maybe it can help!
  • #227 21589985
    divadiow
    Level 35  
    also. if you search a dump for each of those hex values in little-endian format

    Code: Text
    Log in, to see the code

    =
    Code: Text
    Log in, to see the code


    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    Added after 8 [hours] 21 [minutes]:

    >>21581680

    here she is
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    can't get anyone to send me the damned datasheet and I can't find it. the closest is the newer Aimachip S710 https://docs.aimachip.com/zh-cn/latest/_stati...%E8%AE%BE%E8%AE%A1%E6%8C%87%E5%AF%BC-V1.3.pdf

    probably overkill, but this would be easier/nicer
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK
  • #228 21590642
    insmod
    Level 26  
    I flashed my XR872 board via SPI.
    HTTP OTA worked for me.
    Used MAC and OBK MAC are different
    mac address:
        efuse         : 18:9e:2d:xx:xx:xx
        in use        : f8:15:49:xx:xx:xx
    

    In openwrt i see mac "in use", in OBK i see efuse mac.
  • Helpful post
    #231 21590664
    divadiow
    Level 35  
    2MB XF16. HTTP _xradios_f3bf9e1b0ede -> _xradios_30beb8223658
    Code: Text
    Log in, to see the code


    Added after 3 [minutes]:

    Screenshot of XRADIO Skylark SDK device logs showing OTA update process and WiFi network configuration status. Screenshot of a system console showing the OTA update process and XRADIO Skylark SDK configuration.

    Code: Text
    Log in, to see the code


    Added after 10 [hours] 36 [minutes]:

    AM-01-S610 module - 8mb GigaDevice GD25Q64CSIG. Flash shipped blank.
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    OpenXR872 first boot.
    Code: Text
    Log in, to see the code


    not sure what this other little 32-pin chip is yet
    Screenshot of system logs from an XRADIO device during OTA update and startup process.

    Added after 11 [hours] 16 [minutes]:

    >>21575844

    slowly. GPIOs are obviously easier than all the non-GPIO. Anyone see any pins that are obviously/probably x pin because of what it's connected to that I haven't marked yet?

    Also interesting to see how similar it is to the XR872AT
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK
  • #232 21591822
    divadiow
    Level 35  
    divadiow wrote:
    not sure what this other little 32-pin chip is yet

    YC1021 YiChip bluetooth
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK
  • Helpful post
    #234 21614381
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    How is it connected to XR? Here's datasheet first page

    missed this. might get back to it one day



    WPA3 is OK on XF16
    Code: Text
    Log in, to see the code


    Screenshot of Wi-Fi connection logs showing WPA3 negotiation details, network association, and IP address assignment.
  • #235 21636062
    divadiow
    Level 35  
    not necessarily an issue I guess, but on XF16 the web app log is pretty slow and misses a lot compared to UART log

    gif
    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

Topic summary

The discussion focuses on a variation of the A9 mini Wi-Fi camera featuring the XF16 PB380EA6341 MCU, an 8Mbit SPI flash chip labeled T25S80 (likely from ChipSourceTek), and the XR872 SoC running the Skylark SDK. Attempts to read and dump the flash firmware using tools like Flashrom, NeoProgrammer, and ASProgrammer faced challenges due to unrecognized SPI IDs and unreliable read/write operations, especially when the flash chip was in-circuit. Desoldering the flash chip improved read/write reliability. The firmware strings indicate the use of an RTOS and the iLnkP2P protocol for communication. The XR872 SDK (version 2.0 and later 1.2.x) was explored for building and flashing demo applications, including a "hello world" example, which successfully booted on the hardware after flashing via UART using PhoenixMC. Flashing custom firmware requires careful handling of flash erase and protection bits, with some users experiencing verification errors and random write failures. The flash layout includes an AWIH header and OTA partitions, with OTA updates compressed by XZ, raising concerns about fitting OTA images into the 1MB flash. Hardware details such as the presence of a pull-up resistor on the flash hold pin and UART pin configurations (PB02/PB03) were examined. The community also discussed the compatibility of different flash chip sizes (1MB vs 2MB) and the impact on firmware booting and flashing. Some users successfully transplanted firmware to larger flash chips (2MB) to run custom firmware like OpenXR872 (OBK). The discussion includes references to related projects for video stream capture without flashing (cam-reverse) and the challenges of flashing and booting custom firmware on these devices. Overall, the thread provides detailed technical insights into hardware probing, firmware extraction, SDK usage, flashing procedures, and troubleshooting for the XF16-based A9 mini camera variant with XR872 SoC.
Summary generated by the language model.
ADVERTISEMENT