BLE FS: is remaining size in write file response incorrect? #1539
Unanswered
azymohliad
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good day, folks! I've started the work on the external resources support in WatchMate companion app, and one part of the write file protocol isn't fully clear to me. Basically, is the remaining size in response (
0x21
) supposed to account for data written from the corresponding request (0x22
)?The documentation describes it as:
and it also says this (about
0x22
):But in my tests, it returns the remaining size before the data from request (
0x22
) is written. For example, if I write the file of size N, and send0x22
with all N bytes of content, the remaining size field in response would be N, not 0. Judging from the corresponding code, it's exactly what it does. FWIW, the file is still successfully written, just the returned remaining size can't be used as a stop condition. Is it a mistake in the implementation, or in the documentation, or just my misunderstanding?Somewhat unrelated, would it also make sense to clarify in the docs that the offset value in the response matches it from the request? Original Adafruit docs mention it explicitly, but before checking that, just from reading the InfiniTime docs my expectation was that the returned offset would account for the data written from the request too. Happy to make a PR, just want to make sure if it wasn't meant to be the other way first.
Beta Was this translation helpful? Give feedback.
All reactions