Parcourir la source

Version 1.6.1

- fixed and updated GxEPD2_WiFi_Example
ZinggJM il y a 1 an
Parent
commit
95ba3d7280

+ 3 - 1
README.md

@@ -162,7 +162,9 @@
 - But only few panels at any time, and only panels from known sources. 
 - But only few panels at any time, and only panels from known sources. 
 - Adding support will take as much time as needed.
 - Adding support will take as much time as needed.
 
 
-### Version 1.6.0
+### Version 1.6.1
+- fixed and updated GxEPD2_WiFi_Example
+#### Version 1.6.0
 - updated support for GDEY029T94: fixed a partial refresh issue
 - updated support for GDEY029T94: fixed a partial refresh issue
 - updated support for GDEY042T81: fixed fast full refresh for 2024 panel version
 - updated support for GDEY042T81: fixed fast full refresh for 2024 panel version
 - updated support for GDEP073E01: fixed color mapping for its native color values
 - updated support for GDEP073E01: fixed color mapping for its native color values

+ 6 - 4
examples/GxEPD2_Spiffs_Loader/GxEPD2_Spiffs_Loader.ino

@@ -35,21 +35,20 @@ const char* ssid     = "........";
 const char* password = "........";
 const char* password = "........";
 const int httpPort  = 80;
 const int httpPort  = 80;
 const int httpsPort = 443;
 const int httpsPort = 443;
-const char* fp_api_github_com = "df b2 29 c6 a6 38 1a 59 9d c9 ad 92 2d 26 f5 3c 83 8f a5 87"; // as of 25.11.2020
-const char* fp_github_com     = "5f 3f 7a c2 56 9f 50 a4 66 76 47 c6 a1 8c a0 07 aa ed bb 8e"; // as of 25.11.2020
-const char* fp_rawcontent     = "70 94 de dd e6 c4 69 48 3a 92 70 a1 48 56 78 2d 18 64 e0 b7"; // as of 25.11.2020
 
 
 // note: the certificates have been moved to a separate header file, as R"CERT( destroys IDE Auto Format capability
 // note: the certificates have been moved to a separate header file, as R"CERT( destroys IDE Auto Format capability
 
 
 #include "GxEPD2_github_raw_certs.h"
 #include "GxEPD2_github_raw_certs.h"
 
 
-const char* certificate_rawcontent = cert_DigiCert_TLS_RSA_SHA256_2020_CA1; // ok, should work until 2031-04-13 23:59:59
+const char* certificate_rawcontent = github_io_pem;  // ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
 
 
 const char* host_rawcontent   = "raw.githubusercontent.com";
 const char* host_rawcontent   = "raw.githubusercontent.com";
 const char* path_rawcontent   = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
 const char* path_rawcontent   = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
+const char* path_workcontent  = "/ZinggJM/GxEPD2/work_in_progress/extras/bitmaps/";
 const char* path_prenticedavid   = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
 const char* path_prenticedavid   = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
 const char* path_waveshare_c  = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
 const char* path_waveshare_c  = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
 const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
 const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
+const char* fp_rawcontent     = "97:D8:C5:70:0F:12:24:6C:88:BC:FA:06:7E:8C:A7:4D:A8:62:67:28"; // SHA-1 as of 12.04.2024
 
 
 void setup()
 void setup()
 {
 {
@@ -150,6 +149,7 @@ void downloadBitmaps_other()
 
 
 void downloadBitmaps_test()
 void downloadBitmaps_test()
 {
 {
+  //downloadFile_HTTPS(host_rawcontent, path_workcontent, "z0gs/screenshot.bmp", fp_rawcontent, "screenshot.bmp"); return;
   downloadFile_HTTPS(host_rawcontent, path_rawcontent, "output5.bmp", fp_rawcontent, "output5.bmp");
   downloadFile_HTTPS(host_rawcontent, path_rawcontent, "output5.bmp", fp_rawcontent, "output5.bmp");
   downloadFile_HTTPS(host_rawcontent, path_rawcontent, "output6.bmp", fp_rawcontent, "output6.bmp");
   downloadFile_HTTPS(host_rawcontent, path_rawcontent, "output6.bmp", fp_rawcontent, "output6.bmp");
   downloadFile_HTTPS(host_rawcontent, path_rawcontent, "tractor_1.bmp", fp_rawcontent, "tractor_1.bmp");
   downloadFile_HTTPS(host_rawcontent, path_rawcontent, "tractor_1.bmp", fp_rawcontent, "tractor_1.bmp");
@@ -289,6 +289,8 @@ void downloadFile_HTTPS(const char* host, const char* path, const char* filename
   Serial.println(); Serial.print("downloading file \""); Serial.print(filename);  Serial.println("\"");
   Serial.println(); Serial.print("downloading file \""); Serial.print(filename);  Serial.println("\"");
   Serial.print("connecting to "); Serial.println(host);
   Serial.print("connecting to "); Serial.println(host);
 #if defined (ESP8266)
 #if defined (ESP8266)
+  client.setBufferSizes(4096, 4096); // required
+  //client.setBufferSizes(8192, 4096); // may help for some sites
   if (certificate) client.setTrustAnchors(&cert);
   if (certificate) client.setTrustAnchors(&cert);
   else if (fingerprint) client.setFingerprint(fingerprint);
   else if (fingerprint) client.setFingerprint(fingerprint);
   else client.setInsecure();
   else client.setInsecure();

+ 125 - 83
examples/GxEPD2_Spiffs_Loader/GxEPD2_github_raw_certs.h

@@ -1,3 +1,44 @@
+// how to find the certificate was not easy. finally I found it using Mozilla Firefox.
+// opened one of the bitmaps, e.g. https://raw.githubusercontent.com/ZinggJM/GxEPD2/master/extras/bitmaps/logo200x200.bmp
+// clicked the lock symbol, Connection secure clicked >, show connection details, clicked More Information, clicked View Certificate, clicked Download PEM (cert),
+// Opened the .pem file and copied the pem into R"CERT(...)CERT"; strings.
+// for https://raw.githubusercontent.com the pem works on ESP8266 and ESP32, if time is set from ntp.
+// but using a root certificate would preferred, as its validity may be longer. But this failed now.
+
+const char github_io_pem [] PROGMEM = R"CERT(
+-----BEGIN CERTIFICATE-----
+MIIEyDCCA7CgAwIBAgIQDPW9BitWAvR6uFAsI8zwZjANBgkqhkiG9w0BAQsFADBh
+MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
+MjAeFw0yMTAzMzAwMDAwMDBaFw0zMTAzMjkyMzU5NTlaMF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DAECAzANBgkqhkiG
+9w0BAQsFAAOCAQEAkPFwyyiXaZd8dP3A+iZ7U6utzWX9upwGnIrXWkOH7U1MVl+t
+wcW1BSAuWdH/SvWgKtiwla3JLko716f2b4gp/DA/JIS7w7d7kwcsr4drdjPtAFVS
+slme5LnQ89/nD/7d+MS5EHKBCQRfz5eeLjJ1js+aWNJXMX43AYGyZm0pGrFmCW3R
+bpD0ufovARTFXFZkAdl9h6g4U5+LXUZtXMYnhIHUfoyMo5tS58aI7Dd8KvvwVVo4
+chDYABPPTHPbqjc1qCmBaZx2vN4Ye5DUys/vZwP9BFohFrH/6j/f3IL16/RZkiMN
+JCqVJUzKoZHm1Lesh3Sz8W2jmdv51b2EQJ8HmA==
+-----END CERTIFICATE-----
+)CERT";
+
+// 12:04.2024: the following no longer works, needs further investigation
+// **********************************************************************
+
 // http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1-1.crt
 // http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1-1.crt
 // CN: DigiCert TLS RSA SHA256 2020 CA1 => name: DigiCert_TLS_RSA_SHA256_2020_CA1
 // CN: DigiCert TLS RSA SHA256 2020 CA1 => name: DigiCert_TLS_RSA_SHA256_2020_CA1
 // not valid before: 2021-04-14 00:00:00
 // not valid before: 2021-04-14 00:00:00
@@ -42,101 +83,102 @@ A7sKPPcw7+uvTPyLNhBzPvOk
 
 
 // https://raw.githubusercontent.com
 // https://raw.githubusercontent.com
 // issued by DigiCert Inc : DigiCert TLS RSA SHA256 2020 CA1
 // issued by DigiCert Inc : DigiCert TLS RSA SHA256 2020 CA1
-// not valid before: Fri, 18 Mar 2022 00:00:00 GMT
-// not valid after:  Tue, 21 Mar 2023 23:59:59 GMT
+// not valid before: Fri, 15 Mar 2024 00:00:00 GMT
+// not valid after:  Fri, 14 Mar 2025 23:59:59 GMT
 const char github_io_chain_pem_first [] PROGMEM = R"CERT(
 const char github_io_chain_pem_first [] PROGMEM = R"CERT(
 -----BEGIN CERTIFICATE-----
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AAAQDAEcwRQIgU/M527Wcx0KQ3II7kCuG5WMuOHRSxKkf1xAj
+JuSkyPACIQCVX0uurcIA2Ug7ipNN2S1ZygukWqJCh7hjIH0XsrXh8QB2AH1ZHhLh
+eCp7HGFnfF79+NCHXBSgTpWeuQMv2Q6MLnm4AAABjkN89oEAAAQDAEcwRQIgCxpL
+BDak+TWKarrCHlZn4DlqwEfAN3lvlgSo21HQuU8CIQDicrb72c0lA2suMWPWT92P
+FLaRvFrFn9HVzI6Vh50YZgB3AObSMWNAd4zBEEEG13G5zsHSQPaWhIb7uocyHf0e
+N45QAAABjkN89pQAAAQDAEgwRgIhAPJQX4QArFCjM0sKKzsWLmqmmU8lMhKEYR2T
+ges1AQyQAiEA2Y3VhP5RG+dapcbwYgVbrTlgWzO7KE/lg1x11CVcz3QwDQYJKoZI
+hvcNAQELBQADggEBAHKlvzObJBxxgyLaUNCEFf37mNFsUtXmaWvkmcfIt9V+TZ7Q
+mtvjx5bsd5lqAflp/eqk4+JYpnYcKWrZfM/vMdxPQTeh/VQWewY/hYn6X/V1s2JI
+MtjqEkW4aotVdWjHVvsx4rAjz5vtub/wVYgtrU8jusH3TVpT9/0AoFhKE5m2IS7M
+Ig7wKR+DDxoNj4fFFluxteVNgbtwuJcb23NkBQqfHXCvQWqxXZZA4Nwl/WoGPoGG
+dW5qVOc3BlhtITW53ASyhvKC7HArhj7LwQH8C/dRgn1agIHP9vVJ1NaZnPXhK98T
+ohv++OO0E/F/bVGNWVnLBQ4v5PjQzRQUTGvM2mU=
 -----END CERTIFICATE-----
 -----END CERTIFICATE-----
 )CERT";
 )CERT";
 const char github_io_chain_pem_second [] PROGMEM = R"CERT(
 const char github_io_chain_pem_second [] PROGMEM = R"CERT(
 -----BEGIN CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
-MIIEvjCCA6agAwIBAgIQBtjZBNVYQ0b2ii+nVCJ+xDANBgkqhkiG9w0BAQsFADBh
+MIIEyDCCA7CgAwIBAgIQDPW9BitWAvR6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ABPPTHPbqjc1qCmBaZx2vN4Ye5DUys/vZwP9BFohFrH/6j/f3IL16/RZkiMN
+JCqVJUzKoZHm1Lesh3Sz8W2jmdv51b2EQJ8HmA==
 -----END CERTIFICATE-----
 -----END CERTIFICATE-----
 )CERT";
 )CERT";
 const char github_io_chain_pem_third [] PROGMEM = R"CERT(
 const char github_io_chain_pem_third [] PROGMEM = R"CERT(
 -----BEGIN CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
-MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
+MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
-QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
+d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
+MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
 MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
 MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
-b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
-CSDMAZOnTjC3U/dDxG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9PIUkY92eQ
+q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz
+tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ
+vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV
+5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY
+1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4
+NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG
+Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
+8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
+pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
+MrY=
 -----END CERTIFICATE-----
 -----END CERTIFICATE-----
 )CERT";
 )CERT";

+ 62 - 76
examples/GxEPD2_WiFi_CertStore_Example/GxEPD2_WiFi_CertStore_Example.ino

@@ -81,6 +81,7 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_BS // DEPG0290BS  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_BS // DEPG0290BS  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_M06 // GDEW029M06  128x296, UC8151D, (WFT0290CZ10)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_M06 // GDEW029M06  128x296, UC8151D, (WFT0290CZ10)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_GDEY029T94 // GDEY029T94 128x296, SSD1680, (FPC-A005 20.06.15)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_GDEY029T94 // GDEY029T94 128x296, SSD1680, (FPC-A005 20.06.15)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_290_GDEY029T71H // GDEY029T71H 168x384, SSD1685, (FPC-H004 22.03.24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_310_GDEQ031T10 // GDEQ031T10 240x320, UC8253, (no inking, backside mark KEGMO 3100)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_310_GDEQ031T10 // GDEQ031T10 240x320, UC8253, (no inking, backside mark KEGMO 3100)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_371     // GDEW0371W7  240x416, UC8171 (IL0324), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_371     // GDEW0371W7  240x416, UC8171 (IL0324), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_370_TC1 // ED037TC1  280x480, SSD1677, (ICA-FU-20 ichia 2029), Waveshare 3.7"
 //#define GxEPD2_DRIVER_CLASS GxEPD2_370_TC1 // ED037TC1  280x480, SSD1677, (ICA-FU-20 ichia 2029), Waveshare 3.7"
