cesanta / mDash

Arduino / ESP-IDF library for mdash.net IoT service
https://mdash.net
Other
34 stars 17 forks source link

Incomplete filenames in mDash for release 1.2.15 #19

Closed nehemgr closed 1 year ago

nehemgr commented 1 year ago

I have noticed that the files loaded onto the SPIFFS partition of the ESP32, do not show their full names in mDash, when using the latest release. Rolling back to release 1.2.14 solves this issue. Below is an example.

Here is what the Files list should show, using release 1.2.14: mDash_1_2_14

Here is what the Files list shows, using release 1.1.15: mDash_1_2_15

The first two characters are disappearing in the latest release. Due to this, none of the files can be loaded as they are not found on the ESP32, and it fails every time.

Is there are any limitation on the total filename size across all files? Has anyone else faced this issue?

cpq commented 1 year ago

@nehemgr there is a limitation set by the Mongoose Library, MG_PATH_MAX - which is 128 on ESP32, if I am not mistaken. But what you're showing is a weird truncation..

You can check the latest version, which is open source - it might help.

nehemgr commented 1 year ago

@cpq... I have confirmed that this issue is resolved with release 1.2.16. Just for a sanity check, I tried release 1.2.15 and the same problem came up again.

I would really like to thank you and the team, for making the code open source. However, it does seem like some of the APIs are missing. For example, the declaration of mDashGetState() is provided in mDash.h, but there is no definition provided. Is the library still under development, and are the reduced APIs on purpose?

cpq commented 1 year ago

@nehemgr some API where removed because it was dangerous, or useless. The mDashGetState is useful indeed - was deleted by oversight. Added back, and tag moved.

cpq commented 1 year ago

By the way... Since mDash is now open, and mDash.h includes mongoose.h, the mDash provides all API that is provided by Mongoose Library - and that is a lot, see https://mongoose.ws/documentation/ and https://mongoose.ws/tutorials/

We can expose the mDash's event manager to get full access to the internals.

nehemgr commented 1 year ago

@cpq Thank you very much for your support. Will definitely check the API in mongoose.h...