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

Missing error handling and drops return code from waitResponse, etc. #788

Open
mikemorettiag opened this issue Apr 12, 2024 · 0 comments
Open

Comments

@mikemorettiag
Copy link

sendAT returns void when it should be returning some kind of error code. inside, it calls some uart/streaming stuff and ignores any return code/errors from that as well.
waitResponse processes all the various AT command responses you pass it (which is a really odd way to handle response errors) and returns some index value based on the params you pass, but 90% of the things in tinygsm's code that call it don't check the return value and drop it.
there are a bunch of other places where error handling is not done.
all this makes it next to impossible to figure out why a connection failed (and no, don't say "turn on debug logging", because most of the time you can't do that in production in the field and see it on some console). there should be a way programmatically via the tinygsm api to determine proper error status of everything you can call in it so that you can handle errors appropriately in your calling code.

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

No branches or pull requests

1 participant