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
Reset crashed device if needed #371
Open
daladim
wants to merge
1
commit into
gammu:master
Choose a base branch
from
daladim:feature_reset_modem_on_unknown_errors
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure here - ERR_UNKNOWN can also easily happen when Gammu doesn't understand some response and it could easily lead to reset loop.
I'd rather recommend using ResetFrequency to reset phone in defined intervals (eg. weekly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. However, I did not understand what happened until I thoroughly sniffed the AT command stream, and dug in gammu's code. At least, do you think the log files could be more explicit and give hints about this ResetFrequency when UNKNOWN errors are encountered?
I never payed attention to this feature until I saw it in the code (and I swear I read the documentation before using smsd :-) )
I get your point about a confusion about ERR_UNKNWON when Gammu doesn't understand some response. Do you think we should then distinguish two types of unknown errors, i.e. errors when Gammu does not understand, and errors when the dongle actually sends ERROR 500 messages over the wire? Because such an error 500 (= "unknown error" according to the AT standard) seems to be meaningful, at least for my dongle (more than if Gammu did not understand something).
Maybe we should also add a counter to prevent getting in a reboot loop?
My point is, I agree this may be dangerous, I agree I am using a crappy dongle, but I'm quite sure I'm not the only one to get such errors.
And I'm pretty sure 90% of the people getting such errors won't search as deep as I did. Giving them an out-of-the-box solution may ease their lives?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that error 500 is the most frequent you get from the AT modem. So assuming it is good reason to reset doesn't sound reasonable. I can as well mean that Gammu constructed command that modem doesn't understand and resetting in that case would not make the situation any better.