Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove call to listFile(filename) from deleteFile(filename) #54

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

giulcioffi
Copy link
Contributor

@giulcioffi giulcioffi commented Jul 16, 2020

This is a work-around in case of the file to be deleted does not exist.

The issue that I was having before was that the check was made with "listFile(filename)". This function asks the Sara for a specific file (with AT+ULSTFILE=2,"filename") but, instead of getting as a result the length of that file, I was sometimes getting the full list of the files, so what I would get with AT+ULSTFILE (and the file UPDATE.OK was there!).

@aentinger aentinger merged commit bff3ad4 into arduino-libraries:master Jul 17, 2020
@manchoz
Copy link

manchoz commented Jul 17, 2020

@giulcioffi do you think that this is a bug in the R410 firmware? Would you be able to reproduce it? If so, we can report it do U-Blox.

@giulcioffi
Copy link
Contributor Author

@manchoz I am not sure if this is a bug in the R410 fw since it is not a systematic error. I noticed it with the SBU executing the line if (fileUtils.listFile(CHECK_FILE_NAME)) and printing on Serial1 its response. Sometimes I got the right response (+ULSTFILE: fileSize), so the one received by sending AT+ULSTFILE=2,<filename>. Sometimes I got the response +ULSTFILE: "UPDATE.BIN","UPDATE.OK" which is the one that should be received by sending AT+ULSTFILE=0.
I cannot say for sure if this is a bug on the fw side or on the library side, maybe not managing the buffer properly(?). Or this could even be related to the system reset phase, since some issues have been raised on the power-on and reset procedures of Sara module for MKRNB1500.

@manchoz
Copy link

manchoz commented Jul 17, 2020

Ok, this needs more investigation.

Maybe there is a missing waitForResponse() for a previous call.

Thanks for discovering and reporting.

@giulcioffi
Copy link
Contributor Author

The issue related to the listFile(filename) function has been solved by #55. It was due to incorrect power-on and reset sequences of the Sara-R410M module. The latest version of the SBU use the function listFile(filename).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants