logo elektroda
logo elektroda
X
logo elektroda

Hosting OpenBekenIOT Web App's 'Logs' function in the LittleFS of the Device (BK7231T)

jkwim 5292 60

Best answers

OTA can wipe LittleFS, so keep a backup; if that happens you can recreate the filesystem with `lfs_format` at the size you need [#20928195] The main size issue is not OTA itself but device memory: LittleFS uses 4 KB blocks, so oversized partitions can trigger low-heap warnings or reboots, and the upload/copy path needed an RTOS delay fix to become stable [#20930090][#20931820][#20941452] In the end, the web app was successfully hosted on-device with a `0x34000` (212 kB) LittleFS, minified `httpVueLoader`, and the required files including `filesystem.vue`, `logs.vue`, and the modified `startup.js`/`indexdevice.html` paths [#20944917] The author also found that minifying the `.vue` files let him shrink the partition and that 196 kB still worked, but 212 kB could still show low-heap warnings [#20946139][#20944917] So the practical recommendation is: enlarge LittleFS only as far as the device tolerates, expect OTA to erase it, and plan to restore the files afterward [#20928195][#20944940]
ADVERTISEMENT

Topic summary

The discussion focuses on hosting the OpenBekenIOT Web App's 'Logs' function within the device's LittleFS filesystem on BK7231T and BK7231N devices. The default LittleFS size is 32kB, which is insufficient for hosting multiple web app files such as startup.js, httpVueLoader.js, vue.min.js, and logs.vue. Users experimented with increasing LittleFS size up to 256kB and 200kB (0x32000), with mixed success due to device reboots and low heap warnings during large file uploads. A key finding was that adding RTOS delays during file upload improved stability, as implemented in a test firmware build. Firmware upgrades to versions around 1.17.404 and above were recommended for better performance. Minification of JavaScript and Vue files significantly reduced storage requirements, enabling hosting within the constrained LittleFS space. The memory layout of BK7231T and BK7231N devices was reviewed to understand partitioning and avoid overwriting OTA or application partitions. Alternative hosting solutions suggested include running the web app on a NAS or router with OpenWrt. Further development includes moving LittleFS to external SPI flash chips (4-8MB) or SD cards to expand storage capacity for logs and web app files. Fast bitbang SPI implementations and increased LittleFS cache sizes were tested to improve performance. The community encourages creating tutorials for these solutions and ongoing firmware improvements to enhance stability and usability of hosting web apps directly on BK7231 devices.
Summary generated by the language model.
ADVERTISEMENT