Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Apr 8, 2024
2 parents 5ff5d3d + 304cfea commit 920d90c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
board:
- esp32:esp32:esp32:DebugLevel=none
- esp32:esp32:esp32:DebugLevel=verbose
- esp32:esp32:firebeetle32
#- esp32:esp32:firebeetle32
#- esp32:esp32:ttgo-lora32:Revision=TTGO_LoRa32_V1
#- esp32:esp32:ttgo-lora32:Revision=TTGO_LoRa32_V2
- esp32:esp32:ttgo-lora32:Revision=TTGO_LoRa32_v21new
Expand Down
6 changes: 5 additions & 1 deletion BresserWeatherSensorLW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,11 @@ void setup()
LoRaWANEvent_t downlinkDetails;

// perform an uplink & optionally receive downlink
state = node.sendReceive(uplinkPayload, encoder.getLength(), port, downlinkPayload, &downlinkSize, &uplinkDetails, &downlinkDetails);
if (fcntUp % 64 == 0) {
state = node.sendReceive(uplinkPayload, encoder.getLength(), port, downlinkPayload, &downlinkSize, true, &uplinkDetails, &downlinkDetails);
} else {
state = node.sendReceive(uplinkPayload, encoder.getLength(), port, downlinkPayload, &downlinkSize);
}
debug((state != RADIOLIB_LORAWAN_NO_DOWNLINK) && (state != RADIOLIB_ERR_NONE), F("Error in sendReceive"), state, false);

// Check if downlink was received
Expand Down
15 changes: 15 additions & 0 deletions secrets.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// JoinEUI - previous versions of LoRaWAN called this AppEUI
// for development purposes you can use all zeros - see wiki for details
#define RADIOLIB_LORAWAN_JOIN_EUI 0x0000000000000000

// The Device EUI & two keys can be generated on the TTN console (or any other LoRaWAN Network Service Provider's console)
#pragma message("Replace the dummy values for RADIOLIB_LORAWAN_DEV_EUI, RADIOLIB_LORAWAN_APP_KEY and RADIOLIB_LORAWAN_NWK_KEY by your own credentials.")
#ifndef RADIOLIB_LORAWAN_DEV_EUI // Replace with your Device EUI
#define RADIOLIB_LORAWAN_DEV_EUI 0x0000000000000000
#endif
#ifndef RADIOLIB_LORAWAN_APP_KEY // Replace with your App Key
#define RADIOLIB_LORAWAN_APP_KEY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
#endif
#ifndef RADIOLIB_LORAWAN_NWK_KEY // Put your Nwk Key here
#define RADIOLIB_LORAWAN_NWK_KEY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
#endif
4 changes: 2 additions & 2 deletions src/BresserWeatherSensorLWCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
#pragma message("External voltage divider required for battery voltage measurement.")
#pragma message("No power-saving & deep-discharge protection implemented yet.")
#elif defined(FIREBEETLE_ESP32_COVER_LORA)
#pragma message("On-board voltage divider must be enabled for battery voltage measurement - see schematic."
#pragma message("On-board voltage divider must be enabled for battery voltage measurement (see schematic).")
#pragma message("No power-saving & deep-discharge protection implemented yet.")
#elif defined(ARDUINO_M5STACK_Core2) || defined(ARDUINO_M5STACK_CORE2)
#pragma message("Energy saving at weak battery not implemented yet.")
Expand Down Expand Up @@ -345,4 +345,4 @@ const uint8_t UBATT_SAMPLES = 10;
}
#endif

#endif // _LWCFG_H
#endif // _LWCFG_H

0 comments on commit 920d90c

Please sign in to comment.