@@ -90,6 +91,7 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_GYE042A87  // GYE042A87, 400x300, SSD1683 (HINK-E042-A07-FPC-A1)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_GYE042A87  // GYE042A87, 400x300, SSD1683 (HINK-E042-A07-FPC-A1)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_SE0420NQ04 // SE0420NQ04, 400x300, UC8276C (OPM042A2_V1.0)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_SE0420NQ04 // SE0420NQ04, 400x300, UC8276C (OPM042A2_V1.0)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_426_GDEQ0426T82 // GDEQ0426T82 480x800, SSD1677 (P426010-MF1-A)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_426_GDEQ0426T82 // GDEQ0426T82 480x800, SSD1677 (P426010-MF1-A)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_579_GDEY0579T93 // GDEY0579T93 792x272, SSD1683 (FPC-E004 22.04.13)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583     // GDEW0583T7  600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583     // GDEW0583T7  600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_T8  // GDEW0583T8  648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_T8  // GDEW0583T8  648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_GDEQ0583T31 // GDEQ0583T31  648x480, UC8179, (P583010-MF1-B)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_GDEQ0583T31 // GDEQ0583T31  648x480, UC8179, (P583010-MF1-B)
@@ -97,6 +99,7 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_T7  // GDEW075T7   800x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_T7  // GDEW075T7   800x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_GDEY075T7  // GDEY075T7  800x480, UC8179 (GD7965), (FPC-C001 20.08.20)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_GDEY075T7  // GDEY075T7  800x480, UC8179 (GD7965), (FPC-C001 20.08.20)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1020_GDEM102T91 // GDEM102T91 960x640, SSD1677, (FPC7705 REV.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1020_GDEM102T91 // GDEM102T91 960x640, SSD1677, (FPC7705 REV.b)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_1085_GDEM1085T51 // GDEM1085T51 1360x480, JD79686AB, (FPC8617) *** needs CS2 ***
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1160_T91 // GDEH116T91 960x640, SSD1677, (none or hidden)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1160_T91 // GDEH116T91 960x640, SSD1677, (none or hidden)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248     // GDEW1248T3 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248     // GDEW1248T3 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330_GDEM133T91 // GDEM133T91 960x680, SSD1677, (FPC-7701 REV.B)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330_GDEM133T91 // GDEM133T91 960x680, SSD1677, (FPC-7701 REV.B)
@@ -113,6 +116,8 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_C90c // GDEM029C90  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_C90c // GDEM029C90  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c     // GDEW042Z15  400x300, UC8176 (IL0398), (WFT0420CZ15)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c     // GDEW042Z15  400x300, UC8176 (IL0398), (WFT0420CZ15)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_Z21 // GDEQ042Z21  400x300, UC8276, (hidden)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_Z21 // GDEQ042Z21  400x300, UC8276, (hidden)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_420c_GDEY042Z98 // GDEY042Z98 400x300, SSD1683 (no inking)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_579c_GDEY0579Z93 // GDEY0579Z93 792x272, SSD1683 (FPC-E004 22.04.13)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c     // GDEW0583Z21 600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c     // GDEW0583Z21 600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_Z83 // GDEW0583Z83 648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_Z83 // GDEW0583Z83 648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_GDEQ0583Z31 // GDEQ0583Z31 648x480, UC8179C, 
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_GDEQ0583Z31 // GDEQ0583Z31 648x480, UC8179C, 
@@ -123,15 +128,20 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248c    // GDEY1248Z51 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248c    // GDEY1248Z51 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330c_GDEM133Z91 // GDEM133Z91 960x680, SSD1677 (FPC-7701 REV.B)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330c_GDEM133Z91 // GDEM133Z91 960x680, SSD1677 (FPC-7701 REV.B)
 // 4-color e-paper
 // 4-color e-paper
+//#define GxEPD2_DRIVER_CLASS GxEPD2_213c_GDEY0213F51 // GDEY0213F51 122x250, JD79661 (FPC-A002 20.04.08)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_266c_GDEY0266F51H // GDEY0266F51H 184x360, JD79667 (FPC-H006 22.04.02)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_266c_GDEY0266F51H // GDEY0266F51H 184x360, JD79667 (FPC-H006 22.04.02)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290c_GDEY029F51H // GDEY029F51H 168x384, JD79667 (FPC-H004 22.03.24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290c_GDEY029F51H // GDEY029F51H 168x384, JD79667 (FPC-H004 22.03.24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_300c     // Waveshare 3.00" 4-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_300c     // Waveshare 3.00" 4-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_GDEY0420F51 // GDEY0420F51 400x300, HX8717 (no inking)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_GDEY0420F51 // GDEY0420F51 400x300, HX8717 (no inking)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_437c     // Waveshare 4.37" 4-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_437c     // Waveshare 4.37" 4-color
+//#define GxEPD2_DRIVER_CLASS GxEPD2_0579c_GDEY0579F51 // GDEY0579F51 792x272, HX8717 (FPC-E009 22.09.25)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_1160c_GDEY116F51 // GDEY116F51 960x640, SSD2677, (FPC-K012 23.09.27)
 // 7-color e-paper
 // 7-color e-paper
 //#define GxEPD2_DRIVER_CLASS GxEPD2_565c // Waveshare 5.65" 7-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_565c // Waveshare 5.65" 7-color
+//#define GxEPD2_DRIVER_CLASS GxEPD2_565c_GDEP0565D90 // GDEP0565D90 600x448 7-color (E219454, AB1024-EGA AC0750TC1)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_GDEY073D46 // GDEY073D46 800x480 7-color, (N-FPC-001 2021.11.26)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_GDEY073D46 // GDEY073D46 800x480 7-color, (N-FPC-001 2021.11.26)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_ACeP_730 // Waveshare 7.3" 7-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_ACeP_730 // Waveshare 7.3" 7-color
+//#define GxEPD2_DRIVER_CLASS GxEPD2_730c_GDEP073E01 // GDEP073E01 800x480 7-color, (E350911HF 94V-0 F-6 ROHS 24141)
 // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
 // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60           // ED060SCT 800x600
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60           // ED060SCT 800x600
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072
@@ -159,9 +169,7 @@
 #define IS_GxEPD2_1248c(x) IS_GxEPD(GxEPD2_1248c_IS_, x)
 #define IS_GxEPD2_1248c(x) IS_GxEPD(GxEPD2_1248c_IS_, x)
 
 
 #if defined (ESP8266)
 #if defined (ESP8266)
-#define MAX_DISPLAY_BUFFER_SIZE (81920ul-34000ul-38000ul) // ~34000 base use, WiFiClientSecure seems to need about 38k more to work (with CertStore)
-// for site people.math.sc.edu an increased RX buffer is required for timely decodes, client.setBufferSizes(8192, 4096); // may help. needs more space:
-//#define MAX_DISPLAY_BUFFER_SIZE (81920ul-34000ul-38000ul) // ~34000 base use, WiFiClientSecure seems to need about 38k more to work (with CertStore)
+#define MAX_DISPLAY_BUFFER_SIZE (81920ul-34000ul-40000ul) // ~34000 base use, WiFiClientSecure seems to need about 40k more to work (with CertStore)
 #if IS_GxEPD2_BW(GxEPD2_DISPLAY_CLASS)
 #if IS_GxEPD2_BW(GxEPD2_DISPLAY_CLASS)
 #define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
 #define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
 #elif IS_GxEPD2_3C(GxEPD2_DISPLAY_CLASS) || IS_GxEPD2_4C(GxEPD2_DISPLAY_CLASS)
 #elif IS_GxEPD2_3C(GxEPD2_DISPLAY_CLASS) || IS_GxEPD2_4C(GxEPD2_DISPLAY_CLASS)
@@ -217,40 +225,44 @@ GxEPD2_DISPLAY_CLASS < GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS) > di
 #include <time.h>
 #include <time.h>
 #include <FS.h>
 #include <FS.h>
 #include <LittleFS.h>
 #include <LittleFS.h>
+#else
+#include <WiFi.h>
 #endif
 #endif
 
 
 #include <WiFiClient.h>
 #include <WiFiClient.h>
 #include <WiFiClientSecure.h>
 #include <WiFiClientSecure.h>
 
 
-#if defined (ESP8266)
-// A single, global CertStore which can be used by all
-// connections.  Needs to stay live the entire time any of
-// the WiFiClientBearSSLs are present.
-BearSSL::CertStore certStore;
-const char* certificate_rawcontent = 0;
-#else
-#include "GxEPD2_github_raw_certs.h"
-const char* certificate_rawcontent = cert_DigiCert_TLS_RSA_SHA256_2020_CA1;
-#pragma GCC warning "no CertStore for this target"
-//#warning "no CertStore for this target"
-#endif
-
 const char* ssid     = "........";
 const char* ssid     = "........";
 const char* password = "........";
 const char* password = "........";
 const int httpPort  = 80;
 const int httpPort  = 80;
 const int httpsPort = 443;
 const int httpsPort = 443;
 
 
-const char* fp_rawcontent     = "97:D8:C5:70:0F:12:24:6C:88:BC:FA:06:7E:8C:A7:4D:A8:62:67:28"; // SHA-1 as of 12.04.2024
+// note: the certificates have been moved to a separate header file, as R"CERT( destroys IDE Auto Format capability
+#include "GxEPD2_github_raw_certs.h"
+const char* certificate_rawcontent = github_io_pem;  // ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
 
 
 const char* host_rawcontent   = "raw.githubusercontent.com";
 const char* host_rawcontent   = "raw.githubusercontent.com";
 const char* path_rawcontent   = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
 const char* path_rawcontent   = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
