diff --git a/platformio.ini b/platformio.ini index 4a4ef2f7..329190a2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -37,6 +37,7 @@ build_flags = -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead -D_lmic_config_h_ + -Dheltec_wifi_lora_32 -include "src/main.h" -include "src/hal/heltec.h" ;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp) @@ -47,7 +48,9 @@ platform = espressif32 board = esp32dev framework = arduino monitor_baud = 115200 -upload_speed = 921600 +; On my V1, upload does not works over default 115200 +upload_speed = 921600 +;upload_port = COM15 lib_deps = U8g2 ESP32 BLE Arduino@>=0.4.9 @@ -60,6 +63,7 @@ build_flags = -fexceptions -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead + -Dttgov1 -D_lmic_config_h_ -include "src/main.h" -include "src/hal/ttgov1.h" @@ -86,6 +90,7 @@ build_flags = -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead -D_lmic_config_h_ + -Dttgov2 -include "src/main.h" -include "src/hal/ttgov2.h" ;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp) @@ -110,6 +115,7 @@ build_flags = -fexceptions -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead + -Dlopy -D_lmic_config_h_ -include "src/main.h" -include "src/hal/lopy.h" @@ -136,6 +142,7 @@ build_flags = -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead -D_lmic_config_h_ + -Dlopy4 -include "src/main.h" -include "src/hal/lopy4.h" ;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp) @@ -161,6 +168,7 @@ build_flags = -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead -D_lmic_config_h_ + -Dlolin32lite_lora -include "src/main.h" -include "src/hal/lolin32lite_lora.h" ;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp) @@ -186,6 +194,7 @@ build_flags = -std=c++11 ;override lora settings from LMiC library in lmic/config.h and use main.h instead -D_lmic_config_h_ + -Dlolin32_lora -include "src/main.h" -include "src/hal/lolin32_lora.h" ;FreeRTOS single core operation, switches off core 1 (see arduino-esp32/cores/esp32/main.cpp) diff --git a/src/loraconf.sample.h b/src/loraconf.sample.h index cbfd3d47..5a60a654 100644 --- a/src/loraconf.sample.h +++ b/src/loraconf.sample.h @@ -14,7 +14,15 @@ // Note: Use same format as in TTN console (cut & paste, for your convenience) // *** Take care : If Using a board with Microchip 24AA02E64 Uinique ID for deveui, ** // *** this DEVEUI will be overwriten by the one contained in the Microchip module *** +#if defined (ttgov2) +static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }; +#elif defined (ttgov1) +static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; +#elif defined (heltec_wifi_lora_32) +static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32 }; +#else static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +#endif // Note: Use msb format for APPEUI as in TTN console (cut & paste, for your convenience) // For TTN, APPEUI always starts with 0x70, 0xB3, 0xD5