diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 82ce696f..fa92d1a5 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -214,11 +214,17 @@ void onEvent(ev_t ev) { : PSTR("TX_COMPLETE")); sprintf(display_line6, " "); // clear previous lmic status + // if (LMIC.dataLen) { + // ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d", + // LMIC.dataLen, (signed char)LMIC.rssi, (signed + // char)LMIC.snr); + // sprintf(display_line6, "RSSI %d SNR %d", (signed char)LMIC.rssi, + // (signed char)LMIC.snr); + if (LMIC.dataLen) { - ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d", - LMIC.dataLen, (signed char)LMIC.rssi, (signed char)LMIC.snr); - sprintf(display_line6, "RSSI %d SNR %d", (signed char)LMIC.rssi, - (signed char)LMIC.snr); + ESP_LOGI(TAG, "Received %d bytes of payload, RSSI -%d SNR %d", + LMIC.dataLen, LMIC.rssi, LMIC.snr / 4); + sprintf(display_line6, "RSSI -%d SNR %d", LMIC.rssi, LMIC.snr / 4); // check if command is received on command port, then call interpreter if ((LMIC.txrxFlags & TXRX_PORT) && diff --git a/src/ota.cpp b/src/ota.cpp index ac409a0c..4f5a5e01 100644 --- a/src/ota.cpp +++ b/src/ota.cpp @@ -68,7 +68,7 @@ void start_ota_update() { ESP_LOGI(TAG, "Starting Wifi OTA update"); display(1, "**", WIFI_SSID); - WiFi.mode(WIFI_AP_STA); + WiFi.mode(WIFI_STA); WiFi.begin(WIFI_SSID, WIFI_PASS); int i = WIFI_MAX_TRY, j = OTA_MAX_TRY;