+const char* path_workcontent  = "/ZinggJM/GxEPD2/work_in_progress/extras/bitmaps/";
 const char* path_prenticedavid   = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
 const char* path_prenticedavid   = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
 const char* path_waveshare_c  = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
 const char* path_waveshare_c  = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
 const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
 const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
-const char* path_Burkardt     = "https://people.math.sc.edu/Burkardt/data/bmp/";
+const char* fp_rawcontent     = "97:D8:C5:70:0F:12:24:6C:88:BC:FA:06:7E:8C:A7:4D:A8:62:67:28"; // SHA-1 as of 12.04.2024
+
+//const char* path_Burkardt     = "https://people.math.sc.edu/Burkardt/data/bmp/";
+const char* path_Burkardt     = "/Burkardt/data/bmp/";
 const char* fp_people_cas     = "99:6C:B7:72:CC:ED:96:82:49:2D:B2:78:71:00:14:BA:02:8E:FF:BF";
 const char* fp_people_cas     = "99:6C:B7:72:CC:ED:96:82:49:2D:B2:78:71:00:14:BA:02:8E:FF:BF";
 const char* host_people_cas_sc_edu = "people.math.sc.edu";
 const char* host_people_cas_sc_edu = "people.math.sc.edu";
 
 
+#if defined (ESP8266)
+// A single, global CertStore which can be used by all
+// connections.  Needs to stay live the entire time any of
+// the WiFiClientBearSSLs are present.
+BearSSL::CertStore certStore;
+#else
+#pragma GCC warning "no CertStore for this target"
+#endif
+
 // note that BMP bitmaps are drawn at physical position in physical orientation of the screen
 // note that BMP bitmaps are drawn at physical position in physical orientation of the screen
 void showBitmapFrom_HTTP(const char* host, const char* path, const char* filename, int16_t x, int16_t y, bool with_color = true);
 void showBitmapFrom_HTTP(const char* host, const char* path, const char* filename, int16_t x, int16_t y, bool with_color = true);
 void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filename, const char* fingerprint, int16_t x, int16_t y, bool with_color = true,
 void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filename, const char* fingerprint, int16_t x, int16_t y, bool with_color = true,
@@ -267,7 +279,8 @@ void setup()
   Serial.println();
   Serial.println();
   Serial.println("GxEPD2_WiFi_Example");
   Serial.println("GxEPD2_WiFi_Example");
 
 
-  display.init(115200);
+  //display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
+  display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
 
 
 #ifdef REMAP_SPI_FOR_WAVESHARE_ESP32_DRIVER_BOARD
 #ifdef REMAP_SPI_FOR_WAVESHARE_ESP32_DRIVER_BOARD
   SPI.end(); // release standard SPI pins, e.g. SCK(18), MISO(19), MOSI(23), SS(5)
   SPI.end(); // release standard SPI pins, e.g. SCK(18), MISO(19), MOSI(23), SS(5)
@@ -283,26 +296,11 @@ void setup()
     delay(1000);
     delay(1000);
   }
   }
 
 
-#ifdef RE_INIT_NEEDED
-  WiFi.persistent(true);
+  Serial.println();
   WiFi.mode(WIFI_STA); // switch off AP
   WiFi.mode(WIFI_STA); // switch off AP
-  WiFi.setAutoConnect(true);
-  WiFi.setAutoReconnect(true);
-  WiFi.disconnect();
-#endif
-
-  if (!WiFi.getAutoConnect() || ( WiFi.getMode() != WIFI_STA) || ((WiFi.SSID() != ssid) && String(ssid) != "........"))
-  {
-    Serial.println();
-    Serial.print("WiFi.getAutoConnect()=");
-    Serial.println(WiFi.getAutoConnect());
-    Serial.print("WiFi.SSID()=");
-    Serial.println(WiFi.SSID());
-    WiFi.mode(WIFI_STA); // switch off AP
-    Serial.print("Connecting to ");
-    Serial.println(ssid);
-    WiFi.begin(ssid, password);
-  }
+  Serial.print("Connecting to ");
+  Serial.println(ssid);
+  WiFi.begin(ssid, password);
   int ConnectTimeout = 60; // 30 seconds
   int ConnectTimeout = 60; // 30 seconds
   while (WiFi.status() != WL_CONNECTED)
   while (WiFi.status() != WL_CONNECTED)
   {
   {
@@ -388,8 +386,8 @@ void drawBitmaps_other()
 {
 {
   int16_t w2 = display.width() / 2;
   int16_t w2 = display.width() / 2;
   int16_t h2 = display.height() / 2;
   int16_t h2 = display.height() / 2;
-  showBitmapFrom_HTTP("www.packescape.com", "/img/assets/", "IniciMenusTV2.bmp", w2 - 200, h2 - 150, false);
-  delay(2000);
+  //showBitmapFrom_HTTP("www.packescape.com", "/img/assets/", "IniciMenusTV2.bmp", w2 - 200, h2 - 150, false);
+  //delay(2000);
   showBitmapFrom_HTTP("www.squix.org", "/blog/wunderground/", "chanceflurries.bmp", w2 - 50, h2 - 50, false);
   showBitmapFrom_HTTP("www.squix.org", "/blog/wunderground/", "chanceflurries.bmp", w2 - 50, h2 - 50, false);
   delay(2000);
   delay(2000);
   showBitmapFrom_HTTPS(host_rawcontent, path_prenticedavid, "betty_1.bmp", fp_rawcontent, w2 - 100, h2 - 160);
   showBitmapFrom_HTTPS(host_rawcontent, path_prenticedavid, "betty_1.bmp", fp_rawcontent, w2 - 100, h2 - 160);
@@ -419,10 +417,11 @@ void drawBitmaps_other()
 void drawBitmaps_test()
 void drawBitmaps_test()
 {
 {
 #if defined (ESP8266)
 #if defined (ESP8266)
-  showBitmapFrom_HTTPS_Buffered(host_people_cas_sc_edu, path_Burkardt, "lena.bmp", 0, 0, 0, true, 0); // connection ok with CertStore
+  //showBitmapFrom_HTTPS(host_people_cas_sc_edu, path_Burkardt, "lena.bmp", 0, 0, 0, true, 0); // connection not ok with CertStore, needs be updated
 #endif
 #endif
   int16_t w2 = display.width() / 2;
   int16_t w2 = display.width() / 2;
   int16_t h2 = display.height() / 2;
   int16_t h2 = display.height() / 2;
+  //showBitmapFrom_HTTPS(host_rawcontent, path_workcontent, "z0gs/screenshot.bmp", fp_rawcontent, 0, 0); delay(2000); return;
   showBitmapFrom_HTTPS(host_rawcontent, path_prenticedavid, "betty_4.bmp", fp_rawcontent, w2 - 102, h2 - 126);
   showBitmapFrom_HTTPS(host_rawcontent, path_prenticedavid, "betty_4.bmp", fp_rawcontent, w2 - 102, h2 - 126);
   delay(2000);
   delay(2000);
   showBitmapFrom_HTTPS(host_rawcontent, path_rawcontent, "output5.bmp", fp_rawcontent, 0, 0);
   showBitmapFrom_HTTPS(host_rawcontent, path_rawcontent, "output5.bmp", fp_rawcontent, 0, 0);
@@ -515,13 +514,18 @@ void drawBitmapsBuffered_7C()
     delay(2000);
     delay(2000);
     showBitmapFrom_HTTPS_Buffered(host_rawcontent, path_waveshare_py, "N-Color1.bmp", fp_rawcontent, 0, 0);
     showBitmapFrom_HTTPS_Buffered(host_rawcontent, path_waveshare_py, "N-Color1.bmp", fp_rawcontent, 0, 0);
     delay(2000);
     delay(2000);
+
+    showBitmapFrom_HTTPS_Buffered(host_rawcontent, path_rawcontent, "displayed_bmp_small_but_padded.bmp", fp_rawcontent, 0, 0);
+    delay(2000);
+    showBitmapFrom_HTTPS_Buffered(host_rawcontent, path_rawcontent, "displayed_bmp_large.bmp", fp_rawcontent, 0, 0);
+    delay(2000);
   }
   }
 }
 }
 
 
 void drawBitmapsBuffered_test()
 void drawBitmapsBuffered_test()
 {
 {
 #if defined (ESP8266)
 #if defined (ESP8266)
-  showBitmapFrom_HTTPS_Buffered(host_people_cas_sc_edu, path_Burkardt, "lena.bmp", 0, 0, 0, true, 0); // connection ok with CertStore
+  //showBitmapFrom_HTTPS_Buffered(host_people_cas_sc_edu, path_Burkardt, "lena.bmp", 0, 0, 0, true, 0); // connection not ok with CertStore, needs be updated
 #endif
 #endif
   int16_t w2 = display.width() / 2;
   int16_t w2 = display.width() / 2;
   int16_t h2 = display.height() / 2;
   int16_t h2 = display.height() / 2;
@@ -530,6 +534,7 @@ void drawBitmapsBuffered_test()
 }
 }
 
 
 static const uint16_t input_buffer_pixels = 800; // may affect performance
 static const uint16_t input_buffer_pixels = 800; // may affect performance
+//static const uint16_t input_buffer_pixels = 960; // may affect performance
 
 
 static const uint16_t max_row_width = 1872; // for up to 7.8" display 1872x1404
 static const uint16_t max_row_width = 1872; // for up to 7.8" display 1872x1404
 static const uint16_t max_palette_pixels = 256; // for depth <= 8
 static const uint16_t max_palette_pixels = 256; // for depth <= 8
@@ -570,10 +575,8 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -603,7 +606,7 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -628,7 +631,6 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
         if (depth <= 8)
         if (depth <= 8)
         {
         {
           if (depth < 8) bitmask >>= depth;
           if (depth < 8) bitmask >>= depth;
-          //bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           {
           {
@@ -647,7 +649,6 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
         }
         }
         display.clearScreen();
         display.clearScreen();
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
-        //Serial.print("skip "); Serial.println(rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         {
         {
@@ -680,6 +681,7 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -809,10 +811,8 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -842,7 +842,7 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -867,7 +867,6 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
         if (depth <= 8)
         if (depth <= 8)
         {
         {
           if (depth < 8) bitmask >>= depth;
           if (depth < 8) bitmask >>= depth;
-          //bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           {
           {
@@ -888,7 +887,6 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
           }
           }
         }
         }
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
-        //Serial.print("skip "); Serial.println(rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         {
         {
@@ -919,6 +917,7 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -1032,8 +1031,9 @@ void showBitmapFrom_HTTP_Buffered(const char* host, const char* path, const char
 void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filename, const char* fingerprint, int16_t x, int16_t y, bool with_color, const char* certificate)
 void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filename, const char* fingerprint, int16_t x, int16_t y, bool with_color, const char* certificate)
 {
 {
   // Use WiFiClientSecure class to create TLS connection
   // Use WiFiClientSecure class to create TLS connection
-#if defined (ESP8266)
+#if defined (ESP8266) || defined(ARDUINO_RASPBERRY_PI_PICO_W)
   BearSSL::WiFiClientSecure client;
   BearSSL::WiFiClientSecure client;
+  //BearSSL::X509List cert(certificate ? certificate : certificate_rawcontent);
 #else
 #else
   WiFiClientSecure client;
   WiFiClientSecure client;
 #endif
 #endif
@@ -1044,9 +1044,7 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
   if ((x >= display.epd2.WIDTH) || (y >= display.epd2.HEIGHT)) return;
   if ((x >= display.epd2.WIDTH) || (y >= display.epd2.HEIGHT)) return;
   Serial.println(); Serial.print("downloading file \""); Serial.print(filename);  Serial.println("\"");
   Serial.println(); Serial.print("downloading file \""); Serial.print(filename);  Serial.println("\"");
   Serial.print("connecting to "); Serial.println(host);
   Serial.print("connecting to "); Serial.println(host);
-#if defined (ESP8266)
-  //client.setBufferSizes(4096, 4096); // required
-  client.setBufferSizes(8192, 4096); // may help for some sites
+#if defined (ESP8266) || defined(ARDUINO_RASPBERRY_PI_PICO_W)
   client.setCertStore(&certStore);
   client.setCertStore(&certStore);
 #elif defined (ESP32)
 #elif defined (ESP32)
   if (certificate) client.setCACert(certificate);
   if (certificate) client.setCACert(certificate);
@@ -1070,10 +1068,8 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -1082,7 +1078,6 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
   }
   }
   if (!connection_ok) return;
   if (!connection_ok) return;
   // Parse BMP header
   // Parse BMP header
-  //if (read16(client) == 0x4D42) // BMP signature
   uint16_t signature = 0;
   uint16_t signature = 0;
   for (int16_t i = 0; i < 50; i++)
   for (int16_t i = 0; i < 50; i++)
   {
   {
@@ -1102,8 +1097,6 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
     uint16_t depth = read16(client); // bits per pixel
     uint16_t depth = read16(client); // bits per pixel
     uint32_t format = read32(client);
     uint32_t format = read32(client);
     uint32_t bytes_read = 7 * 4 + 3 * 2; // read so far
     uint32_t bytes_read = 7 * 4 + 3 * 2; // read so far
-    //Serial.print("planes: "); Serial.println(planes);
-    //Serial.print("format: "); Serial.println(format);
     if ((planes == 1) && ((format == 0) || (format == 3))) // uncompressed is handled, 565 also
     if ((planes == 1) && ((format == 0) || (format == 3))) // uncompressed is handled, 565 also
     {
     {
       Serial.print("File size: "); Serial.println(fileSize);
       Serial.print("File size: "); Serial.println(fileSize);
@@ -1113,7 +1106,7 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -1191,6 +1184,7 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -1293,6 +1287,7 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
   // Use WiFiClientSecure class to create TLS connection
   // Use WiFiClientSecure class to create TLS connection
 #if defined (ESP8266)
 #if defined (ESP8266)
   BearSSL::WiFiClientSecure client;
   BearSSL::WiFiClientSecure client;
+  //BearSSL::X509List cert(certificate ? certificate : certificate_rawcontent);
 #else
 #else
   WiFiClientSecure client;
   WiFiClientSecure client;
 #endif
 #endif
@@ -1305,8 +1300,6 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
   display.fillScreen(GxEPD_WHITE);
   display.fillScreen(GxEPD_WHITE);
   Serial.print("connecting to "); Serial.println(host);
   Serial.print("connecting to "); Serial.println(host);
 #if defined (ESP8266)
 #if defined (ESP8266)
-  //client.setBufferSizes(4096, 4096); // required
-  client.setBufferSizes(8192, 4096); // may help
   client.setCertStore(&certStore);
   client.setCertStore(&certStore);
 #elif defined (ESP32)
 #elif defined (ESP32)
   if (certificate) client.setCACert(certificate);
   if (certificate) client.setCACert(certificate);
@@ -1330,10 +1323,8 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -1342,18 +1333,12 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
   }
   }
   if (!connection_ok) return;
   if (!connection_ok) return;
   // Parse BMP header
   // Parse BMP header
-  //if (read16(client) == 0x4D42) // BMP signature
   uint16_t signature = 0;
   uint16_t signature = 0;
   for (int16_t i = 0; i < 50; i++)
   for (int16_t i = 0; i < 50; i++)
   {
   {
     if (!client.available()) delay(100);
     if (!client.available()) delay(100);
     else signature = read16(client);
     else signature = read16(client);
-    //Serial.print("signature: 0x"); Serial.println(signature, HEX);
-    if (signature == 0x4D42)
-    {
-      //Serial.print("signature wait loops: "); Serial.println(i);
-      break;
-    }
+    if (signature == 0x4D42) break;
   }
   }
   if (signature == 0x4D42) // BMP signature
   if (signature == 0x4D42) // BMP signature
   {
   {
@@ -1376,7 +1361,7 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -1453,6 +1438,7 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -1596,7 +1582,7 @@ uint32_t skip(BearSSL::WiFiClientSecure& client, int32_t bytes)
       client.read();
       client.read();
       remain--;
       remain--;
     }
     }
-    else delay(1);
+    else delay(10);
     if (millis() - start > 2000) break; // don't hang forever
     if (millis() - start > 2000) break; // don't hang forever
   }
   }
   return bytes - remain;
   return bytes - remain;
@@ -1614,7 +1600,7 @@ uint32_t read8n(BearSSL::WiFiClientSecure& client, uint8_t* buffer, int32_t byte
       *buffer++ = uint8_t(v);
       *buffer++ = uint8_t(v);
       remain--;
       remain--;
     }
     }
-    else delay(1);
+    else delay(10);
     if (millis() - start > 2000) break; // don't hang forever
     if (millis() - start > 2000) break; // don't hang forever
   }
   }
   return bytes - remain;
   return bytes - remain;

+ 36 - 58
examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino

@@ -76,6 +76,7 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_BS // DEPG0290BS  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_BS // DEPG0290BS  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_M06 // GDEW029M06  128x296, UC8151D, (WFT0290CZ10)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_M06 // GDEW029M06  128x296, UC8151D, (WFT0290CZ10)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_GDEY029T94 // GDEY029T94 128x296, SSD1680, (FPC-A005 20.06.15)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_GDEY029T94 // GDEY029T94 128x296, SSD1680, (FPC-A005 20.06.15)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_290_GDEY029T71H // GDEY029T71H 168x384, SSD1685, (FPC-H004 22.03.24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_310_GDEQ031T10 // GDEQ031T10 240x320, UC8253, (no inking, backside mark KEGMO 3100)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_310_GDEQ031T10 // GDEQ031T10 240x320, UC8253, (no inking, backside mark KEGMO 3100)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_371     // GDEW0371W7  240x416, UC8171 (IL0324), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_371     // GDEW0371W7  240x416, UC8171 (IL0324), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_370_TC1 // ED037TC1  280x480, SSD1677, (ICA-FU-20 ichia 2029), Waveshare 3.7"
 //#define GxEPD2_DRIVER_CLASS GxEPD2_370_TC1 // ED037TC1  280x480, SSD1677, (ICA-FU-20 ichia 2029), Waveshare 3.7"
@@ -85,6 +86,7 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_GYE042A87  // GYE042A87, 400x300, SSD1683 (HINK-E042-A07-FPC-A1)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_GYE042A87  // GYE042A87, 400x300, SSD1683 (HINK-E042-A07-FPC-A1)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_SE0420NQ04 // SE0420NQ04, 400x300, UC8276C (OPM042A2_V1.0)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420_SE0420NQ04 // SE0420NQ04, 400x300, UC8276C (OPM042A2_V1.0)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_426_GDEQ0426T82 // GDEQ0426T82 480x800, SSD1677 (P426010-MF1-A)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_426_GDEQ0426T82 // GDEQ0426T82 480x800, SSD1677 (P426010-MF1-A)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_579_GDEY0579T93 // GDEY0579T93 792x272, SSD1683 (FPC-E004 22.04.13)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583     // GDEW0583T7  600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583     // GDEW0583T7  600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_T8  // GDEW0583T8  648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_T8  // GDEW0583T8  648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_GDEQ0583T31 // GDEQ0583T31  648x480, UC8179, (P583010-MF1-B)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583_GDEQ0583T31 // GDEQ0583T31  648x480, UC8179, (P583010-MF1-B)
@@ -92,6 +94,7 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_T7  // GDEW075T7   800x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_T7  // GDEW075T7   800x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_GDEY075T7  // GDEY075T7  800x480, UC8179 (GD7965), (FPC-C001 20.08.20)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_750_GDEY075T7  // GDEY075T7  800x480, UC8179 (GD7965), (FPC-C001 20.08.20)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1020_GDEM102T91 // GDEM102T91 960x640, SSD1677, (FPC7705 REV.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1020_GDEM102T91 // GDEM102T91 960x640, SSD1677, (FPC7705 REV.b)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_1085_GDEM1085T51 // GDEM1085T51 1360x480, JD79686AB, (FPC8617) *** needs CS2 ***
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1160_T91 // GDEH116T91 960x640, SSD1677, (none or hidden)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1160_T91 // GDEH116T91 960x640, SSD1677, (none or hidden)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248     // GDEW1248T3 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248     // GDEW1248T3 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330_GDEM133T91 // GDEM133T91 960x680, SSD1677, (FPC-7701 REV.B)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330_GDEM133T91 // GDEM133T91 960x680, SSD1677, (FPC-7701 REV.B)
@@ -108,6 +111,8 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_C90c // GDEM029C90  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290_C90c // GDEM029C90  128x296, SSD1680, (FPC-7519 rev.b)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c     // GDEW042Z15  400x300, UC8176 (IL0398), (WFT0420CZ15)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c     // GDEW042Z15  400x300, UC8176 (IL0398), (WFT0420CZ15)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_Z21 // GDEQ042Z21  400x300, UC8276, (hidden)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_Z21 // GDEQ042Z21  400x300, UC8276, (hidden)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_420c_GDEY042Z98 // GDEY042Z98 400x300, SSD1683 (no inking)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_579c_GDEY0579Z93 // GDEY0579Z93 792x272, SSD1683 (FPC-E004 22.04.13)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c     // GDEW0583Z21 600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c     // GDEW0583Z21 600x448, UC8159c (IL0371), (missing)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_Z83 // GDEW0583Z83 648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_Z83 // GDEW0583Z83 648x480, EK79655 (GD7965), (WFT0583CZ61)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_GDEQ0583Z31 // GDEQ0583Z31 648x480, UC8179C, 
 //#define GxEPD2_DRIVER_CLASS GxEPD2_583c_GDEQ0583Z31 // GDEQ0583Z31 648x480, UC8179C, 
@@ -118,15 +123,20 @@
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248c    // GDEY1248Z51 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1248c    // GDEY1248Z51 1304x984, UC8179, (WFT1248BZ23,WFT1248BZ24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330c_GDEM133Z91 // GDEM133Z91 960x680, SSD1677 (FPC-7701 REV.B)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_1330c_GDEM133Z91 // GDEM133Z91 960x680, SSD1677 (FPC-7701 REV.B)
 // 4-color e-paper
 // 4-color e-paper
