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

mbedtls_ssl_handshake return -0x5180 (GIT8266O-376) #806

Closed
Vbansal1996 opened this issue Jan 7, 2020 · 7 comments
Closed

mbedtls_ssl_handshake return -0x5180 (GIT8266O-376) #806

Vbansal1996 opened this issue Jan 7, 2020 · 7 comments

Comments

@Vbansal1996
Copy link

Hardware description - nodemcu 12E module

Problem:
I am trying to make GET request to the https url. I am connected to WPA2 Enterprise network.
When ever I tried to make the connection with the host url I am getting this error.

Screenshot from 2020-01-07 17-34-56

I am not able to Identify the error reason, or meaning of this error.
This error value is not even listed in ssl.h file.

Can I get any help in this.

@github-actions github-actions bot changed the title mbedtls_ssl_handshake return -0x5180 mbedtls_ssl_handshake return -0x5180 (GIT8266O-376) Jan 7, 2020
@francescolavra
Copy link

The -0x5180 error code corresponds to MBEDTLS_ERR_MD_ALLOC_FAILED, i.e. you are running out of heap space.
If you are using the master or release/v3.3 branches of the SDK code, please make sure to pull the latest commits, since there was a bug (which got fixed in commit e0b7376) that in my case was causing the same MBEDTLS_ERR_MD_ALLOC_FAILED error even when there actually was enough free space in the heap. If you are not using the master or release/v3.3 branches, or if you still get the same error after pulling the latest commits, then you are really running out of heap space.

@Vbansal1996
Copy link
Author

Vbansal1996 commented Jan 7, 2020

I am using master and using the latest commited SDK in master, and I am getting this issue.

Is there any way to resolve this issue?

@francescolavra
Copy link

You could try to decrease the TLS maximum incoming fragment length option value with make menuconfig: go to > Component config > mbedTLS > TLS maximum incoming fragment length and change the value from the default 16384 to, say, 8192. This of course works only if your server doesn't send TLS fragments larger than 8192 bytes.

@Vbansal1996
Copy link
Author

ok Thanks I will check and update.

@Vbansal1996
Copy link
Author

I make the changes and not getting the error but now It is giving me the 502 bad gateway issue

@Vbansal1996
Copy link
Author

Thanks for your help I am able to resolve the issue.

@XingYu2535
Copy link

You could try to decrease the TLS maximum incoming fragment length option value with make menuconfig: go to > Component config > mbedTLS > TLS maximum incoming fragment length and change the value from the default 16384 to, say, 8192. This of course works only if your server doesn't send TLS fragments larger than 8192 bytes.

Thanks!!

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