-
Notifications
You must be signed in to change notification settings - Fork 4
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
Avoid connect to APN to loop forever in case of missing connection #25
base: main
Are you sure you want to change the base?
Conversation
Memory usage change @ 56d0bc2
Click for full report table
Click for full report CSV
|
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.
We have to use camel case for variable names according to the style guide. Otherwise looks good. I haven't tested it though.
56d0bc2
to
e436eab
Compare
Thanks @sebromero. The PR is updated with your observations. |
Memory usage change @ e436eab
Click for full report table
Click for full report CSV
|
e436eab
to
4606dbf
Compare
Memory usage change @ 4606dbf
Click for full report table
Click for full report CSV
|
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.
Please see comment
/** | ||
* @brief same as previous, username and password are empty | ||
*/ | ||
bool connect(String apn, bool waitForever); |
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.
bool connect(String apn, bool waitForever); | |
bool connect(String apn, bool waitForever = true); |
I'd assign the same default value to the version without credentials.
This PR introduces 2 changes (those changes have been found useful during Arduino Opta Cellular development, that uses this library):
getSimStatus()
is now public (it is useful to have the chance to know if the SIM is available or it has to be unlocked)connect
function in case the connection to the APN is not available (for example the antenna is missing and so a reliable communication cannot be established) was blocking. With this PR a parameter has been introduced to choose if the function must remain blocking (default) or it exits after a timeout.