+//#define GxEPD2_DRIVER_CLASS GxEPD2_213c_GDEY0213F51 // GDEY0213F51 122x250, JD79661 (FPC-A002 20.04.08)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_266c_GDEY0266F51H // GDEY0266F51H 184x360, JD79667 (FPC-H006 22.04.02)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_266c_GDEY0266F51H // GDEY0266F51H 184x360, JD79667 (FPC-H006 22.04.02)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290c_GDEY029F51H // GDEY029F51H 168x384, JD79667 (FPC-H004 22.03.24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_290c_GDEY029F51H // GDEY029F51H 168x384, JD79667 (FPC-H004 22.03.24)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_300c     // Waveshare 3.00" 4-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_300c     // Waveshare 3.00" 4-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_GDEY0420F51 // GDEY0420F51 400x300, HX8717 (no inking)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_420c_GDEY0420F51 // GDEY0420F51 400x300, HX8717 (no inking)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_437c     // Waveshare 4.37" 4-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_437c     // Waveshare 4.37" 4-color
+//#define GxEPD2_DRIVER_CLASS GxEPD2_0579c_GDEY0579F51 // GDEY0579F51 792x272, HX8717 (FPC-E009 22.09.25)
+//#define GxEPD2_DRIVER_CLASS GxEPD2_1160c_GDEY116F51 // GDEY116F51 960x640, SSD2677, (FPC-K012 23.09.27)
 // 7-color e-paper
 // 7-color e-paper
 //#define GxEPD2_DRIVER_CLASS GxEPD2_565c // Waveshare 5.65" 7-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_565c // Waveshare 5.65" 7-color
+//#define GxEPD2_DRIVER_CLASS GxEPD2_565c_GDEP0565D90 // GDEP0565D90 600x448 7-color (E219454, AB1024-EGA AC0750TC1)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_GDEY073D46 // GDEY073D46 800x480 7-color, (N-FPC-001 2021.11.26)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_GDEY073D46 // GDEY073D46 800x480 7-color, (N-FPC-001 2021.11.26)
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_ACeP_730 // Waveshare 7.3" 7-color
 //#define GxEPD2_DRIVER_CLASS GxEPD2_730c_ACeP_730 // Waveshare 7.3" 7-color
+//#define GxEPD2_DRIVER_CLASS GxEPD2_730c_GDEP073E01 // GDEP073E01 800x480 7-color, (E350911HF 94V-0 F-6 ROHS 24141)
 // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
 // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60           // ED060SCT 800x600
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60           // ED060SCT 800x600
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072
 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072
@@ -239,6 +249,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 
 
 #if defined (ESP8266)
 #if defined (ESP8266)
 #include <ESP8266WiFi.h>
 #include <ESP8266WiFi.h>
+#else
+#include <WiFi.h>
 #endif
 #endif
 
 
 #include <WiFiClient.h>
 #include <WiFiClient.h>
@@ -255,13 +267,9 @@ const int httpsPort = 443;
 
 
 const char* certificate_rawcontent = github_io_pem;  // ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
 const char* certificate_rawcontent = github_io_pem;  // ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
 
 
-//const char* certificate_rawcontent = cert_DigiCert_TLS_RSA_SHA256_2020_CA1; // not ok, should work until 2031-04-13 23:59:59
-//const char* certificate_rawcontent = github_io_chain_pem_first;  // not ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
-//const char* certificate_rawcontent = github_io_chain_pem_second;  // ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
-//const char* certificate_rawcontent = github_io_chain_pem_third;  // not ok, should work until Fri, 14 Mar 2025 23:59:59 GMT
-
 const char* host_rawcontent   = "raw.githubusercontent.com";
 const char* host_rawcontent   = "raw.githubusercontent.com";
 const char* path_rawcontent   = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
 const char* path_rawcontent   = "/ZinggJM/GxEPD2/master/extras/bitmaps/";
+const char* path_workcontent   = "/ZinggJM/GxEPD2/work_in_progress/extras/bitmaps/";
 const char* path_prenticedavid   = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
 const char* path_prenticedavid   = "/prenticedavid/MCUFRIEND_kbv/master/extras/bitmaps/";
 const char* path_waveshare_c  = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
 const char* path_waveshare_c  = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/c/pic/";
 const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
 const char* path_waveshare_py = "/waveshare/e-Paper/master/RaspberryPi_JetsonNano/python/pic/";
@@ -310,32 +318,19 @@ void setup()
   //display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
   //display.init(115200); // default 10ms reset pulse, e.g. for bare panels with DESPI-C02
   display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
   display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
 
 
-#if defined (ESP8266) || defined (ESP32)
-#ifdef RE_INIT_NEEDED
-  WiFi.persistent(true);
-  WiFi.mode(WIFI_STA); // switch off AP
-  WiFi.setAutoConnect(true);
-  WiFi.setAutoReconnect(true);
-  WiFi.disconnect();
-#endif
-
-  if (!WiFi.getAutoConnect() || ( WiFi.getMode() != WIFI_STA) || ((WiFi.SSID() != ssid) && String(ssid) != "........"))
+  if (display.pages() > 1)
   {
   {
+    delay(100);
     Serial.println();
     Serial.println();
-    Serial.print("WiFi.getAutoConnect() = ");
-    Serial.println(WiFi.getAutoConnect());
-    Serial.print("WiFi.SSID() = ");
-    Serial.println(WiFi.SSID());
-    WiFi.mode(WIFI_STA); // switch off AP
-    Serial.print("Connecting to ");
-    Serial.println(ssid);
-    WiFi.begin(ssid, password);
+    Serial.print("pages = "); Serial.print(display.pages()); Serial.print(" page height = "); Serial.println(display.pageHeight());
+    delay(1000);
   }
   }
