logo elektroda
logo elektroda
X
logo elektroda

Web App Flash Tab: Inconsistent Status Messages for Tuya GPIO and Custom Dump Buttons

divadiow 873 34
ADVERTISEMENT
  • ADVERTISEMENT
  • #32 21838149
    divadiow
    Level 38  
    revised wording in flash.vue a little. The RF write from backup requires the file selected starts with TLV\0 (0x54 0x4C 0x56 0x00), so not full backup. Maybe that should be next.

    Screenshot of OpenBeken “Flash” page with options to read, download, and write RF/CFG data.
  • ADVERTISEMENT
  • #33 21840644
    divadiow
    Level 38  
    did some more. but ..overkill?

    - Refactored RF offsets into a single chipset->RF base table and derived CFG as (RF + 0x1000).
    - Added RF support guarding for non-Beken/unsupported chipsets (disabled buttons, tooltips, and runtime hard-stops).
    - Guarded “Read RF Configuration” to match the restore/write RF button behaviour (same enable/disable logic and messaging).
    - Converted “Download RF data” from link to guarded button and implemented it via fetch+Blob download.
    - Converted “Download OBK configuration” from link to button (left unguarded) and implemented it via fetch+Blob download.
    - Fixed RF download to save as rfdata.bin with application/octet-stream (prevents “text file” saves) and aligned config naming similarly.
    - Implemented BK7238 RF read/download auto-detect: try 0x1E3000 first, fall back to 0x1E0000 if the block doesn’t start with TLV\0.
    - Added ability to use a full flash dump for RF “TLV restore” by locating TLV\0 and extracting exactly 0x1000 bytes for flashing.
    - Added an 8MB max-size rejection for the RF file input to avoid accidental huge uploads.
    - Added RF source metadata and logging (filename, whether extracted vs direct TLV-at-0, and extracted offset).
    - Added MAC preview logging and read-back verification for RF write (compare written 0x1000 vs device read-back).
    - Standardised confirmation prompts via a single promptYes() helper (case-insensitive YES/y handling).
    - Improved custom length prompt parsing to accept decimal bytes or hex (0xNNNN / NNNNh) and translate to backend hex length.
    - Added a single RF-supported-chipset constant/list reused by enablement logic and tooltip text (reduces drift/duplication).
    - Added central fetch helpers (fetchOrThrow/fetchArrayBufferOrThrow/fetchTextOrThrow) and applied them to previously unchecked calls (ensures response.ok is enforced consistently).
    - Improved full dump chunk download to enforce response.ok before consuming the body.
    - Changed downloadArrayBuffer() to revoke object URLs after a short delay instead of immediately (browser reliability).
    - Removed an unused full-dump workflow field (fullDumpFileTag) while keeping dump naming based on chipset/style/shortName.
    - Minor copy/tooltip text adjustments (including the BK7238 note and restore-RF MAC wording).

    Screenshot of the “Flash” tab with buttons to read, download, and write RF/CFG data and configs.

    Screenshot of a “Flash” page with a table for reading, downloading, and writing RF/CFG/OBK configurations

    is OBK CFG download/read used? should it stay?

    Should I continue to confirm all OK in testing or...?
  • ADVERTISEMENT
  • #34 21840816
    p.kaczmarek2
    Moderator Smart Home
    At first glance seems acceptable, but avoid low contrast graphical changes and excessive styling, we still hope to host it on OBK LFS itself when required, with GZIP of course. Any serious changes?
    Helpful post? Buy me a coffee.

Topic summary

The discussion addresses inconsistencies in the status messages displayed on the Flash tab of a web application related to firmware dumping functions. Specifically, when selecting "Download Tuya GPIO Config," the app incorrectly shows "reading full dump...." followed by "Full dump ready!" which is misleading. Additionally, the "Download Custom" button lacks a completion message similar to the other buttons. Modifications to the flash.vue component were proposed and tested to improve user feedback by adjusting the status messages: changing "reading..." to "downloading..." for download buttons and ensuring all buttons provide a clear completion log. A related pull request (PR #249) on the OpenBekenIOT/webapp GitHub repository implements these improvements, enhancing clarity and consistency in the UI during firmware dump operations.
Summary generated by the language model.
ADVERTISEMENT