Hi !
When I try to debug myself, I notice that my error appears on line 97 : ret = connect(client->transport.tls.sock, client->broker, peer_addr_size);
could you help me ? thanks in advance
Hi !
Hello, lecozahu!
What sample have you based your project on and what amendments have you made?
Error -95 is probably EOPNOTSUPP, meaning that the requested operation is not supported on the socket.
Best regards,
Carl Richard
Carl Richard,
I was based on the aws_fota project, I did not touch the main, it is during the initialization of the client that the error appears.
I modified several things:
- I have defined CONFIG_PROVISION_CERTIFICATES
-I modified the certificate with the private, public and CA keys
-I modified in Kconf the address of the broker ending with amazonaws.com
- I modified CONFIG_CLOUD_CLIENT_ID and put it in the name of the object created on aws.
-I kept port 8883
Best regards,
lecozahu
Hello again!
I'm trying to reproduce the issue myself now. While I'm at it, did you make sure to add the three certificates correctly with < "(...)\n"\ > at every line?
Note aswell that you must add the public certificate, not the public key.
Best regards,
Carl Richard
That could be your error, yes.
The CLOUD_CLIENT_PUBLIC_CERTIFICATE should contain the .cert.perm you received. The CLOUD_CA_CERTIFICATE should contain the AWS root certificate which is found here. Hope this helps!
Best regards,
Carl Richard
I took the first RSA 2048 certificate (I'm not sure which one exactly to take) but it still doesn't work. I still get the same error...
best regards,
Lecozahu
I did not modify the variable: CONFIG_CLOUD_CERT_SEC_TAG. Could this be the explanation?
Best regards,
Lecozahu
I did not modify the variable: CONFIG_CLOUD_CERT_SEC_TAG. Could this be the explanation?
Best regards,
Lecozahu
That should not be the problem, as I did not modify it either and successfully established a connection.
However, I managed to get the -95 error by using the wrong certificates (as you did previously), so I just want to ensure that your certificates are correct:
Indeed, I did not take the correct amazon root certificate. I can now connect.
thanks a lot for your help!
Best regards,
Lecozahu
My pleasure! Glad I could help!
Best regards,
Carl Richard