-#else
-    Serial.print("Connecting to ");
-    Serial.println(ssid);
-    WiFi.begin(ssid, password);
-#endif
+
+  Serial.println();
+  WiFi.mode(WIFI_STA); // switch off AP
+  Serial.print("Connecting to ");
+  Serial.println(ssid);
+  WiFi.begin(ssid, password);
   int ConnectTimeout = 60; // 30 seconds
   int ConnectTimeout = 60; // 30 seconds
   while (WiFi.status() != WL_CONNECTED)
   while (WiFi.status() != WL_CONNECTED)
   {
   {
@@ -439,6 +434,7 @@ void drawBitmaps_test()
 {
 {
   int16_t w2 = display.width() / 2;
   int16_t w2 = display.width() / 2;
   int16_t h2 = display.height() / 2;
   int16_t h2 = display.height() / 2;
+  //showBitmapFrom_HTTPS(host_rawcontent, path_workcontent, "z0gs/screenshot.bmp", fp_rawcontent, 0, 0); delay(2000); return;
   showBitmapFrom_HTTPS(host_rawcontent, path_prenticedavid, "betty_4.bmp", fp_rawcontent, w2 - 102, h2 - 126);
   showBitmapFrom_HTTPS(host_rawcontent, path_prenticedavid, "betty_4.bmp", fp_rawcontent, w2 - 102, h2 - 126);
   delay(2000);
   delay(2000);
   showBitmapFrom_HTTPS(host_rawcontent, path_rawcontent, "output5.bmp", fp_rawcontent, 0, 0);
   showBitmapFrom_HTTPS(host_rawcontent, path_rawcontent, "output5.bmp", fp_rawcontent, 0, 0);
@@ -548,6 +544,7 @@ void drawBitmapsBuffered_test()
 }
 }
 
 
 static const uint16_t input_buffer_pixels = 800; // may affect performance
 static const uint16_t input_buffer_pixels = 800; // may affect performance
+//static const uint16_t input_buffer_pixels = 960; // may affect performance
 
 
 static const uint16_t max_row_width = 1872; // for up to 7.8" display 1872x1404
 static const uint16_t max_row_width = 1872; // for up to 7.8" display 1872x1404
 static const uint16_t max_palette_pixels = 256; // for depth <= 8
 static const uint16_t max_palette_pixels = 256; // for depth <= 8
@@ -588,10 +585,8 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -621,7 +616,7 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -646,7 +641,6 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
         if (depth <= 8)
         if (depth <= 8)
         {
         {
           if (depth < 8) bitmask >>= depth;
           if (depth < 8) bitmask >>= depth;
-          //bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           {
           {
@@ -665,7 +659,6 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
         }
         }
         display.clearScreen();
         display.clearScreen();
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
-        //Serial.print("skip "); Serial.println(rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         {
         {
@@ -698,6 +691,7 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -827,10 +821,8 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -860,7 +852,7 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -885,7 +877,6 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
         if (depth <= 8)
         if (depth <= 8)
         {
         {
           if (depth < 8) bitmask >>= depth;
           if (depth < 8) bitmask >>= depth;
-          //bytes_read += skip(client, 54 - bytes_read); //palette is always @ 54
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           bytes_read += skip(client, imageOffset - (4 << depth) - bytes_read); // 54 for regular, diff for colorsimportant
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           for (uint16_t pn = 0; pn < (1 << depth); pn++)
           {
           {
@@ -906,7 +897,6 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
           }
           }
         }
         }
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
         uint32_t rowPosition = flip ? imageOffset + (height - h) * rowSize : imageOffset;
-        //Serial.print("skip "); Serial.println(rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         bytes_read += skip(client, rowPosition - bytes_read);
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
         {
         {
@@ -937,6 +927,7 @@ void drawBitmapFrom_HTTP_ToBuffer(const char* host, const char* path, const char
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -1064,8 +1055,6 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
   Serial.println(); Serial.print("downloading file \""); Serial.print(filename);  Serial.println("\"");
   Serial.println(); Serial.print("downloading file \""); Serial.print(filename);  Serial.println("\"");
   Serial.print("connecting to "); Serial.println(host);
   Serial.print("connecting to "); Serial.println(host);
 #if defined (ESP8266) || defined(ARDUINO_RASPBERRY_PI_PICO_W)
 #if defined (ESP8266) || defined(ARDUINO_RASPBERRY_PI_PICO_W)
-  client.setBufferSizes(4096, 4096); // required
-  //client.setBufferSizes(8192, 4096); // may help for some sites
   if (certificate) client.setTrustAnchors(&cert);
   if (certificate) client.setTrustAnchors(&cert);
   else if (fingerprint) client.setFingerprint(fingerprint);
   else if (fingerprint) client.setFingerprint(fingerprint);
   else client.setInsecure();
   else client.setInsecure();
@@ -1091,10 +1080,8 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -1103,13 +1090,11 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
   }
   }
   if (!connection_ok) return;
   if (!connection_ok) return;
   // Parse BMP header
   // Parse BMP header
-  //if (read16(client) == 0x4D42) // BMP signature
   uint16_t signature = 0;
   uint16_t signature = 0;
   for (int16_t i = 0; i < 50; i++)
   for (int16_t i = 0; i < 50; i++)
   {
   {
     if (!client.available()) delay(100);
     if (!client.available()) delay(100);
     else signature = read16(client);
     else signature = read16(client);
-    //Serial.print("signature: 0x"); Serial.println(signature, HEX);
     if (signature == 0x4D42) break;
     if (signature == 0x4D42) break;
   }
   }
   if (signature == 0x4D42) // BMP signature
   if (signature == 0x4D42) // BMP signature
@@ -1133,7 +1118,7 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -1211,6 +1196,7 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -1326,8 +1312,6 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
   display.fillScreen(GxEPD_WHITE);
   display.fillScreen(GxEPD_WHITE);
   Serial.print("connecting to "); Serial.println(host);
   Serial.print("connecting to "); Serial.println(host);
 #if defined (ESP8266)
 #if defined (ESP8266)
-  client.setBufferSizes(4096, 4096); // required
-  //client.setBufferSizes(8192, 4096); // may help for some sites
   if (certificate) client.setTrustAnchors(&cert);
   if (certificate) client.setTrustAnchors(&cert);
   else if (fingerprint) client.setFingerprint(fingerprint);
   else if (fingerprint) client.setFingerprint(fingerprint);
   else client.setInsecure();
   else client.setInsecure();
@@ -1353,10 +1337,8 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
     {
     {
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       connection_ok = line.startsWith("HTTP/1.1 200 OK");
       if (connection_ok) Serial.println(line);
       if (connection_ok) Serial.println(line);
-      //if (!connection_ok) Serial.println(line);
     }
     }
     if (!connection_ok) Serial.println(line);
     if (!connection_ok) Serial.println(line);
-    //Serial.println(line);
     if (line == "\r")
     if (line == "\r")
     {
     {
       Serial.println("headers received");
       Serial.println("headers received");
@@ -1365,17 +1347,12 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
   }
   }
   if (!connection_ok) return;
   if (!connection_ok) return;
   // Parse BMP header
   // Parse BMP header
-  //if (read16(client) == 0x4D42) // BMP signature
   uint16_t signature = 0;
   uint16_t signature = 0;
   for (int16_t i = 0; i < 50; i++)
   for (int16_t i = 0; i < 50; i++)
   {
   {
     if (!client.available()) delay(100);
     if (!client.available()) delay(100);
     else signature = read16(client);
     else signature = read16(client);
-    if (signature == 0x4D42)
-    {
-      //Serial.print("signature wait loops: "); Serial.println(i);
-      break;
-    }
+    if (signature == 0x4D42) break;
   }
   }
   if (signature == 0x4D42) // BMP signature
   if (signature == 0x4D42) // BMP signature
   {
   {
@@ -1398,7 +1375,7 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
       Serial.print("Image size: ");
       Serial.print("Image size: ");
       Serial.print(width);
       Serial.print(width);
       Serial.print('x');
       Serial.print('x');
-      Serial.println(height);
+      Serial.println(abs(height));
       // BMP rows are padded (if needed) to 4-byte boundary
       // BMP rows are padded (if needed) to 4-byte boundary
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       uint32_t rowSize = (width * depth / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
       if (depth < 8) rowSize = ((width * depth + 8 - depth) / 8 + 3) & ~3;
@@ -1475,6 +1452,7 @@ void drawBitmapFrom_HTTPS_ToBuffer(const char* host, const char* path, const cha
               in_bytes = got;
               in_bytes = got;
               in_remain -= got;
               in_remain -= got;
               bytes_read += got;
               bytes_read += got;
+              in_idx = 0;
             }
             }
             if (!connection_ok)
             if (!connection_ok)
             {
             {
@@ -1618,7 +1596,7 @@ uint32_t skip(BearSSL::WiFiClientSecure& client, int32_t bytes)
       client.read();
       client.read();
       remain--;
       remain--;
     }
     }
-    else delay(1);
+    else delay(10);
     if (millis() - start > 2000) break; // don't hang forever
     if (millis() - start > 2000) break; // don't hang forever
   }
   }
   return bytes - remain;
   return bytes - remain;
@@ -1636,7 +1614,7 @@ uint32_t read8n(BearSSL::WiFiClientSecure& client, uint8_t* buffer, int32_t byte
       *buffer++ = uint8_t(v);
       *buffer++ = uint8_t(v);
       remain--;
       remain--;
     }
     }
-    else delay(1);
+    else delay(10);
     if (millis() - start > 2000) break; // don't hang forever
     if (millis() - start > 2000) break; // don't hang forever
   }
   }
   return bytes - remain;
   return bytes - remain;

+ 1 - 1
library.properties

@@ -1,5 +1,5 @@
 name=GxEPD2
 name=GxEPD2
-version=1.6.0
+version=1.6.1
 author=Jean-Marc Zingg
 author=Jean-Marc Zingg
 maintainer=Jean-Marc Zingg
 maintainer=Jean-Marc Zingg
 sentence=Arduino Display Library for SPI E-Paper displays from Dalian Good Display and Waveshare. 
 sentence=Arduino Display Library for SPI E-Paper displays from Dalian Good Display and Waveshare.