Comments (6)
You may have to increase TINY_GSM_RX_BUFFER
in GSM library.
The rx buffer setting via setBufferSizes
should be larger than your data + some cipher suite.
This depends on the fragmentation supports on server.
If server does not support fragmentation, this buffer should set to 16k which is possible in ESP32.
from esp_sslclient.
Hi @mobizt, I have updated both TINY_GSM_RX_BUFFER and setBuffersizes function to have 16384 bytes for the RX buffer but the error still occurs. It does not happen for every transmission, sometimes it goes through just fine while other times it shows the error I reported in the previous post.
On another note, a new error that I had never seen before came up in one of the POST requests:
ERROR.mUpdateEngine: Error reading bytes from basic client. Write Error: 0
ERROR.mConnectSSL: Failed to initlalize the SSL layer.
ERROR.mConnectSSL: Unknown error code
from esp_sslclient.
You're starting SSL connection (SSL handshake) without stopping the current connection which there are some data that is waiting for read.
You have to review your code logic to make it work properly.
from esp_sslclient.
Thank you for your reply. I am not sure what you mean by stopping the current connection: the code I reported is taken from one of the sketch examples reported in the library, the "http upgrade" one.
from esp_sslclient.
I mean session or TCP session hope you understand.
The session was not re-used in the examples, and it works normally.
The error showed that you start a new connection while the session was opened and the BearSSL engine is in writing or reading for incoming data state. You have to terminate the sever connection before starting new connection.
This is your code logic and timing issue.
from esp_sslclient.
The http upgrade is not needed for normal application unless IMAP and SMTP applications.
For GSM module, the simple example is here.
https://github.com/mobizt/ESP_SSLClient/blob/main/examples/gsm/gsm.ino
from esp_sslclient.
Related Issues (5)
- EthernetClient not connecting HOT 5
- ESP_SSLClient with Ethernet Client connection delay HOT 9
- JWT error (Off-Topic) HOT 24
- Data loss HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp_sslclient.