espressif / esp-google-iot

Google Cloud IoT SDK as an ESP-IDF Component
Apache License 2.0
143 stars 44 forks source link

iotc_create_iotcore_jwt returned with error: 71 (CA-3) #9

Open renakim opened 4 years ago

renakim commented 4 years ago

Hello, I set up the Google IoT core settings for the example and build successful. But after executing it with idf.py monitor command, the data does not come into IoT core. (IDF version: v4.0) I checked with ESP_LOGI and an error occurs in the function below.

...
I (5974) APP: Initializing SNTP
I (5974) APP: Waiting for system time to be set...
I (7984) APP: Time is set...
I (7984) gpio: GPIO[27]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (8094) mqtt_task: iotc_create_iotcore_jwt returned with error: 71l

The error code is IOTC_JWT_FORMATTION_ERROR. Could you check this problem?

meltdown03 commented 4 years ago

Check you Private Key, make sure it's correct and includes ------BEGIN EC PRIVATE KEY------ and ------END EC PRIVATE KEY----- and everything in-between

tomascharad commented 3 years ago

Hi! I have the same problem over here.

tomascharad commented 3 years ago

@meltdown03 , do you have any lights on what could be happening for testing other ways?

meltdown03 commented 3 years ago

No, sorry, I never got this error.

On Wed, Apr 28, 2021, 10:14 AM Tomás Charad @.***> wrote:

@meltdown03 https://github.com/meltdown03 , do you have any lights on what could be happening for testing other ways?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/espressif/esp-google-iot/issues/9#issuecomment-828538929, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPBQCAPRMM2DYUEQ7U7NQLTLAQ5RANCNFSM4JRQRYLA .

tomascharad commented 3 years ago

Hi! I was able to solve the problem by creating elliptic curve keys.