我尝试了一切,但每次我得到“连接失败” client.connect
。我已经使用了https://gorest.co.in/public-api/user/123
很好地使用了指纹。使用 ESP-12E 模块 任何指针都会有很大帮助
我从浏览器复制的指纹
#define TEST_HOST "gorest.co.in"
#define TEST_HOST_FINGERPRINT "f1 5f 90 b4 73 c5 98 1e ec 08 92 69 8c e5 28 f8 7f b3 a8 e8"
// Use WiFiClientSecure class to create TLS connection
WiFiClientSecure client;
Serial.print("connecting to ");
Serial.println(TEST_HOST);
Serial.printf("Using fingerprint '%s'\n", TEST_HOST_FINGERPRINT);
//client.setInsecure();
client.setFingerprint(TEST_HOST_FINGERPRINT);
client.setTimeout(10000);
if (!client.connect(TEST_HOST, 443)) {
Serial.println("connection failed");
return;
}