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

Please, help me to fix (m_update_engine): Error writing to m_client #85

Open
CNSNGopenSourceProjects opened this issue Feb 1, 2023 · 2 comments
Labels
question Further information is requested

Comments

@CNSNGopenSourceProjects
Copy link

I am trying to use the EthernetAWSIoT.ino on RP2040, but I've never connect to AWS cloud due to the Error writing to m_client.
The displayed messages are:
12:28:44.197 -> Initialize Ethernet with DHCP: 12:28:46.094 -> My IP address: 192.168.15.13 12:28:46.094 -> Attempting MQTT connection...(SSLClient)(SSL_ERROR)(m_update_engine): Error writing to m_client 12:28:46.177 -> (SSLClient)(SSL_ERROR)(m_update_engine): 1 12:28:46.177 -> (SSLClient)(SSL_ERROR)(connected): Not connected because write error is set 12:28:46.177 -> (SSLClient)(SSL_ERROR)(m_print_ssl_error): SSL_CLIENT_WRITE_FAIL 12:28:46.213 -> (SSLClient)(SSL_WARN)(m_run_until): Terminating with write error: 12:28:46.213 -> (SSLClient)(SSL_WARN)(m_run_until): 4 12:28:46.213 -> (SSLClient)(SSL_ERROR)(m_start_ssl): Failed to initlalize the SSL layer 12:28:46.213 -> (SSLClient)(SSL_ERROR)(m_print_br_error): Unknown error code: 0 12:28:46.213 -> failed, rc=-2 try again in 5 seconds 12:28:51.179 -> (SSLClient)(SSL_ERROR)(connected): Not connected because write error is set 12:28:51.213 -> (SSLClient)(SSL_ERROR)(m_print_ssl_error): SSL_CLIENT_WRITE_FAIL 12:28:51.213 -> Attempting MQTT connection...(SSLClient)(SSL_ERROR)(connected): Not connected because write error is set 12:28:51.213 -> (SSLClient)(SSL_ERROR)(m_print_ssl_error): SSL_CLIENT_WRITE_FAIL 12:28:51.213 -> (SSLClient)(SSL_ERROR)(connected): Not connected because write error is set 12:28:51.213 -> (SSLClient)(SSL_ERROR)(m_print_ssl_error): SSL_CLIENT_WRITE_FAIL 12:28:51.287 -> (SSLClient)(SSL_ERROR)(m_update_engine): Error writing to m_client 12:28:51.287 -> (SSLClient)(SSL_ERROR)(m_update_engine): 1 12:28:51.287 -> (SSLClient)(SSL_ERROR)(connected): Not connected because write error is set 12:28:51.287 -> (SSLClient)(SSL_ERROR)(m_print_ssl_error): SSL_CLIENT_WRITE_FAIL 12:28:51.287 -> (SSLClient)(SSL_WARN)(m_run_until): Terminating with write error: 12:28:51.287 -> (SSLClient)(SSL_WARN)(m_run_until): 4 12:28:51.287 -> (SSLClient)(SSL_ERROR)(m_start_ssl): Failed to initlalize the SSL layer 12:28:51.287 -> (SSLClient)(SSL_ERROR)(m_print_br_error): Unknown error code: 0 12:28:51.287 -> failed, rc=-2 try again in 5 seconds

I did few small changes only:

  1. Replace the includes for <SPI.h> and <EthernetLarge.h> by the "defines.h" from EtherneticGenerics.
  2. Add the contents of the PEM files of device certificates and private key. I known it is working since I tested using ESP32+WifiClientSecure.
  3. Change the subscription to do not use shadow (I am not so sure how to use it yet).

I hope you can help me.

Best regards,

Fernando

@CNSNGopenSourceProjects CNSNGopenSourceProjects added the question Further information is requested label Feb 1, 2023
@CNSNGopenSourceProjects
Copy link
Author

I am using W5500 Ethernet shield.

@CNSNGopenSourceProjects
Copy link
Author

I used the same code with ESP32 and it works fine.
The only change I had to do was replace the EthernetGenerics by Ethernet.
It means the problem is related to RP2040.
:(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant