logo elektroda
logo elektroda
X
logo elektroda

XR3 PIR Sensor P06 Model OTA Flashing Capability?

sumitnz 972 19
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.
  • #5 21121383
    divadiow
    Level 34  
    @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.
  • ADVERTISEMENT
  • #7 21121405
    divadiow
    Level 34  
    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 34  
    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.
  • ADVERTISEMENT
  • #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 34  
    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 ?
  • #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.
  • #15 21131099
    divadiow
    Level 34  
    hmm OK. I plan to probably desolder the XR3 eventually to add to module collection for testing with the universal downloader adaptors.
  • ADVERTISEMENT
  • #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 34  
    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 34  
    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.

Topic summary

The discussion centers around the XR3 PIR Sensor P06 model and its OTA (Over-The-Air) flashing capabilities. Users confirm that there is currently no OTA support for the XR3 platform, indicating that users will need to resort to soldering for any modifications. A flashing guide for XR3/XR809 is available on the forum, but the devices are rare. Some users express interest in converting the device from TuyaMCU to a different firmware, while others discuss the technical aspects of the PIR sensor and its integration. The conversation also touches on the challenges of OTA implementation for the XR809 model, with references to specific coding functions and the need for OTA file building.
Summary generated by the language model.
ADVERTISEMENT