-
Notifications
You must be signed in to change notification settings - Fork 39
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
Failure to send POST requests over SSL with TinyGSM #81
Comments
Spent the day trying to tweak things, running examples from this repository. Still seeing totally variable results, some calls succeed, most fail. I've tried interacting with different servers like the |
I see something similar on a SIMCom A7670E modem with a ESP32. If I restart the modem, e.g. every 30s, to send a bunch of IoT data, then it works fine. But if I try to keep the connection alive, some HTTPS POST work, but mostly not. The worst of the sslClient error is that it blocks until, my guess, some underlying TCP/IP stack function times out. That takes some 30sec. It would be great being able to set a shorter timeout! The response code I get then for my HTTPS request is -3... probably an error code from TinyGSM. @reusables-official did you get any further? |
@kgmuzungu Interesting theory. We moved on from using this SSL Client and instead were using a fork of the TinyGSM library that had "native" SSL support. I think there is a link to it in the issues of TinyGSM repository. We also eventually stopped doing that and offloaded all of our networking on to our IoT cloud provider (thinger.io) and generally find this much more reliable. |
Thank you for the hints. Native SSL is not working with all firmware versions of the SIMComA7670E.... and I havnt found how to upgrade/change the firmware. I am still looking for possiblities to get SSLClient working with A7670E 🙏 |
Hello, I am observing repeated failures trying to send a post request via SSLClient using my SIMCOM7600G modem with TinyGSM.
The most common and consistent error message:
I have tried to set headers to adjust the time out like so:
where body is a relatively small json payload:
Here is my setup code:
Then I use a RTOS task to monitor the connection and reconnect as needed:
What confuses me the most is that sometimes the request will go through and I'll get a 200 back as if nothing is wrong, but the vast majority of the time, I get the error pasted above.
I have run a test on signal quality to assess, and I will get a mix of 99 back as a value and anything from 28-31 at other points. Running on an interval of one second might produce output like:
[99, 31, 31, 31, 99, 27, 99, 99, 99, 28]
which also confuses me. My understanding is that a value of99
for signal quality from TinyGSM means it could not retrieve the value, 31 is the best quality possible and that a value of 0 would mean there was no reception at all.Any ideas what I'm doing wrong or inconsistently? I know the error is being thrown by this library, but very possible some other culprit is to blame here. I have the same functionality working perfectly over WiFi, where I provide the WiFi client to the "client.post" function I pasted above, also with SSL also via this library.
Very puzzled. Any thoughts greatly appreciated. I commented on a recent PR for this library that I thought might address the issue but it has not been resolved in my case, I am on version 1.2.0.
Platform.ini
The text was updated successfully, but these errors were encountered: