@@ -91,7 +91,37 @@ console, that configuration will be reflrected on the device.
91
91
Before the examples will work, you will also need to configure the root
92
92
certificate as described in the configuration headers.
93
93
94
+ ## Notes on the certificate
95
+
96
+ The [ root certificate from Google] ( https://pki.goog/roots/pem ) is used to verify communication to
97
+ Google. Although unlikely, it's possible for the certificate to expire or rotate, requiring you to
98
+ update it.
99
+
100
+ If you're using the ESP8266 project, you need to either install the Certificate to SPIFFS
101
+ using the [ SPIFFS upload utility] ( https://github.com/esp8266/arduino-esp8266fs-plugin ) or
102
+ will need to uncomment the certificate bytes in the sample. Note that the SPIFFS utility simply
103
+ uploads the files stored in the ** data** subfolder. The sample assumes the file is called ` ca.crt ` :
104
+
105
+ ├── Esp8266...
106
+ │ ├── data
107
+ │ │ └── ca.crt
108
+
109
+ To convert the certificate to the DER format, the following command shuold be used:
110
+
111
+ wget pki.goog/roots.pem
112
+ openssl x509 -outform der -in roots.pem -out ca.crt
113
+
114
+ If you're using the ESP32, you can paste the certificate bytes (don't forget the \n characters)
115
+ into the sample. You can use any of the root certificate bytes for the certificates with Google
116
+ Trust Services (GTS) as the certificate authority (CA). This is easy to get using curl, e.g.
117
+
118
+ curl pki.goog/roots.pem
119
+
120
+ If you're using Genuino boards like the MKR1000, you will need to add SSL certificates to your
121
+ board as [ described on Hackster.io] ( https://www.hackster.io/arichetta/add-ssl-certificates-to-mkr1000-93c89d ) .
122
+
94
123
## For more information
124
+
95
125
* [ Access Google Cloud IoT Core from Arduino] ( https://medium.com/@gguuss/accessing-cloud-iot-core-from-arduino-838c2138cf2b )
96
126
* [ Building Google Cloud-Connected Sensors] ( https://medium.com/@gguuss/building-google-cloud-connected-sensors-2d46a1c58012 )
97
127
* [ Arduino and Google Cloud IoT] ( https://medium.com/@gguuss/arduino-and-google-cloud-iot-e2082e0ac000 )
0 commit comments