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

Problem with TinyGsmClient when there's no connection #315

Open
tkralj opened this issue Aug 1, 2019 · 6 comments
Open

Problem with TinyGsmClient when there's no connection #315

tkralj opened this issue Aug 1, 2019 · 6 comments

Comments

@tkralj
Copy link

tkralj commented Aug 1, 2019

Hello all, i need some assistance from you smart people :). I am having a trouble when trying to send http request and there's no gprs connection. modem.isGprsConnected() returns true but i have deliberately disconnected connection on the gsm operators portal so i know there's no connection even though method returns true. What i want to achieve is to automatically reconnect to the gprs in the case of connection drop for what ever reason it may be. Right now there's no way i can find out that there's no connection prior to calling http and receive a timeout. i want to establish a connection prior to http call if it is possible. What do you think would it be ok solution if i always connect to gprs prior to call and disconnect from it after the call. would it be too much of overhead ?

@SRGDamia1
Copy link
Collaborator

What modem?

@tkralj
Copy link
Author

tkralj commented Aug 2, 2019 via email

@SRGDamia1
Copy link
Collaborator

SRGDamia1 commented Aug 2, 2019

I'm not really sure how to help you. If isGprsConnected() returns true, then the SIM800 thinks it is still attached to GPRS and still has an ip address. I don't know how to "tell" it otherwise or how to work around it telling lies.

Could you post an AT log showing what's happening?

@tkralj
Copy link
Author

tkralj commented Aug 2, 2019 via email

@SRGDamia1
Copy link
Collaborator

I don't know of any way.

@marcosdepo
Copy link

try to send AT+CIPSTATUS to gsm module, if its disconnected will response with ERROR or IP INITIAL

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

3 participants