diff --git a/README.md b/README.md
index 4baa631..aa1628b 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,11 @@ The symbol can now be changed without attached display - during normal operation
for DHT22 I used the library from https://github.com/beegee-tokyo/DHTesp, as the standard library gives to many wrong readings
Now the DS18B20 is supported as well - uncomment line 31: // #define DS18B20 // use this if you use DS18B20, default ist DHT22
-new features:
+show RX packets
+by uncommenting // #define SHOW_RX_PACKET the tracker shows received LoRa APRS packets in raw format for the time in milliseconds defined in SHOW_RX_TIME - both in ...config.h
+
+new features:
+- show RX packets
- DS18B20 support (setable in config.h)
- GPS switched off in WX_FIXED mode (only available with boards with HW-Version >=V1.0)
- immediate TX with short key press
diff --git a/platformio.ini b/platformio.ini
index 2daa1fd..a4b451d 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -8,12 +8,23 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
-[env:heltec_wifi_lora_32]
+;[env:heltec_wifi_lora_32]
+[env:ttgo-t-beam]
platform = espressif32
-board = heltec_wifi_lora_32
+;board = heltec_wifi_lora_32
+board = ttgo-t-beam
framework = arduino
; Custom Serial Monitor speed (baud rate)
monitor_speed = 115200
-; lib_deps = Adafruit GFX Library@1.6.1, Adafruit Unified Sensor@1.0.3, Adafruit SSD1306@2.0.2, AXP202X_Library@1.0.1, DallasTemperature@3.8.0, DHT sensor library for ESPx@1.17, OneWire@2.3.5, TinyGPSPlus@1.0.2
+lib_deps =
+ RadioHead
+ TinyGPSPlus
+ DHT sensor library for ESPx
+ Adafruit SSD1306
+ Adafruit GFX Library
+ Adafruit Unified Sensor
+ AXP202X_Library
+ OneWire
+ DallasTemperature
diff --git a/src/TTGO_T-Beam_LoRa_APRS.ino b/src/TTGO_T-Beam_LoRa_APRS.ino
index 14693b4..7e59f33 100644
--- a/src/TTGO_T-Beam_LoRa_APRS.ino
+++ b/src/TTGO_T-Beam_LoRa_APRS.ino
@@ -181,6 +181,7 @@ boolean wx;
//byte arrays
byte lora_TXBUFF[128]; //buffer for packet to send
+byte lora_RXBUFF[128]; //buffer for packet to send
//byte Variables
byte lora_TXStart; //start of packet data in TXbuff
byte lora_TXEnd; //end of packet data in TXbuff
@@ -436,7 +437,7 @@ void setup()
void loop() {
if (digitalRead(BUTTON)==LOW) {
++button_ctr;
- if (button_ctr>=5){
+ if (button_ctr>=5) {
switch(tracker_mode) {
case TRACKER:
tracker_mode = WX_TRACKER;
@@ -480,7 +481,7 @@ void loop() {
button_ctr = 0;
}
- if (hum_temp) {
+ if (hum_temp) {
hum_temp=false;
#ifdef DS18B20
sensors.requestTemperatures(); // Send the command to get temperature readings
@@ -504,8 +505,18 @@ void loop() {
}
if (rf95.waitAvailableTimeout(100)) {
- if (rf95.recvAPRS(buf, &len)) {
+ #ifdef SHOW_RX_PACKET // only show RX packets when activitated in config
+ if (rf95.recvAPRS(lora_RXBUFF, &len)) {
+ Serial.print("((RX)): ");
+ InputString = "";
+ for ( int i=0 ; i < len ; i++) {
+ InputString += (char) lora_RXBUFF[i];
+ }
+ Serial.println(InputString);
+ blinker(3);
+ writedisplaytext(" ((RX))","",InputString,"","","",SHOW_RX_TIME);
}
+ #endif
}
if (tracker_mode != WX_FIXED) {
diff --git a/src/TTGO_T-Beam_LoRa_APRS_config.h b/src/TTGO_T-Beam_LoRa_APRS_config.h
index 9958d4b..31cb7ff 100644
--- a/src/TTGO_T-Beam_LoRa_APRS_config.h
+++ b/src/TTGO_T-Beam_LoRa_APRS_config.h
@@ -48,3 +48,7 @@
// TRANSMIT INTERVAL
unsigned long max_time_to_nextTX = 300000L; // set here MAXIMUM time in ms(!) for smart beaconing - minimum time is always 1 min = 60 secs = 60000L !!!
// when entering 60000L intervall is fixed to 1 min
+
+// show RX values
+// #define SHOW_RX_PACKET // uncomment to show received LoRa APS packets for the time given below
+#define SHOW_RX_TIME 5000 // show RX packet for milliseconds (5000 = 5secs)