@@ -49,32 +49,37 @@ na SX1281 2.4–2.5Ghz 130 5.5 2000 0.476-202
4949
5050ConfigManager::ConfigManager ()
5151 : IotWebConf2(thingName, &dnsServer, &server, initialApPassword, configVersion), server(80 ), gsConfigHtmlFormatProvider(*this ), boards({
52- // OLED_add, OLED_SDA, OLED_SCL, OLED_RST, PROG_BUTTON, BOARD_LED, L_SX127X?, L_NSS, L_DI00, L_DI01, L_BUSSY, L_RST, L_MISO, L_MOSI, L_SCK, L_TCXO_V, RX_EN, TX_EN, BOARD
52+ // OLED_add, OLED_SDA, OLED_SCL, OLED_RST, PROG_BUTTON, BOARD_LED, L_SX127X?, L_NSS, L_DI00, L_DI01, L_BUSSY, L_RST, L_MISO, L_MOSI, L_SCK, L_TCXO_V, RX_EN, TX_EN, BOARD
5353#if CONFIG_IDF_TARGET_ESP32S3
54- { 0x3c , 17 , 18 , 21 , 0 , 35 , 6 , 8 , UNUSED, 14 , 13 , 12 , 11 , 10 , 9 , 1 .6f , UNUSED, UNUSED, " 150–960Mhz - HELTEC LORA32 V3 SX1262" }, // SX1262
55- { 0x3c , 17 , 18 , UNUSED, 0 , 35 , 1 , 8 , 6 , 14 , UNUSED, 12 , 11 , 10 , 9 , 0 .0f , UNUSED, UNUSED, " Custom ESP32-S3 433MHz SX1278" }, // SX1278 @g4lile0
54+ { 0x3c , 17 , 18 , 21 , 0 , 35 , RADIO_SX1262, 8 , UNUSED, 14 , 13 , 12 , 11 , 10 , 9 , 1 .6f , UNUSED, UNUSED, " 150–960Mhz - HELTEC LORA32 V3 SX1262" }, // SX1262
55+ { 0x3c , 17 , 18 , UNUSED, 0 , 35 , RADIO_SX1278, 8 , 6 , 14 , UNUSED, 12 , 11 , 10 , 9 , 0 .0f , UNUSED, UNUSED, " Custom ESP32-S3 433MHz SX1278" }, // SX1278 @g4lile0
56+ #elif CONFIG_IDF_TARGET_ESP32C3
57+ { 0x3c , 0 , 1 , UNUSED, 20 , 21 , RADIO_SX1262, 8 , UNUSED, 3 , 4 , 5 , 6 , 7 , 10 , 1 .6f , UNUSED, UNUSED, " 433MHz HELTEC LORA32 HT-CT62 SX1262" }, // SX1262 @gargomoma
58+ { 0x3c , 0 , 1 , UNUSED, 20 , 21 , RADIO_SX1278, 8 , 4 , UNUSED, UNUSED, 5 , 6 , 7 , 10 , 0 .0f , UNUSED, UNUSED, " Custom ESP32-C3 433MHz SX1278" }, // SX1278 @gargomoma
5659#else
57- { 0x3c , 4 , 15 , 16 , 0 , 25 , 1 , 18 , 26 , 12 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz HELTEC WiFi LoRA 32 V1" }, // SX1278 @4m1g0
58- { 0x3c , 4 , 15 , 16 , 0 , 25 , 2 , 18 , 26 , 12 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 863-928MHz HELTEC WiFi LoRA 32 V1" }, // SX1276
59- { 0x3c , 4 , 15 , 16 , 0 , 25 , 1 , 18 , 26 , 35 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz HELTEC WiFi LoRA 32 V2" }, // SX1278 @4m1g0
60- { 0x3c , 4 , 15 , 16 , 0 , 25 , 2 , 18 , 26 , 35 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 863-928MHz HELTEC WiFi LoRA 32 V2" }, // SX1276
61- { 0x3c , 4 , 15 , 16 , 0 , 2 , 1 , 18 , 26 , UNUSED, UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433Mhz TTGO LoRa 32 v1" }, // SX1278 @g4lile0
62- { 0x3c , 4 , 15 , 16 , 0 , 2 , 2 , 18 , 26 , UNUSED, UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz TTGO LoRa 32 v1" }, // SX1276
63- { 0x3c , 21 , 22 , UNUSED, 0 , 22 , 1 , 18 , 26 , 33 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz TTGO LoRA 32 v2" }, // SX1278 @TCRobotics
64- { 0x3c , 21 , 22 , UNUSED, 0 , 22 , 2 , 18 , 26 , 33 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz TTGO LoRA 32 v2" }, // SX1276
65- { 0x3c , 21 , 22 , UNUSED, 39 , 22 , 1 , 18 , 26 , 33 , 32 , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz T-BEAM + OLED" }, // SX1278
66- { 0x3c , 21 , 22 , 16 , 39 , 22 , 2 , 18 , 26 , 33 , 32 , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz T-BEAM + OLED" }, // SX1276
67- { 0x3c , 21 , 22 , 16 , 0 , 25 , 5 , 5 , UNUSED, 27 , 26 , 14 , 19 , 23 , 18 , 0 .0f , UNUSED, UNUSED, " Custom ESP32 Wroom + SX126x (Crystal)" }, // SX1268 @4m1g0, @lillefyr
68- { 0x3c , 21 , 22 , UNUSED, 0 , 25 , 5 , 18 , UNUSED, 33 , 32 , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " TTGO LoRa 32 V2 Modified with module SX126x (crystal)" }, // SX1268 @TCRobotics
69- { 0x3c , 21 , 22 , 16 , 0 , 25 , 5 , 5 , UNUSED, 2 , 13 , 26 , 19 , 23 , 18 , 1 .6f , UNUSED, UNUSED, " Custom ESP32 Wroom + SX126x DRF1268T (TCX0) (5, 2, 26, 13)" }, // SX1268 @sdey76
70- { 0x3c , 21 , 22 , 16 , 0 , 25 , 5 , 5 , UNUSED, 26 , 12 , 14 , 19 , 23 , 18 , 1 .6f , UNUSED, UNUSED, " Custom ESP32 Wroom + SX126x DRF1268T (TCX0) (5, 26, 14, 12)" }, // SX1268 @imants
71- { 0x3c , 21 , 22 , UNUSED, 38 , 22 , 1 , 18 , 26 , 33 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz T-BEAM V1.0 + OLED" }, // SX1278 @fafu
72- { 0x3c , 21 , 22 , 16 , 0 , 2 , 5 , 5 , UNUSED, 34 , 32 , 14 , 19 , 27 , 18 , 1 .6f , UNUSED, UNUSED, " 433MHz FOSSA 1W Ground Station" }, // SX1268 @jgromes
73- { 0x3c , 21 , 22 , 16 , 0 , 2 , 2 , 5 , UNUSED, 34 , 32 , 14 , 19 , 27 , 18 , 1 .6f , UNUSED, UNUSED, " 868-915MHz FOSSA 1W Ground Station" }, // SX1276 @jgromes
74- { 0x3c , 21 , 22 , UNUSED, 0 , 22 , 8 , 5 , 26 , 34 , 32 , 14 , 19 , 27 , 18 , 0 .0f , UNUSED, UNUSED, " 2.4GHz ESP32 + SX1280" }, // SX1280 @g4lile0
75- { 0x3c , 21 , 22 , UNUSED, 38 , 22 , 2 , 18 , 26 , 33 , UNUSED , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz T-BEAM V1.0 + OLED" }, // SX1276 @fafu
76- { 0x3c , 21 , 22 , UNUSED, 0 , 25 , 1 , 18 , 26 , 33 , UNUSED , 23 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz LILYGO T3_V1.6.1" }, // SX1278
77- { 0x3c , 21 , 22 , UNUSED, 0 , 25 , 2 , 18 , 26 , 33 , UNUSED , 23 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz LILYGO T3_V1.6.1" }, // SX1276
60+ { 0x3c , 4 , 15 , 16 , 0 , 25 , RADIO_SX1278, 18 , 26 , 12 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz HELTEC WiFi LoRA 32 V1" }, // SX1278 @4m1g0
61+ { 0x3c , 4 , 15 , 16 , 0 , 25 , RADIO_SX1276, 18 , 26 , 12 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 863-928MHz HELTEC WiFi LoRA 32 V1" }, // SX1276
62+ { 0x3c , 4 , 15 , 16 , 0 , 25 , RADIO_SX1278, 18 , 26 , 35 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz HELTEC WiFi LoRA 32 V2" }, // SX1278 @4m1g0
63+ { 0x3c , 4 , 15 , 16 , 0 , 25 , RADIO_SX1276, 18 , 26 , 35 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 863-928MHz HELTEC WiFi LoRA 32 V2" }, // SX1276
64+ { 0x3c , 4 , 15 , 16 , 0 , 2 , RADIO_SX1278, 18 , 26 , UNUSED, UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433Mhz TTGO LoRa 32 v1" }, // SX1278 @g4lile0
65+ { 0x3c , 4 , 15 , 16 , 0 , 2 , RADIO_SX1276, 18 , 26 , UNUSED, UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz TTGO LoRa 32 v1" }, // SX1276
66+ { 0x3c , 21 , 22 , UNUSED, 0 , 22 , RADIO_SX1278, 18 , 26 , 33 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz TTGO LoRA 32 v2" }, // SX1278 @TCRobotics
67+ { 0x3c , 21 , 22 , 16 , 0 , 22 , RADIO_SX1276, 18 , 26 , 33 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz TTGO LoRA 32 v2" }, // SX1276
68+ { 0x3c , 21 , 22 , 16 , 39 , 22 , RADIO_SX1278, 18 , 26 , 33 , 32 , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz T-BEAM + OLED" }, // SX1278
69+ { 0x3c , 21 , 22 , 16 , 39 , 22 , RADIO_SX1276, 18 , 26 , 33 , 32 , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz T-BEAM + OLED" }, // SX1276
70+ { 0x3c , 21 , 22 , 16 , 0 , 25 , RADIO_SX1268, 5 , UNUSED, 27 , 26 , 14 , 19 , 23 , 18 , 0 .0f , UNUSED, UNUSED, " Custom ESP32 Wroom + SX126x (Crystal)" }, // SX1268 @4m1g0, @lillefyr
71+ { 0x3c , 21 , 22 , UNUSED, 0 , 25 , RADIO_SX1268, 18 , UNUSED, 33 , 32 , 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " TTGO LoRa 32 V2 Modified with module SX126x (crystal)" }, // SX1268 @TCRobotics
72+ { 0x3c , 21 , 22 , 16 , 0 , 25 , RADIO_SX1268, 5 , UNUSED, 2 , 13 , 26 , 19 , 23 , 18 , 1 .6f , UNUSED, UNUSED, " Custom ESP32 Wroom + SX126x DRF1268T (TCX0) (5, 2, 26, 13)" }, // SX1268 @sdey76
73+ { 0x3c , 21 , 22 , 16 , 0 , 25 , RADIO_SX1268, 5 , UNUSED, 26 , 12 , 14 , 19 , 23 , 18 , 1 .6f , UNUSED, UNUSED, " Custom ESP32 Wroom + SX126x DRF1268T (TCX0) (5, 26, 14, 12)" }, // SX1268 @imants
74+ { 0x3c , 21 , 22 , UNUSED, 38 , 22 , RADIO_SX1278, 18 , 26 , 33 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz T-BEAM V1.0 + OLED" }, // SX1278 @fafu
75+ { 0x3c , 21 , 22 , 16 , 0 , 2 , RADIO_SX1268, 5 , UNUSED, 34 , 32 , 14 , 19 , 27 , 18 , 1 .6f , UNUSED, UNUSED, " 433MHz FOSSA 1W Ground Station" }, // SX1268 @jgromes
76+ { 0x3c , 21 , 22 , 16 , 0 , 2 , RADIO_SX1276, 5 , UNUSED, 34 , 32 , 14 , 19 , 27 , 18 , 1 .6f , UNUSED, UNUSED, " 868-915MHz FOSSA 1W Ground Station" }, // SX1276 @jgromes
77+ { 0x3c , 21 , 22 , UNUSED, 0 , 22 , RADIO_SX1280, 5 , 26 , 34 , 32 , 14 , 19 , 27 , 18 , 0 .0f , UNUSED, UNUSED, " 2.4GHz ESP32 + SX1280" }, // SX1280 @g4lile0
78+ { 0x3c , 21 , 22 , UNUSED, 38 , 22 , RADIO_SX1276, 18 , 26 , 33 , UNUSED, 14 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz T-BEAM V1.0 + OLED" }, // SX1276 @fafu
79+ { 0x3c , 21 , 22 , UNUSED, 0 , 25 , RADIO_SX1278, 18 , 26 , 33 , UNUSED, 23 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 433MHz LILYGO T3_V1.6.1" }, // SX1278
80+ { 0x3c , 21 , 22 , UNUSED, 0 , 25 , RADIO_SX1276, 18 , 26 , 33 , UNUSED, 23 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz LILYGO T3_V1.6.1" }, // SX1276
81+ { 0x3c , 21 , 22 , UNUSED, 0 , 25 , RADIO_SX1276, 18 , 26 , UNUSED, 32 , 23 , 19 , 27 , 5 , 0 .0f , UNUSED, UNUSED, " 868-915MHz LILYGO T3_V1.6.1 TCXO" }, // SX1262
82+
7883 #endif
7984 })
8085{
@@ -562,41 +567,39 @@ void ConfigManager::boardDetection()
562567 Log::error (PSTR (" Automatic board detection running... " ));
563568
564569
565- // If the cpu is a ESP32-PICO-D4 we know it is the Lilygo T3_v1.6.1
566- // and we cant use GPIO16 to test for an OLED
570+ // If the cpu is a ESP32-PICO-D4 (Lilygo T3_v1.6.1) we have to avoid using pin GPIO16 as this is used for the FLASH_CS
567571 // https://github.com/mpmarks/tinyGS-newboards/commit/e520086f1b43c7cea4cb85d996f0fc379f2d2786
568572
569573#if CONFIG_IDF_TARGET_ESP32S3
570574// nothing yet
575+ #elif CONFIG_IDF_TARGET_ESP32C3
576+ // nothing yet
571577#else
572- if (strcmp (ESP.getChipModel (), " ESP32-PICO-D4" )==0 ) {
573- itoa (LILYGO_T3_V1_6_1_LF, board, 10 );
574- return ;
575- };
576- #endif
577-
578- for (uint8_t ite = 0 ; ite < ((sizeof (boards) / sizeof (boards[0 ]))); ite++)
579- {
580- Log::error (PSTR (" %s \n " ), boards[ite].BOARD );
581- if (boards[ite].OLED__RST != UNUSED) {
582- pinMode (boards[ite].OLED__RST , OUTPUT);
583- digitalWrite (boards[ite].OLED__RST , LOW);
584- delay (50 );
585- digitalWrite (boards[ite].OLED__RST , HIGH);
586- }
587- Wire.begin (boards[ite].OLED__SDA , boards[ite].OLED__SCL );
588- Wire.beginTransmission (boards[ite].OLED__address );
589- if (!Wire.endTransmission ())
590- {
591- Log::error (PSTR (" Compatible OLED FOUND" ));
592- itoa (ite, board, 10 );
593- return ;
594- }
595- else
596- {
597- Log::error (PSTR (" Not Compatible board found, please select it manually on the web config panel" ));
598- }
599- }
578+ if (strcmp (ESP.getChipModel (), " ESP32-PICO-D4" ) != 0 ) {
579+ for (uint8_t ite = 0 ; ite < ((sizeof (boards) / sizeof (boards[0 ]))); ite++)
580+ {
581+ Log::error (PSTR (" %s \n " ), boards[ite].BOARD );
582+ if (boards[ite].OLED__RST != UNUSED) {
583+ pinMode (boards[ite].OLED__RST , OUTPUT);
584+ digitalWrite (boards[ite].OLED__RST , LOW);
585+ delay (25 );
586+ digitalWrite (boards[ite].OLED__RST , HIGH);
587+ }
588+ Wire.begin (boards[ite].OLED__SDA , boards[ite].OLED__SCL );
589+ Wire.beginTransmission (boards[ite].OLED__address );
590+ if (!Wire.endTransmission ())
591+ {
592+ Log::error (PSTR (" Compatible OLED FOUND" ));
593+ itoa (ite, board, 10 );
594+ return ;
595+ }
596+ else
597+ {
598+ Log::error (PSTR (" Not Compatible board found, please select it manually on the web config panel" ));
599+ }
600+ }
601+ };
602+ #endif
600603}
601604
602605void ConfigManager::printConfig ()
0 commit comments