Have anyone worked with nucleo board lwip to send data to aws iot core

Have anyone worked with nucleo board lwip to send data to aws iot core
7 Replies
Marvee Amasi
Marvee Amasi5d ago
Yes sure, what do you need help with ?
Mohan
Mohan5d ago
@Marvee Amasi I am using mongoose library . I wants to send data to AWS iot core . I tried the same thing with esp32 over wifi. Now I needs to implement on nucleoh745zi-q over ethernet. But I don't know where to link AWS certificate.
Marvee Amasi
Marvee Amasi5d ago
Hope you have your root CA certificate (amazon root CA 1), device certificate, and private key
Mohan
Mohan5d ago
@Marvee Amasi yes I have
Marvee Amasi
Marvee Amasi5d ago
The place you are when configuring the MQTT connection, you load the AWS IoT certificates into mongoose There
Marvee Amasi
Marvee Amasi5d ago
Load the AWS IoT certificates
mg_tls_opts cert_options;
mg_tls_opts cert_options;
Your device certificate
cert_options.cert = "/path/to/device_cert.pem";

cert_options.cert = "/path/to/device_cert.pem";

Your private key
cert_options.key = "/path/to/private_key.pem";
cert_options.key = "/path/to/private_key.pem";
Amazon root CA certificate
cert_options.ca = "/path/to/root_ca.pem";

cert_options.ca = "/path/to/root_ca.pem";

Then after u can Initialize the connection to AWS IoT as in
struct mg_connection *conn = mg_connect(&mgr, "ssl://ur-endpoint-stuff.amazonaws.com:8883", event_handler);

if (conn == NULL) {
printf("Failed to connect to AWS IoT Core or anything u want to \n");
return;
}
struct mg_connection *conn = mg_connect(&mgr, "ssl://ur-endpoint-stuff.amazonaws.com:8883", event_handler);

if (conn == NULL) {
printf("Failed to connect to AWS IoT Core or anything u want to \n");
return;
}
Then u shuld enable TLS with the provided certificates
mg_tls_init(conn, &cert_options);
mg_tls_init(conn, &cert_options);
Marvee Amasi
Marvee Amasi5d ago
Gotten to this point ?
Want results from more Discord servers?
Add your server