logo elektroda
logo elektroda
X
logo elektroda

XR3 PIR Sensor P06 Model OTA Flashing Capability?

sumitnz 1185 21
ADVERTISEMENT
  • #1 21088914
    sumitnz
    Level 2  

    User manual for WiFi motion sensor, model P06. Close-up of an electronic module labeled Model: XR3 on a green circuit board. XR3 PIR sensor with visible circuitry and USB connection.

    Is this xr3 pir sensor p06 model FLASHABLE over OTA?
  • ADVERTISEMENT
  • #2 21088959
    p.kaczmarek2
    Moderator Smart Home
    We don't have OTA for XR3 platform yet, unfortunatelly. XR3 devices are very rare these days. I've only ever got like 3 of them and 2 of them were ordered on purpose (already knowing it's XR3).

    I'm afraid that you will need to do some soldering. Do you have equipment to do that? Only basic soldering iron and solder with solder paste is required.
    Helpful post? Buy me a coffee.
  • #3 21088961
    sumitnz
    Level 2  
    Yes I have soldering iron and solder.
  • #4 21089108
    p.kaczmarek2
    Moderator Smart Home
    You can give it a go. We have XR3/XR809 flashing guide on forum. Still, you are one of a very few people to get this WiFi module type...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 21121383
    divadiow
    Level 35  
    @sumitnz do you have the link to exact page you bought this device please?

    I have a P06 but sadly it's CBU+TuyaMCU
  • #6 21121396
    p.kaczmarek2
    Moderator Smart Home
    How the main board look like? Is this a variation of P06 from first post or a totally new internals?
    Helpful post? Buy me a coffee.
  • #7 21121405
    divadiow
    Level 35  
    similar. but different.

    Close-up of a circuit board with electronic components on a blue background.

    Close-up of a green circuit board with markings P06CBU-V1.3 and date 2022-12-22 on a blue background.

    Added after 27 [minutes]:

    I'll make another post to document journey with it
  • #8 21121472
    p.kaczmarek2
    Moderator Smart Home
    It would be also interesting to make another small side project - converting this from TuyaMCU to deepsleep Beken
    Helpful post? Buy me a coffee.
  • #9 21121480
    divadiow
    Level 35  
    hmm. maybe. can't say I'm super excited to play with this device. It's nice it has 5V USB for power I guess, negating the need for deep sleep.

    Won't the PIR sensor need a driver writing for it if the CBU/OBK did everything?

    Added after 56 [seconds]:

    but I get what you mean. As a proof-of-concept, a conversion showcase.
  • #10 21121526
    p.kaczmarek2
    Moderator Smart Home
    Hey, I actually tested PIR in the past already, isn't it just a boolean signal? 1 or 0? It worked well with digital input.

    Ah, sorry, if it has power coord, then it should be even easier to convert. No deep sleep needed.
    Helpful post? Buy me a coffee.
  • #12 21130994
    p.kaczmarek2
    Moderator Smart Home
    That's a new XR3 device. I haven't seen it yet. Please make a separate teardown when you got a moment.
    EDIT: Ah, sorry, I must have mislooked. It's indeed the same piece as in the first post
    Helpful post? Buy me a coffee.
  • #13 21130998
    divadiow
    Level 35  
    it's the same P06 variant in the OPs main post...

    Added after 16 [minutes]:

    but yes, a template, more pics, autoexec will need sorting I guess. What progress did you make @sumitnz ?
  • ADVERTISEMENT
  • #14 21131093
    p.kaczmarek2
    Moderator Smart Home
    Ah yes, sorry, I looked at the photo above and confused CBU version with the version from the first post.

    XR809 has no OTA (even in OBK) yet so it may be somewhat a challenge.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #15 21131099
    divadiow
    Level 35  
    hmm OK. I plan to probably desolder the XR3 eventually to add to module collection for testing with the universal downloader adaptors.
  • #16 21131128
    p.kaczmarek2
    Moderator Smart Home
    If you have some will to experiment with C, you could try to get OTA going. There is HTTP OTA sample in XR809 SDK and it's connected to OBK page, but for some reason it always fails. I didn't investigate it more because XR809 is very rare.
    Helpful post? Buy me a coffee.
  • #17 21131321
    divadiow
    Level 35  
    divadiow wrote:
    autoexec will need sorting I guess

    although, no LFS I'm guessing.

    p.kaczmarek2 wrote:
    you could try to get OTA going

    I could try!
  • #18 21131447
    p.kaczmarek2
    Moderator Smart Home
    XR809 OTA assumes that OTA file is on the other HTTP server, so XR809 acts like HTTP client.
    This old style OTA is called in http_fns.c:
    Code: C / C++
    Log in, to see the code

    This call goes here:
    https://github.com/openshwprojects/OpenBK7231...c5cb257acc/src/hal/xr809/hal_main_xr809.c#L15
    This is made so it starts OTA in the main loop:
    Code: C / C++
    Log in, to see the code

    It calls method from XR809 SDK, cmd_ota_http_exec, there:
    https://github.com/openshwprojects/OpenXR809/...a8bb61360612/project/common/cmd/cmd_ota.c#L82
    For some reason this method (or maybe some nearby method):
    Code: C / C++
    Log in, to see the code

    At some point I tried to debug it by commenting out certain code lines and inserting printfs but I haven't managed to determine what's wrong
    Helpful post? Buy me a coffee.
  • #19 21146316
    divadiow
    Level 35  
    won't XR809 build also need an OTA flash type file build?

    Properties window showing details of the OpenXR809 disk image file.
  • #20 21146326
    p.kaczmarek2
    Moderator Smart Home
    It is very probable that I was testing it locally, with OTA file building as well. Maybe OTA file is not yet included in the Github build artifacts because I have never got OTA working in the first place.
    Helpful post? Buy me a coffee.
  • #21 21586375
    divadiow
    Level 35  
    divadiow wrote:
    won't XR809 build also need an OTA flash type file build?


    although, taking the XR872 as an example, maybe the .img file is for UART and OTA?

    Quote:


    https://github.com/divadiow/DataSheets/blob/m...Winner_Xradiotech/xr872development_manual.pdf

    maybe @insmod already knows the score

    Added after 1 [minutes]:

    insmod wrote:
    From what i understood in the SDK code, the same binary that is used for UART is used for OTA.


    ha! good timing
  • #22 21587457
    divadiow
    Level 35  
    insmod wrote:
    Xradios update test
    LFS for all, Easyflash for all, OTA for all (XR809 not working, XR872 no image generated yet), Pins for all, berry for XR806.
    Implemented PWM, ADC (including VBAT), UART, watchdog in APP, delay_us, RSSI and ip addresses, remaining heap size.
    Fixed MAC for XR806.

    https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/15826444795


    XR809 _xradios_0ee37d864e12

    first boot after flash to erased XR3 + client joining AP
    Code: Text
    Log in, to see the code

    pins
    XR3 PIR Sensor P06 Model OTA Flashing Capability?

    LFS
    XR3 PIR Sensor P06 Model OTA Flashing Capability?

    I guess TCP Client is disconnected is not unique to XR872
    Code: Text
    Log in, to see the code

Topic summary

The XR3 PIR Sensor P06 model currently does not support OTA (Over-The-Air) flashing, as the XR3 platform lacks OTA capability. Users interested in firmware updates must resort to manual flashing via soldering, requiring basic soldering tools. The XR3 and XR809 modules are rare, and existing SDKs provide limited OTA support, with XR809 having an HTTP OTA client implementation that often fails in practice. Some users have shared images and teardown information of the P06 variant, noting differences in internal components such as CBU+TuyaMCU versions. Discussions include potential side projects like converting TuyaMCU-based devices to Beken chips with deep sleep support. The XR809 OTA process involves HTTP requests to download firmware images, but successful OTA flashing requires compatible OTA firmware builds, which are not readily available or fully tested. References to XR872 documentation suggest that .img files might support both UART and OTA flashing methods. Overall, flashing XR3-based PIR sensors demands hardware-level intervention and experimental software approaches due to the absence of stable OTA solutions.
Summary generated by the language model.
ADVERTISEMENT