esp32-cloud-iot-core-k8s
esp32-cloud-iot-core-k8s copied to clipboard
Root Certificate for ESP32
Hello,
I'm trying to connect ESP32 to Google Cloud IoT Core using the google-cloud-iot-arduino and the arduino-mqtt libraries. And I keep getting this message on the serial monitor:
Settings incorrect or missing a cyper for SSL
Connect with mqtt.2030.ltsapis.goog:8883
I'm certain that the device ID and every other detail is correct. I suppose the root certificate is wrong.
I tried several methods to generate the root certificate, the most common one being the last certificate we get from after executing this command:
openssl s_client -showcerts -connect mqtt.2030.ltsapis.goog:8883
I also tried using any of the root certificate bytes for the certificates with Google Trust Services (GTS) as the certificate authority (CA). Using this command:
curl pki.goog/roots.pem
I'm also not able to specify a binary root cert static as given here: https://github.com/Nilhcem/esp32-cloud-iot-core-k8s/blob/master/02-esp32_bme280_ciotc_arduino/ciotc_config.h
However, they all give the same message. So my questions are:
- How to generate root certificate?
- How to specify a binary root cert static ?
- The example universal-lwmqtt form Google Cloud IoT Core JWT library specifies 2 root certificates, primary and backup. How to obtain those?