DL9SAU-TTGO-T-Beam-LoRa-APRS/data_embed/index.html

1019 wiersze
76 KiB
HTML

2021-02-18 16:59:18 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>TTGO-T-Beam-LoRa-APRS <!--VERSION--></title>
2021-03-01 13:47:34 +00:00
<link rel="stylesheet" href="style.css" type="text/css">
<script src="js.js" type="text/javascript"></script>
2021-02-18 16:59:18 +00:00
<link rel="icon" href="data:,">
</head>
<body>
<div class="container">
2021-03-01 12:01:33 +00:00
<header>
<div id="logo"></div>
</header>
2021-02-18 16:59:18 +00:00
<section>
<div class="grid-container full">
<h2 class="u-full-width">WiFi Settings</h2>
</div>
<article>
<form action="/save_wifi_cfg" method="post">
<div class="grid-container full">
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<label for="wifi_en">Enable Wifi</label>
<select id="wifi_en" name="wifi_en">
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<option value="1">1: Wifi may be off if bluetooth client is connected in between 60s on boot (recommended, see below)</option>
<option value="2">2: Wifi on (during hardware limitation, bluetooth will be disabled on LORA32_21 devices)</option>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<option value="0">0: Wifi off (see below for hints and caveats)</option>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
</select>
</div>
</div>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<div class="grid-container full">
<h5 class="u-full-width">AP settings</h5>
</div>
<div class="grid-container halves">
<div>
<label for="ap_password">AUTO AP Password</label>
<input type="password" name="ap_password" id="ap_password" placeholder="AUTO AP Password" title="AUTO AP Password, 8 characters minimum">
</div>
<div>
<label for="wifi_pwrAP">TXPWR as AP</label>
<select id="wifi_pwrAP" name="wifi_pwrAP">
<option value="8">Min (2dBm, 2mW, suggested)</option>
<option value="44">Low (11dBm, 12mW)</option>
<option value="60">Mid (15dBm, 32mW)</option>
<option value="72">High (18dBm, 63mW)</option>
<option value="80">Max (20dBm, 100mW)</option>
</select>
</div>
</div>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<div class="grid-container full">
<h5 class="u-full-width">STA settings</h5>
</div>
<div class="grid-container full">
2021-03-08 21:47:00 +00:00
<div id="wifi_list">
<label for="wifi_ssid">Network</label>
2021-02-18 16:59:18 +00:00
<input type="button" value="Scan WiFi" id="scan_wifi_btn" onclick="scanWifi();">
</div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
</div>
<div class="grid-container thirds">
2021-02-18 16:59:18 +00:00
<div>
2021-09-15 18:25:19 +00:00
<label for="wifi_ssid">WiFi SSID</label>
<input type="text" name="wifi_ssid" placeholder="Your Wifi SSID" title="Your Wifi SSID" id="wifi_ssid">
2021-02-18 16:59:18 +00:00
</div>
<div>
2021-09-15 18:25:19 +00:00
<label for="wifi_password">WiFi Password</label>
<input type="password" name="wifi_password" id="wifi_password" placeholder="Your WiFi Password" title="Your WiFi Password, 8 characters minimum">
2021-02-18 16:59:18 +00:00
</div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<div>
<label for="wifi_pwrSTA">TXPWR as STA</label>
<select id="wifi_pwrSTA" name="wifi_pwrSTA">
<option value="80">Max (20dBm, 100mW, suggested)</option>
<option value="8">Min (2dBm, 2mW)</option>
<option value="44">Low (11dBm, 12mW)</option>
<option value="60">Mid (15dBm, 32mW)</option>
<option value="72">High (18dBm, 63mW)</option>
</select>
</div>
</div>
<div class="grid-container halves">
<div>
<label for="ntp_server">NTP Server</label>
<input type="text" name="ntp_server" id="ntp_server" placeholder="pool.ntp.org" title="NTP Server name or IP Address. I.e. pool.ntp.org. If your igate is in the HAMNET, use ntp.hc.r1.ampr.org.">
</div>
<div>
<label for="syslog_server">Syslog Server</label>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<input type="text" name="syslog_server" id="syslog_server" placeholder="" title="Syslog Server name or IP Address. Leave empty to switch off. If unsure, you may use the broadcast address 255.255.255.255. Syslog needs do be compiled in (it's by default now)">
</div>
</div>
<div class="grid-container thirds">
<div>
<label for="wifi_failAP">Allow failback to Mode AP</label>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<input name="wifi_failAP" id="wifi_failAP" type="checkbox" value="1" title="
If a remoteAP is configured or uptime <3min (grace time for him to be able to reach Webinterface for change config):
If wifi-client is connected:
If wifi_do_fallback_mode is enabled, we'll keep his connection alive.
else: we'll disconnect the wifi-client and search for a remoteAP
else: search for a remoteAP
else:
selfAP will stay on and connections are not interrupted.
Disable this for igates, where you don't need your tracker to be a hotspot; or if your phone (which knows your tracker's AP SSID) should not mis-interprete the tracker as Wifi-Hotspot with Internet-Access.
You like to enable, if you use your tracker portable and it should automatically be wifi client to your home network, and be AP if you are outside, and should not search for a remoteAP.">
</div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<div>
<label for="tncsrvr_en">Enable TNC-Server</label>
Support for heltec wireless tracker. And many fixes. Two weeks hard work. - Webserver config: - Allow freq to be configured down to 430.1000. Set to at minimum 430.150 if you use bandwith 250 kHz! - Added hint for wifi tcp kiss android config - platformio.ini: - less monolithic lib dependencies, because with heltec wireless tracker we have another radiolib and a TFT instead of OLED, no AXP chip, etc. - heltec section: need to have the many defineshere (two hand full are needed for TFT) - heltec wireless tracker: - long press (if WiFi off) sets the tracker to deep sleep (there's no real power-off due to the lack of an axp chip. But the current is very very low). See also notes at webserver config. - uses RadioLib SX126X - has no AXP chip, and the VEXT_CTRL pin only switches (both at the same time!), gps and tft. For power saving ("lora rx disabled" config setting), we can call radio.sleep(), and wake it up with radio.standby() - If you set gps to allow sleep, VEXT_CTRL turns also TFT. Be aware of it, it's not a bug but a hardware limitation. GPS sleep is for powersave. TFT off saves also power. That's what you should expect. On wakeup, tft is reinitialized. - Funny: If you do Serial.flush() and immediately call setCpuFrequencyMhz(adjust_cpuFreq_to), then USB chip is reset to a state before that what the esp32 driver inizializes. -> Serial.printf's don't work. This lead to Serial.print("CPU Freq ad"); Serial.flush(); setCpuFrequencyMhz(adjust_cpuFreq_to); // ..survived Serial.printf("justed to: %d MHz\r\n", adjust_cpuFreq_to); -> "CPU Freq ad" - and finito. => removed the flush() - TODO: bluetooth LE support. Unfortunately, the chip lacks support for classic bluetooth serial. If you need to connect aprsdroid to the device, look at the wifi tcp server description. - TTGO_T-Beam_LoRa_APRS.ino: - better platform dependend includes - I had a bad usb cable or switch with too less voltage which caused the ttgo to reboot -> Changes to minimum voltage for shutdown Disabled brownout detector (which was per default according to esp32 libs) WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); Please check if this would be a problem of deep discharging your akku: #if defined(T_BEAM_V1_0) || defined(T_BEAM_V1_2) - if (InpVolts > 4.3) { + //if (InpVolts > 4.3) { // No, my usb hub suddenly only made 4.1V + if (InpVolts > 4.0) { I suppose no, because AXP does it's job at thosee devices - Needed to define BATTERY_PIN for every hardware - Renamed definition of LOW to TXLED_LOW - What is key_up, t_lock and time_delay? Wrong, it's for button control. -> Changed the names to button_key_up, button_t_lock and button_time_delay - LORA_MAX_MESSAGE_LEN is for SX127X (B_RF95 lib), because it includes the 4 bytes header. For the RadioLib buffer we need to reserver more space. - quite nice hack for reusing the display.xxx() routines for tft (class Emulated_SSD1306 which provides the needed functions) - New OLED_LINE_LEN_MAX instead of hardcoded value 21, because heltec TFT has in the normal font a width of 25. - RadioLib calls interrupt drivven signal_new_packet_received after a packet was receeived. - RadioLib special: Added definition for lora speeds / coding rate, like they have been addigned in the BG_RF95 lib - Pseudo-Sema-Locks: does not work 100%. Avoided endless loop by adding ESP.restart after 5min Also a delay of 1s in LoraSend() to mitigate lock problems when digipeating to the second of the both frequencies. - BG_RF95 sometimes causes crashes, esp. in waitPacketSent(). Introduced a delay. 100ms between sendAprs() and waitPacketSend() Changed calls to rf95.waitAvailableTimeout() to rf95.available() for stability reasons. - richonguzman has a good docu for power readings for non-AXP-chips. I use it for the heltec wireles tracker We may think about using it on T_BEAM_V0_7 and the rest. Problem: intensive testing needed, and the old T_BEAM_V0_7 devices became rare. - timer_once_a_second(): This is ok: if (!freeze_display) fillDisplayLine1(0); //update time & uptime But the following operations destroyed line3to5 for a displayed "((RX))" packet. -> Commented it out. No side effects observed-. - write2display(): now uses caching (calls write2display_cached()). Reason: TFT flickers when updates happen too often. On the other hand, caching on OLED is not possible because calling display.clearDisplay() is mandatory, else you get a pixel puzzle with old and new characters at each position. TFT has no display.display() and also nothing like clearLine. -> IF we write a line, we have to add (when using the normal font) blanks at the end of the text (up to position 25)-. Also, instead of OLED, TFT cannot brak long lins to the next; that's why we need to break the line ourself. The "next" lines we use in this case must not be cached. - fillDisplayLine1: Word "Up:" was behind the uptime value (caused by one of the commits of the last weeks). Fixed. - If own callsign is still N0CALL, disable lora_tx and set txPower to 0. - If during setup init lora chip or display fails, do not for(;;); , but sleep 5min and do ESP.restart(). Else you cannot land on the moon ;) TODO: check for correct initialization of SX126X chip - Removed tuplicate "Time used since start"-message - start of taskGPS moved to setup_phase2 section - If you double-click (or better "dit daah") the user button, manual beacon is triggered (like the behaviour at the end of the section). Needed by someone driving a car and cannot look at the display menu page number. - long press (if WiFi off) sets the heltec wireeless trackeer to deep sleep (nearly off - see description above). If wifi is off, press two times (first long-press starts webserver; second one does the shutdown). If tracker is not compiled with WIFI, long-press does a shutdown on heltec and a a reboot on other devices. TODO (and TEST!): check if other non-AXP-chip esp32 devices would instead also profit from a deep sleep - Tests before radio.readData() on SX126X devices are easier (no locking; no call comparing to rf95.available()), because flag_lora_packet_available is set. Changed general variable name packet_available to flag_lora_packet_available. - In part "((TX))", enforce a display update: fillDisplayLines3to5(1); Reason: tracker had his first gps fix and transmits - but the OLED showed the old position during TX; the sent packet hat the correct current position. - taskGPS: - support for heltec wireless tracker (Pin assignment and correct bitrate) - fix: - Serial.println(gpsDataBuffer); + Serial.print(gpsDataBuffer); - taskTNC: - if (serial_bt_client_is_connected) { + if (enable_bluetooth && serial_bt_client_is_connected) { - taskWebServer.cpp: deadlock protection, as in TTGO_T-Beam_LoRa_APRS.ino - data_embed: style.css and js.js had many blanks and comments which needed a quite large amount of disk space. A new script ../tools/remove_comment_from_code.py (which also can be used as a library) removes them, but leaves copyright comments intact. Feel free to use it in other projects. In summuary, many changes $ git diff|wc -l 2470 Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-05-27 07:29:21 +00:00
<input name="tncsrvr_en" id="tncsrvr_en" type="checkbox" value="1" title="Enable TNC-Server (KISS over TCP) on port tcp 8001. If your device in open networks like HAMNET, enable it only when needed and consider firewalling. If you use aprsdroid connected to this devices in WiFi-mode-AP, configure: 'Protocol' 'TNC (KISS)', 'Connection type' 'TCP/IP' and 'Server' '192.168.4.1:8001'">
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
</div>
<div>
<label for="gpssrv_en">Enable GPS-Server</label>
<input name="gpssrv_en" id="gpssrv_en" type="checkbox" value="1" title="Enable GPS-Server (NMEA on port tcp 10110. If your device in open networks like HAMNET, enable it only when needed and consider firewalling.">
</div>
</div>
2021-03-08 21:47:00 +00:00
<div class="grid-container full">
<input class="button-primary" type="submit" value="Save (reboot needed after changes in this section)">
2022-03-03 15:10:23 +00:00
</div>
2021-02-18 16:59:18 +00:00
</form>
</article>
</section>
<section>
<article>
<div class="grid-container full">
<h2 class="u-full-width">APRS Settings</h2>
</div>
2021-02-18 16:59:18 +00:00
<form action="/save_aprs_cfg" method="post">
<div class="grid-container full">
<h5 class="u-full-width">Transmission Settings</h5>
</div>
<div class="grid-container halves">
<div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<label for="lora_freq">Main Frequency [MHz]</label>
Support for heltec wireless tracker. And many fixes. Two weeks hard work. - Webserver config: - Allow freq to be configured down to 430.1000. Set to at minimum 430.150 if you use bandwith 250 kHz! - Added hint for wifi tcp kiss android config - platformio.ini: - less monolithic lib dependencies, because with heltec wireless tracker we have another radiolib and a TFT instead of OLED, no AXP chip, etc. - heltec section: need to have the many defineshere (two hand full are needed for TFT) - heltec wireless tracker: - long press (if WiFi off) sets the tracker to deep sleep (there's no real power-off due to the lack of an axp chip. But the current is very very low). See also notes at webserver config. - uses RadioLib SX126X - has no AXP chip, and the VEXT_CTRL pin only switches (both at the same time!), gps and tft. For power saving ("lora rx disabled" config setting), we can call radio.sleep(), and wake it up with radio.standby() - If you set gps to allow sleep, VEXT_CTRL turns also TFT. Be aware of it, it's not a bug but a hardware limitation. GPS sleep is for powersave. TFT off saves also power. That's what you should expect. On wakeup, tft is reinitialized. - Funny: If you do Serial.flush() and immediately call setCpuFrequencyMhz(adjust_cpuFreq_to), then USB chip is reset to a state before that what the esp32 driver inizializes. -> Serial.printf's don't work. This lead to Serial.print("CPU Freq ad"); Serial.flush(); setCpuFrequencyMhz(adjust_cpuFreq_to); // ..survived Serial.printf("justed to: %d MHz\r\n", adjust_cpuFreq_to); -> "CPU Freq ad" - and finito. => removed the flush() - TODO: bluetooth LE support. Unfortunately, the chip lacks support for classic bluetooth serial. If you need to connect aprsdroid to the device, look at the wifi tcp server description. - TTGO_T-Beam_LoRa_APRS.ino: - better platform dependend includes - I had a bad usb cable or switch with too less voltage which caused the ttgo to reboot -> Changes to minimum voltage for shutdown Disabled brownout detector (which was per default according to esp32 libs) WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); Please check if this would be a problem of deep discharging your akku: #if defined(T_BEAM_V1_0) || defined(T_BEAM_V1_2) - if (InpVolts > 4.3) { + //if (InpVolts > 4.3) { // No, my usb hub suddenly only made 4.1V + if (InpVolts > 4.0) { I suppose no, because AXP does it's job at thosee devices - Needed to define BATTERY_PIN for every hardware - Renamed definition of LOW to TXLED_LOW - What is key_up, t_lock and time_delay? Wrong, it's for button control. -> Changed the names to button_key_up, button_t_lock and button_time_delay - LORA_MAX_MESSAGE_LEN is for SX127X (B_RF95 lib), because it includes the 4 bytes header. For the RadioLib buffer we need to reserver more space. - quite nice hack for reusing the display.xxx() routines for tft (class Emulated_SSD1306 which provides the needed functions) - New OLED_LINE_LEN_MAX instead of hardcoded value 21, because heltec TFT has in the normal font a width of 25. - RadioLib calls interrupt drivven signal_new_packet_received after a packet was receeived. - RadioLib special: Added definition for lora speeds / coding rate, like they have been addigned in the BG_RF95 lib - Pseudo-Sema-Locks: does not work 100%. Avoided endless loop by adding ESP.restart after 5min Also a delay of 1s in LoraSend() to mitigate lock problems when digipeating to the second of the both frequencies. - BG_RF95 sometimes causes crashes, esp. in waitPacketSent(). Introduced a delay. 100ms between sendAprs() and waitPacketSend() Changed calls to rf95.waitAvailableTimeout() to rf95.available() for stability reasons. - richonguzman has a good docu for power readings for non-AXP-chips. I use it for the heltec wireles tracker We may think about using it on T_BEAM_V0_7 and the rest. Problem: intensive testing needed, and the old T_BEAM_V0_7 devices became rare. - timer_once_a_second(): This is ok: if (!freeze_display) fillDisplayLine1(0); //update time & uptime But the following operations destroyed line3to5 for a displayed "((RX))" packet. -> Commented it out. No side effects observed-. - write2display(): now uses caching (calls write2display_cached()). Reason: TFT flickers when updates happen too often. On the other hand, caching on OLED is not possible because calling display.clearDisplay() is mandatory, else you get a pixel puzzle with old and new characters at each position. TFT has no display.display() and also nothing like clearLine. -> IF we write a line, we have to add (when using the normal font) blanks at the end of the text (up to position 25)-. Also, instead of OLED, TFT cannot brak long lins to the next; that's why we need to break the line ourself. The "next" lines we use in this case must not be cached. - fillDisplayLine1: Word "Up:" was behind the uptime value (caused by one of the commits of the last weeks). Fixed. - If own callsign is still N0CALL, disable lora_tx and set txPower to 0. - If during setup init lora chip or display fails, do not for(;;); , but sleep 5min and do ESP.restart(). Else you cannot land on the moon ;) TODO: check for correct initialization of SX126X chip - Removed tuplicate "Time used since start"-message - start of taskGPS moved to setup_phase2 section - If you double-click (or better "dit daah") the user button, manual beacon is triggered (like the behaviour at the end of the section). Needed by someone driving a car and cannot look at the display menu page number. - long press (if WiFi off) sets the heltec wireeless trackeer to deep sleep (nearly off - see description above). If wifi is off, press two times (first long-press starts webserver; second one does the shutdown). If tracker is not compiled with WIFI, long-press does a shutdown on heltec and a a reboot on other devices. TODO (and TEST!): check if other non-AXP-chip esp32 devices would instead also profit from a deep sleep - Tests before radio.readData() on SX126X devices are easier (no locking; no call comparing to rf95.available()), because flag_lora_packet_available is set. Changed general variable name packet_available to flag_lora_packet_available. - In part "((TX))", enforce a display update: fillDisplayLines3to5(1); Reason: tracker had his first gps fix and transmits - but the OLED showed the old position during TX; the sent packet hat the correct current position. - taskGPS: - support for heltec wireless tracker (Pin assignment and correct bitrate) - fix: - Serial.println(gpsDataBuffer); + Serial.print(gpsDataBuffer); - taskTNC: - if (serial_bt_client_is_connected) { + if (enable_bluetooth && serial_bt_client_is_connected) { - taskWebServer.cpp: deadlock protection, as in TTGO_T-Beam_LoRa_APRS.ino - data_embed: style.css and js.js had many blanks and comments which needed a quite large amount of disk space. A new script ../tools/remove_comment_from_code.py (which also can be used as a library) removes them, but leaves copyright comments intact. Feel free to use it in other projects. In summuary, many changes $ git diff|wc -l 2470 Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-05-27 07:29:21 +00:00
<input name="lora_freq" id="lora_freq" type="number" min="430.1000" max="928.0000" step="0.0001" title="LoRa center frequency between 430.1000 and 928.0000. I.e. 433.775">
</div>
<div>
<label for="lora_speed">Speed</label>
<select id="lora_speed" name="lora_speed">
2021-10-16 05:48:17 +00:00
<option value="300">BW 125khz CR 4:5 SF 12 (Slow Standard, 300bps)</option>
<option value="240">BW 125khz CR 4:6 SF 12 (244bps)</option>
<option value="210">BW 125khz CR 4:7 SF 12 (209bps)</option>
<option value="180">BW 125khz CR 4:8 SF 12 (183bps)</option>
<option value="610">BW 125khz CR 4:8 SF 10 (610bps)</option>
2021-10-16 05:48:17 +00:00
<option value="1200">BW 125khz CR 4:7 SF 9 (Fast Standard, 1200bps)</option>
</select>
</div>
2022-03-03 15:10:23 +00:00
<div>
<label for="lora_tx_en">Enable LoRa transmitter</label>
2023-06-15 18:42:49 +00:00
<input name="lora_tx_en" id="lora_tx_en" type="checkbox" value="1" title="Allow TX on LoRa. Disable this if you like to prevent TX under all circumstances (i.e. if your tracker is behind an rx-amplifier). If this checkbox keeps off after trying to enable, you might check if your configured CALLSIGN-SSID is correct (see explanation there).">
2022-03-03 15:10:23 +00:00
</div>
<div>
<label for="lora_rx_en">Enable LoRa receiver</label>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<input name="lora_rx_en" id="lora_rx_en" type="checkbox" value="1" title="Allow RX on LoRa. Disable this if you need to save power consumption; LoRa chip will be only powered on during TX. Only honored if lora_digipeating_mode == 0 and no bluetooth client is connected on boot">
2022-03-03 15:10:23 +00:00
</div>
<div>
<label for="txPower">TX power [dBm]</label>
<input name="txPower" id="txPower" type="number" min="0" max="23" title="LoRa TX Power. Range 0 to 23dBm">
</div>
<div>
<label for="preambleLen">TX preamble length [symbols]</label>
Fixes and improvements: preamble, gps powersaving mode, LH, .. - web: - preamble: A bit more detailed description, with suggestion to try value 12 (default is 8) Assurance in taskWebserver that value is >= 8. - sb_angle: min is 5 but text said Range 0 to 360. - GPS: new "GPS powersaving mode". Still testing. "Made GPS may sleep when running on battery" default. - GPS powersaving mode: If you have problems, set it to "Ignore this feature". While looking at the power consumption, GPS has a quite high power consumption. If we have no fix for 10min, we go to sleep mode. Interval Sleep 1min, 2min, 4min, 8min, 1min, 2min, .. Awake 120, next: 60s, next: 40, next: 30s After 4 rounds, we run GPS 10min again (better chance to refresh the almanach). During sleep, taskGPS is suspended and gps chip is powered off. -> This algorithm saves reduces the power consumption of the GPS chip to ~30%. If it behaves good, more fine-tuning can be done (i.E. switching it earlier off if you don't move. Reduce the initial fix-loss-time of 10min, ..) LCD shows "GPS: sleep" when GPS is in power saving mode. If it awakes and has no fix, it shows (as usual) GPS: age nnn". - preamble changes: - TX setting: Now only affects main qrg. Perhaps it's wiser to be able to set it in more detail: Main, Secondary, Both. Or with different values for the different frequencies. - RX setting: moved to loraSend(), where default rx values are reset after TX - LCD: - "GPS: sleep" as described above - Tried to improve the readibility of the LastHeard lines. Need to verify Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-04-24 11:36:39 +00:00
<input name="preambleLen" id="preambleLen" type="number" min="8" max="4096" title="A larger preamble size improves packet detection but increases transmission time. Range 8 to 4096 symbols. 8 is default. Please experiment with 12. This setting only affects transmission on Main frequency." placeholder="8">
</div>
2022-03-03 15:10:23 +00:00
<div>
<label for="lora_cradapt">Automatic CodeRate adaption on TX</label>
<input name="lora_cradapt" id="lora_cradapt" type="checkbox" value="1" title="Enable automatic CR adaption. Has only influence on TX (RX can decode every CR). Use this only if you are not a WIDE1 or WIDE2 digi (here you like to send always with higher speed). Still testing, if it behaves good to our network. Currently works only for SF12 modes, because for SF 10 and lower the code for programming CR+SF+BW-combination has not been written yet">
</div>
<div>
<label for="aprs_blist">Filter src-calls or calls in digipath on receiption</label>
<input type="text" name="aprs_blist" id="aprs_blist" title="Filter out specified source calls or calls in digipath on receiption -> no repeating, no igate, not visible via kiss. They don't exist ;). List calls separated by ',': DL1AAA,DL1BBB'. This filters out DL1AAA without SSID AND with SSID. If you specify DL1AAA-1, only DL1AAA-1 is filtered out. If you specify DL1AAA-0 (special case), then only packets from DL1AAA are filtered out.">
2022-03-03 15:10:23 +00:00
</div>
</div>
<div class="grid-container halves">
<div>
<label for="lora_rssi2p">Add SNR and RSSI to path. '*': only if heard direct (recommended for many usecases). '~': not recommended; better let user decide with Q-addressing</label>
<select id="lora_rssi2p" name="lora_rssi2p">
<option value="0">off</option>
<option value="1">To RF duing digipeating (~)</option>
<option value="2">To KISS</option>
<option value="4">To APRSIS (~)</option>
<option value="3">To RF and KISS (~)</option>
<option value="5">To RF and APRSIS (~)</option>
<option value="6">To KISS and APRSIS (~)</option>
<option value="7">To RF and KISS and APRSIS (~)</option>
2022-03-03 15:10:23 +00:00
<option value="8">To RF*</option>
<option value="16">To KISS*</option>
<option value="32">To APRSIS*</option>
<option value="34">To APRSIS* and KISS (recommended with aprsdroid for or digis)</option>
<option value="48">To APRSIS* and KISS* (recommended for digis)</option>
<option value="42">To APRSIS* and RF* and KISS (recommended digis while testing)</option>
<option value="56">To APRSIS* and RF* and KISS* (also a good setting!)</option>
<option value="35">To APRSIS* and RF and KISS (~)</option>
<option value="49">To APRSIS* and RF and KISS* (~)</option>
<option value="57">!Too much options. GUI needs redesign!</option>
<option value="9">!I.e. To RF* and RF would not make any sense!</option>
2022-03-03 15:10:23 +00:00
</select>
</div>
<div>
<label for="snraprsis">SNR/RSSI-encoding on kiss: compatible to APRS-IS?</label>
<input name="snraprsis" id="snraprsis" type="checkbox" value=1 title="Add snr+rssi at last digipeater, without digipeated flag. Use this for APRS-IS connections. If you have connected a digipeater software to kiss, this option has to be switched off">
<div>
More info for SNR/RSSI path encoding see documentation section below
</div>
2022-03-03 15:10:23 +00:00
</div>
</div>
2021-07-11 09:54:11 +00:00
<div class="grid-container full">
<h5 class="u-full-width">Station Settings</h5>
</div>
2021-02-18 16:59:18 +00:00
<div class="grid-container quarters">
<div>
<label for="aprs_callsign">Callsign and SSID *</label>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<input class="u-full-width" type="text" minlength="3" maxlength="9" name="aprs_callsign" placeholder="NOCALL-1" id="aprs_callsign" title="your callsign with SSID. SSID is optional and should be in the range of -1 to -15. SSIDs like '-L4' are ok for aprs-is, but should not be sent on RF; thus LoRa TX will be disabled.">
2021-02-18 16:59:18 +00:00
</div>
<div>
<label for="aprs_relay_path">Relay Path</label>
<input class="u-full-width" type="text" minlength="0" name="aprs_relay_path" id="aprs_relay_path" title="APRS path, use the shortest as possible, WIDE1-1 or WIDE2-1. If you really need a fill-in-digi, choose WIDE1-1,WIDE2-1. RFONLY or NOGATE must not be set in front of WIDEn-m. WIDE2-1,WIDE1-1 is not valid. The path with value '1' enables dest-path-digi-notation (like DL9SAU>APRS-1:..) instead of Path ..,WIDE1-1:... If you are a transmitting igate, please leave empty (or set it to Q. See below). About the SNR/RSSI-Path feature: You may request to add SNR/RSSI by adding 'Q' to your path (i.e. 'WIDE1-1,Q'; for transmitting igates (and balloons, aircrafts, ..), only 'Q' is recommended). Then only the first digi (or igate) adds SNR/RSSI to the path. If you add 'QQ' instead of 'Q' to your path (i.e. 'WIDE1-1,QQ'). Then every digi and igate adds SNR/RSSI to the path (useful for analyzing RF net quality). Use with care; resulting longer path consumes a bit more airtime.">
2021-02-18 16:59:18 +00:00
</div>
<div>
<label for="aprs_s_table">Symbol Table</label>
2021-03-08 18:51:01 +00:00
<input class="u-full-width" type="text" minlength="1" maxlength="1" name="aprs_s_table" id="aprs_s_table" title="use primary / or secondary table \ ">
2021-02-18 16:59:18 +00:00
</div>
<div>
<label for="aprs_symbol">Symbol</label>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<input class="u-full-width" type="text" minlength="1" maxlength="1" name="aprs_symbol" id="aprs_symbol" title="select an icon, for example: [ - jogger, Y - jacht, > - car, b - bike">
2021-02-18 16:59:18 +00:00
</div>
2023-06-15 18:42:49 +00:00
<div>
<label for="aprs_objnam">ObjectName (optional)</label>
<input class="u-full-width" type="text" minlength="0" maxlength="9" name="aprs_objnam" id="aprs_objnam" title="This is optional; most users will leave this empty. If you set this to DL1AAA-L4 because like to see your gateway as DL1AAA-L4 on the map (and also like to send on RF), we'll send our position as type APRS Object (instead of a normal aprs position), with the configured Callsign you configured above.">
</div>
2021-03-08 17:55:52 +00:00
<div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<label for="aprs_alt_r">Altitude ratio [%]</label>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<input name="aprs_alt_r" id="aprs_alt_r" type="number" min="0" max="100" title="Altitude ratio every n'th packet.. Use 100 for every packet, 0 for no altitude, or any number in between. Recommended: 10 (altitude every tenth's beacon). If you use compression ('Send Course/Speed along with Altitude switched off') for reducing airtime (-> then n% altitude-encoding packets are sent, and 100-n% course/speed-encoded packets), you may choose 50 for ballons, where speed/dir and altitude are of equal interrest; if you choose 10, then 90 % of your transmissions encode speed/direction. Cave: if you set it to 100 and switch next option 'Always send CSE/SPD and ALT' to off, then only altitude packets are sen; if you switch the next option on, then altitude is always sent and this configured Altitude ratio is ignored. If you configure 0, altitude is never sent (-> only compressed speed). If ratio is < 100 and gps altitude is not refreshed, only encoded speed is sent." placeholder="10">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
2021-03-08 22:59:33 +00:00
<div>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<label for="aprs_CSandA">Always send CSE/SPD and ALT</label>
<input name="aprs_CSandA" id="aprs_CSandA" type="checkbox" value="1" title="If set to on, course/speed and altitude are always sent both in one (larger) packet. If gps signal for course/speed is valid, cse/spd will be encoded in the compressed part and altitude is added as /A=...... in the message-part (this actually overwrites altitude ratio = 100 setting in most cases). If set off, either compressed cse/spd OR compressed altitude packets are sent, according to the 'Altitude ratio' setting.">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
2021-02-18 16:59:18 +00:00
<div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<label for="show_cmt">Show Comment</label>
<input name="show_cmt" id="show_cmt" type="checkbox" value="1" title=" show comment text">
2021-02-18 16:59:18 +00:00
</div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<div>
<label for="aprs_comm_rt">Ratelimit adding comment text</label>
<input name="aprs_comm_rt" id="aprs_comm_rt" type="checkbox" value="1" title="If enabled, comment text is sent only every tenth's transmission. Saves airtime.">
</div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<div>
<label for="aprs_comment">Comment</label>
<input class="u-full-width" type="text" minlength="0" maxlength="64" name="aprs_comment" id="aprs_comment" title=" personal comment">
</div>
2021-02-18 16:59:18 +00:00
<div>
<label for="aprs_batt">Show Battery</label>
2021-03-08 18:51:01 +00:00
<input name="aprs_batt" id="aprs_batt" type="checkbox" value="1" title=" show battery voltage after personal comment">
2021-02-18 16:59:18 +00:00
</div>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<div>
<label for="aprs_stat_wl">Add winlink notification to position comment once/hour</label>
<select id="aprs_stat_wl" name="aprs_stat_wl">
<option value="0">off (default)</option>
<option value="1">on, if bluetooth kiss device is connected</option>
<option value="2">on</option>
</select>
</div>
<div>
<label for="aprs_stat_qrt">Send Status-packet on shutdown</label>
<input name="aprs_stat_qrt" id="aprs_stat_qrt" type="checkbox" value="1" title=" Send status packet 'QRT' right before shutdown on RF. See also option 'Auto power off' if external power is switched off">
</div>
<div>
*) requires reboot only if connection to aprs-is enabled
</div>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Telemetry Settings</h5>
</div>
<div class="grid-container thirds">
<div>
2021-09-12 03:58:56 +00:00
<label for="tnc_tel">Enable Self Telemetry</label>
<input name="tnc_tel" id="tnc_tel" type="checkbox" value="1" title="send self telemetry data">
2021-09-12 03:58:56 +00:00
</div>
<div>
<label for="tnc_tel_rf">Allow TX on RF</label>
<select id="tnc_tel_rf" name="tnc_tel_rf" title="LoRa is too slow for telemetry. Only on secondary qrg, TX is acceptable: if speed is >= 1200 (comparable to 1k2 AFSK APRS on 2m). We will not add a digipeater to the packet header. TX on main qrg is disabled; there are very few useful reasons, i.e. balloon missions. Read the comment in the source code; you need to hack and recompile.">
<option value="0">no (good!)</option>
<option value="2">on secondary qrg (acceptable)</option>
<option value="1">on main qrg (bad)</option>
<option value="3">on both frequencies (even worse)</option>
</select>
</div>
2021-09-12 03:58:56 +00:00
<div>
<label for="tnc_tel_int">Self Telemetry Interval [s]</label>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<input name="tnc_tel_int" id="tnc_tel_int" type="number" min="600" title="time between sending telemetry if Enable Self Telemetry option is selected. 3600 is recommended. Min 600.">
</div>
<div>
<label for="tnc_tel_mic">Self Telemetry Sequence</label>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<select id="tnc_tel_mic" name="tnc_tel_mic" title="self telemetry sequence type (only 'numeric' sequences and 'time based numeric sequences' are supported by aprs.fi and aprsdirect.de). Time based secuence needs a proper system time (GPS or NTP); else it fails back to 'MIC'. Sequence overflow: Type 'time based, alphanumeric' uses digits and letters 0-9,A-Z,a-z and has a resolution of 23s in two months; 'numeric timebased' has only digits and has resolotuin of 10min in one week. Type 'Numeric' (except for numeric time based): Caution: sequence number is stored to flash; flash has a limited number of writes before it becomes defect.">
<option value="-2">Time based, numeric encoding</option>
<option value="-1">Time based, alphanumeric encoding</option>
<option value="0">Numeric</option>
<option value="1">MIC</option>
</select>
</div>
2021-09-19 14:57:43 +00:00
<div>
<label for="tnc_tel_path">Self Telemetry Relay Path</label>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<input class="u-full-width" type="text" minlength="0" name="tnc_tel_path" id="tnc_tel_path" title="APRS path for self telemetry, use the shortest as possible (empty path is recommended; for aprs-is connection, no path is necessary). Or use WIDE2-1. Path is not honored on RF transmission.">
2021-09-19 14:57:43 +00:00
</div>
2021-02-18 16:59:18 +00:00
</div>
2021-07-11 09:54:11 +00:00
<div class="grid-container full">
<h5 class="u-full-width">Fixed Beaconing Settings</h5>
</div>
<div class="grid-container thirds">
2021-02-18 16:59:18 +00:00
<div>
2021-03-08 18:51:01 +00:00
<label for="aprs_fixed_beac">Fixed Beacon</label>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<input name="aprs_fixed_beac" id="aprs_fixed_beac" type="checkbox" value="1" title="enable fixed beacon when GPS is disabled or no fix". If set to off, your tracker will not send the configured fixed position (but only the current GPS position, after GPS-fix), except: if you maually send a position-beacon (using middle button, web-interface, cli), it starts sending in Fixed Beacon Interval (like Fixed Beacon would be enabled)>
2021-02-18 16:59:18 +00:00
</div>
<div>
2021-07-11 09:54:11 +00:00
<label for="aprs_fb_interv">Fixed Beacon Interval [s]</label>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<input name="aprs_fb_interv" id="aprs_fb_interv" type="number" min="120" title="time between sending a beacon if Fixed Beacon option is selected. 1800 or 3600 is recommended for users; 900 or 1800 for digis. Min 120. This beacon value is also used if GPS is lost when smart-beacooning. If it is >= sb_max_intervall, this value is used.">
2021-02-18 16:59:18 +00:00
</div>
</div>
<div class="grid-container thirds">
2021-02-18 16:59:18 +00:00
<div>
<label for="aprs_lat_p">Latitude</label>
<input type="text" minlength="0" name="aprs_lat_p" id="aprs_lat_p" title="latitude for fixed beacon, APRS format for example: 5215.00N (this is ddmm.mmN). 'dd.nnnnN', '-dd.nnnn', 'dd mm[.nnn]' and 'dd mm ss' and 'dd mm' ss&quot;' and 'dd-mm[.nn]N' are also supported. If position is south, you can prefix '-' instead of writing 'S' behind the coordinate. '-nnS' does not make sense. If you like to add a locator, add it here and leave longitude field blank. APRS spec defindes a special notation for null-position: 0000.00N 00000.00W (W, not E). If GPS is enabled and a valid position has been received, that one will be used instead of the configured one, until the next system reboot">
2021-02-18 16:59:18 +00:00
</div>
<div>
<label for="aprs_lon_p">Longitude</label>
<input type="text" minlength="0" name="aprs_lon_p" id="aprs_lon_p" title="longtitude for fixed beacon, APRS format for example 02050.59Ei (this is ddd.mmE). 'ddd.nnnnE', '-ddd.nnnn', 'ddd mm[.nnn]' and 'ddd mm ss' and 'ddd mm' ss&quot;' and 'ddd-mm[.nn]E' are also supported. If position is west, you can prefix '-' instead of writing 'W' behind the coordinate. '-nnW' does not make sense.. If you like to add a locator, add it to the latitude field and leave this field blank. APRS spec defindes a special notation for null-position: 0000.00N 00000.00W (W, not E). If GPS is enabled and a valid position has been received, that one will be used instead of the configured one, until the next system reboot">
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
</div>
<div>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<label for="aprs_llfgps">Instead, store current GPS position</label>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<input name="aprs_llfgps" id="aprs_llfgps" type="checkbox" value="1" title="Use lat/lon of current GPS position. Overwrites Latitude / Longitude settings above. Requires valid GPS position.">
</div>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Position format and precision / ambiguity</h5>
</div>
<div class="grid-container full">
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<div>
<label for="pos_amb">Position precision *</label>
<select id="pos_amb" name="pos_amb" title="Position precision / Ambiguity
I. High precision: default is compressed (sends cse/speed or altitude without overhead; position is more acurate than uncompressed position, and needs only 8 bytes for lat/lon (but the price is, that the position is not human readable) and it's resolution is 29.17cm for latitude distances, and up to 58.34cm for longitude. Be aware that course has a resolution of only 4 degrees, and height resolution is non-linear (1.002^cs), and could not be negative.
Uncompressed (APRS default notation) is not very precise: >18.52m (APRS Notation 1234.56N/01234.56E == 12-34.56N 012-34.56E).
Uncompressed can be enhanced with the DAO extension in Text message part: !W..!: 1.852m or !w..!: 20.35cm to 22.39cm. DAO W is better human readable; DAO w is base91-encoded (-> precision loss for the decimals 3+4 by factor 1.10); good for manually positioning your digipeager antenna or fox hunting equipment on the map - but keep in mind that your GPS does not have this great precision anyway.
Uncompressed (with / without DAO): If GPS signal is lost and you was not moving and last coordinates have not changed, DAO variant will still be used if configured.
II: Ambiguiti 1/10' -> >185.2m), 1' -> > 1.852km, 10' -> >18.12km, 1 deg == 60'-> >111.12km. Works for both modes, compressed and uncompressed.
III: Values above are referring to latitude; distance between two latitudes is always equal; distance between two longitudes becomes smaller towards the north / south poles of the earth (at 0 deg, even high values align to 0.0m). At aequator, lat/lon relation is 1:1. At 60 deg N or S it's about factor 2).
Keep in mind: While this is is good for high precision, it's worse for ambiguity.
Compressed positions have a 2 times lesser precision on the longitude, which leads to factor 1:2 at aequator, and an 1:1 ratio at abt. 60 deg N or S); this is comparable how maidenhead grid locators are defined.">
<option value="0">Compressed (default) == >25.17cm</option>
<option value="-1">Uncompressed == >18.52m.</option>
<option value="-2">Uncompressed, with DAO W == >1.852m</option>
<option value="-3">Uncompressed, with DAO w == >20.35cm</option>
<option value="1">Ambiguity 1/10' == 185.2m</option>
<option value="2">Ambiguity 1' == >1.852km</option>
<option value="3">Ambiguity 10' == >18.12km</option>
<option value="4">Ambiguity 1 deg == 60' == >111.12km</option>
</select>
2021-02-18 16:59:18 +00:00
</div>
</div>
2021-07-11 09:54:11 +00:00
<div class="grid-container full">
<h5 class="u-full-width">Smart Beaconing Settings</h5>
</div>
<div class="grid-container quarters">
<div>
<label for="sb_min_interv">Min interval [s]</label>
<input class="u-full-width" name="sb_min_interv" id="sb_min_interv" type="number" min="10" title="Minimal time for Smart Beaconing. 60 is recommended. Min 10.">
2021-07-11 09:54:11 +00:00
</div>
<div>
<label for="sb_max_interv">Max interval [s]</label>
<input class="u-full-width" name="sb_max_interv" id="sb_max_interv" type="number" min="90" title="Maximal time for Smart Beaconing. 1800 is recommended. Min 90.">
2021-07-11 09:54:11 +00:00
</div>
<div>
<label for="sb_min_speed">Min speed [km/h]</label>
<input class="u-full-width" name="sb_min_speed" id="sb_min_speed" type="number" min="0" title="Minimal speed for Smart Beaconing. Min 0.">
2021-07-11 09:54:11 +00:00
</div>
<div>
<label for="sb_max_speed">Max speed [km/h]</label>
<input class="u-full-width" name="sb_max_speed" id="sb_max_speed" type="number" min="1" title="Maximal speed for Smart Beaconing. Min 1.">
2021-07-11 09:54:11 +00:00
</div>
</div>
<div class="grid-container thirds">
<div>
<label for="sb_angle">Course change [degrees]</label>
Fixes and improvements: preamble, gps powersaving mode, LH, .. - web: - preamble: A bit more detailed description, with suggestion to try value 12 (default is 8) Assurance in taskWebserver that value is >= 8. - sb_angle: min is 5 but text said Range 0 to 360. - GPS: new "GPS powersaving mode". Still testing. "Made GPS may sleep when running on battery" default. - GPS powersaving mode: If you have problems, set it to "Ignore this feature". While looking at the power consumption, GPS has a quite high power consumption. If we have no fix for 10min, we go to sleep mode. Interval Sleep 1min, 2min, 4min, 8min, 1min, 2min, .. Awake 120, next: 60s, next: 40, next: 30s After 4 rounds, we run GPS 10min again (better chance to refresh the almanach). During sleep, taskGPS is suspended and gps chip is powered off. -> This algorithm saves reduces the power consumption of the GPS chip to ~30%. If it behaves good, more fine-tuning can be done (i.E. switching it earlier off if you don't move. Reduce the initial fix-loss-time of 10min, ..) LCD shows "GPS: sleep" when GPS is in power saving mode. If it awakes and has no fix, it shows (as usual) GPS: age nnn". - preamble changes: - TX setting: Now only affects main qrg. Perhaps it's wiser to be able to set it in more detail: Main, Secondary, Both. Or with different values for the different frequencies. - RX setting: moved to loraSend(), where default rx values are reset after TX - LCD: - "GPS: sleep" as described above - Tried to improve the readibility of the LastHeard lines. Need to verify Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-04-24 11:36:39 +00:00
<input name="sb_angle" id="sb_angle" type="number" min="5" max="360" title="Angle of course change to speed up beacon transmission. Recommended value: 28. Range 5 to 360.">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
<div>
<label for="sb_turn_slope">Turn Slope [degrees]</label>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<input name="sb_turn_slope" id="sb_turn_slope" type="number" min="5" max="255" title="Smart beaconing turn slope. Use 7 for pedestrian, 11 for low/mid speed and 26 for high speed. Recommended value: 26. Range 5 to 255.">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
<div>
<label for="sb_turn_time">Turn Time [seconds]</label>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<input name="sb_turn_time" id="sb_turn_time" type="number" min="5", title="Smart beaconing turn time. Wait at least this amount of seconds for next beacon. Recommended value: 30. Min 5.">
</div>
2021-07-11 09:54:11 +00:00
</div>
2021-03-08 17:55:52 +00:00
<div class="grid-container quarters">
<div>
<label for="gps_enabled">GPS enabled *</label>
2021-03-08 18:51:01 +00:00
<input name="gps_enabled" id="gps_enabled" type="checkbox" value="1" title="enable or disable GPS">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
Fixes and improvements: preamble, gps powersaving mode, LH, .. - web: - preamble: A bit more detailed description, with suggestion to try value 12 (default is 8) Assurance in taskWebserver that value is >= 8. - sb_angle: min is 5 but text said Range 0 to 360. - GPS: new "GPS powersaving mode". Still testing. "Made GPS may sleep when running on battery" default. - GPS powersaving mode: If you have problems, set it to "Ignore this feature". While looking at the power consumption, GPS has a quite high power consumption. If we have no fix for 10min, we go to sleep mode. Interval Sleep 1min, 2min, 4min, 8min, 1min, 2min, .. Awake 120, next: 60s, next: 40, next: 30s After 4 rounds, we run GPS 10min again (better chance to refresh the almanach). During sleep, taskGPS is suspended and gps chip is powered off. -> This algorithm saves reduces the power consumption of the GPS chip to ~30%. If it behaves good, more fine-tuning can be done (i.E. switching it earlier off if you don't move. Reduce the initial fix-loss-time of 10min, ..) LCD shows "GPS: sleep" when GPS is in power saving mode. If it awakes and has no fix, it shows (as usual) GPS: age nnn". - preamble changes: - TX setting: Now only affects main qrg. Perhaps it's wiser to be able to set it in more detail: Main, Secondary, Both. Or with different values for the different frequencies. - RX setting: moved to loraSend(), where default rx values are reset after TX - LCD: - "GPS: sleep" as described above - Tried to improve the readibility of the LastHeard lines. Need to verify Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-04-24 11:36:39 +00:00
<div>
<label for="gps_pwrsve">GPS powersaving mode</label>
<select id="gps_pwrsve" name="gps_pwrsve" title="If there's no GPS fix, allow GPS to go to sleep (chip powered off; taskGPS will suspend). Chip awakes for 1 minute, looking for a fix; if no ifx, sleeps again. Sleep interval is: 1min, 2min, 4min, 8min, 1min, ... You can decide if it may always sleep, or only when you run on battery (default), or if GPS should always be on (according to GPS enabled setting).">
<option value="1">GPS may sleep when running on battery (default)</option>
<option value="2">GPS always may sleep</option>
<option value="0">Ignore this feature</option>
</select>
</div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<div>
<label for="kiss_myloc_ok">Accept own positions via KISS</label>
<input name="kiss_myloc_ok" id="kiss_myloc_ok" type="checkbox" value="1" title="If set to true, we'll stop sending own position beacons if we heard a position from our call via kiss. Uncheck this, if you like to filter out those positions and keep sending it by this device.">
</div>
<div>
<label for="gps_sleep_ok">Allow GPS sleep while own positions received via KISS</label>
<input name="gps_sleep_ok" id="gps_sleep_ok" type="checkbox" value="1" title="If we have a kiss client like aprsdroid, or a digipeater software, which sends own positions (with same call as ours), we pause sending own positions (neither fixed nor smart beaconing). Uncheck, if you have a display attached and still like to see your current GPS position. This option is only honored if configuration 'Accept own positions via KISS' enabled. Why? If your filter out own positions from and this device sends on it's own, it needs gps running ;)">
</div>
<div>
*) requires reboot only if you change enable/disable GPS
</div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
<div class="grid-container full">
<h6 class="u-full-width">Additional settings for secondary frequency:<br/>EXPERIMENTAL - USE WITH CARE!</h6>
</div>
<div class="grid-container halves">
<div>
<label for="lora_freq_x">Secondary Frequency [MHz]</label>
2022-03-03 15:10:23 +00:00
(for cross-repeating or listening transmissions from igates)</label>
Support for heltec wireless tracker. And many fixes. Two weeks hard work. - Webserver config: - Allow freq to be configured down to 430.1000. Set to at minimum 430.150 if you use bandwith 250 kHz! - Added hint for wifi tcp kiss android config - platformio.ini: - less monolithic lib dependencies, because with heltec wireless tracker we have another radiolib and a TFT instead of OLED, no AXP chip, etc. - heltec section: need to have the many defineshere (two hand full are needed for TFT) - heltec wireless tracker: - long press (if WiFi off) sets the tracker to deep sleep (there's no real power-off due to the lack of an axp chip. But the current is very very low). See also notes at webserver config. - uses RadioLib SX126X - has no AXP chip, and the VEXT_CTRL pin only switches (both at the same time!), gps and tft. For power saving ("lora rx disabled" config setting), we can call radio.sleep(), and wake it up with radio.standby() - If you set gps to allow sleep, VEXT_CTRL turns also TFT. Be aware of it, it's not a bug but a hardware limitation. GPS sleep is for powersave. TFT off saves also power. That's what you should expect. On wakeup, tft is reinitialized. - Funny: If you do Serial.flush() and immediately call setCpuFrequencyMhz(adjust_cpuFreq_to), then USB chip is reset to a state before that what the esp32 driver inizializes. -> Serial.printf's don't work. This lead to Serial.print("CPU Freq ad"); Serial.flush(); setCpuFrequencyMhz(adjust_cpuFreq_to); // ..survived Serial.printf("justed to: %d MHz\r\n", adjust_cpuFreq_to); -> "CPU Freq ad" - and finito. => removed the flush() - TODO: bluetooth LE support. Unfortunately, the chip lacks support for classic bluetooth serial. If you need to connect aprsdroid to the device, look at the wifi tcp server description. - TTGO_T-Beam_LoRa_APRS.ino: - better platform dependend includes - I had a bad usb cable or switch with too less voltage which caused the ttgo to reboot -> Changes to minimum voltage for shutdown Disabled brownout detector (which was per default according to esp32 libs) WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); Please check if this would be a problem of deep discharging your akku: #if defined(T_BEAM_V1_0) || defined(T_BEAM_V1_2) - if (InpVolts > 4.3) { + //if (InpVolts > 4.3) { // No, my usb hub suddenly only made 4.1V + if (InpVolts > 4.0) { I suppose no, because AXP does it's job at thosee devices - Needed to define BATTERY_PIN for every hardware - Renamed definition of LOW to TXLED_LOW - What is key_up, t_lock and time_delay? Wrong, it's for button control. -> Changed the names to button_key_up, button_t_lock and button_time_delay - LORA_MAX_MESSAGE_LEN is for SX127X (B_RF95 lib), because it includes the 4 bytes header. For the RadioLib buffer we need to reserver more space. - quite nice hack for reusing the display.xxx() routines for tft (class Emulated_SSD1306 which provides the needed functions) - New OLED_LINE_LEN_MAX instead of hardcoded value 21, because heltec TFT has in the normal font a width of 25. - RadioLib calls interrupt drivven signal_new_packet_received after a packet was receeived. - RadioLib special: Added definition for lora speeds / coding rate, like they have been addigned in the BG_RF95 lib - Pseudo-Sema-Locks: does not work 100%. Avoided endless loop by adding ESP.restart after 5min Also a delay of 1s in LoraSend() to mitigate lock problems when digipeating to the second of the both frequencies. - BG_RF95 sometimes causes crashes, esp. in waitPacketSent(). Introduced a delay. 100ms between sendAprs() and waitPacketSend() Changed calls to rf95.waitAvailableTimeout() to rf95.available() for stability reasons. - richonguzman has a good docu for power readings for non-AXP-chips. I use it for the heltec wireles tracker We may think about using it on T_BEAM_V0_7 and the rest. Problem: intensive testing needed, and the old T_BEAM_V0_7 devices became rare. - timer_once_a_second(): This is ok: if (!freeze_display) fillDisplayLine1(0); //update time & uptime But the following operations destroyed line3to5 for a displayed "((RX))" packet. -> Commented it out. No side effects observed-. - write2display(): now uses caching (calls write2display_cached()). Reason: TFT flickers when updates happen too often. On the other hand, caching on OLED is not possible because calling display.clearDisplay() is mandatory, else you get a pixel puzzle with old and new characters at each position. TFT has no display.display() and also nothing like clearLine. -> IF we write a line, we have to add (when using the normal font) blanks at the end of the text (up to position 25)-. Also, instead of OLED, TFT cannot brak long lins to the next; that's why we need to break the line ourself. The "next" lines we use in this case must not be cached. - fillDisplayLine1: Word "Up:" was behind the uptime value (caused by one of the commits of the last weeks). Fixed. - If own callsign is still N0CALL, disable lora_tx and set txPower to 0. - If during setup init lora chip or display fails, do not for(;;); , but sleep 5min and do ESP.restart(). Else you cannot land on the moon ;) TODO: check for correct initialization of SX126X chip - Removed tuplicate "Time used since start"-message - start of taskGPS moved to setup_phase2 section - If you double-click (or better "dit daah") the user button, manual beacon is triggered (like the behaviour at the end of the section). Needed by someone driving a car and cannot look at the display menu page number. - long press (if WiFi off) sets the heltec wireeless trackeer to deep sleep (nearly off - see description above). If wifi is off, press two times (first long-press starts webserver; second one does the shutdown). If tracker is not compiled with WIFI, long-press does a shutdown on heltec and a a reboot on other devices. TODO (and TEST!): check if other non-AXP-chip esp32 devices would instead also profit from a deep sleep - Tests before radio.readData() on SX126X devices are easier (no locking; no call comparing to rf95.available()), because flag_lora_packet_available is set. Changed general variable name packet_available to flag_lora_packet_available. - In part "((TX))", enforce a display update: fillDisplayLines3to5(1); Reason: tracker had his first gps fix and transmits - but the OLED showed the old position during TX; the sent packet hat the correct current position. - taskGPS: - support for heltec wireless tracker (Pin assignment and correct bitrate) - fix: - Serial.println(gpsDataBuffer); + Serial.print(gpsDataBuffer); - taskTNC: - if (serial_bt_client_is_connected) { + if (enable_bluetooth && serial_bt_client_is_connected) { - taskWebServer.cpp: deadlock protection, as in TTGO_T-Beam_LoRa_APRS.ino - data_embed: style.css and js.js had many blanks and comments which needed a quite large amount of disk space. A new script ../tools/remove_comment_from_code.py (which also can be used as a library) removes them, but leaves copyright comments intact. Feel free to use it in other projects. In summuary, many changes $ git diff|wc -l 2470 Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-05-27 07:29:21 +00:00
<input name="lora_freq_x" id="lora_freq_x" type="number" min="430.1000" max="928.0000" step="0.0001" title="LoRa center frequency - must be different from main frequency and between 430.0000 and 928.0000 or 0 if not needed. I.e. 433.900">
</div>
<div>
<label for="txPower_x">TX power on secondary frequency [dBm]</label>
<input name="txPower_x" id="txPower_x" type="number" min="0" max="23" title="LoRa TX Power on secondary frequency. Range 0 to 23dBm">
</div>
</div>
<div class="grid-container full">
<div>
<label for="lora_speed_x">Speed on secondary frequency</label>
<select id="lora_speed_x" name="lora_speed_x">
<option value="1200">BW 125khz CR 4:7 SF 9 (Fast Standard. default; use high speeds on the secondary frequency)</option>
<option value="610">BW 125khz CR 4:8 SF 10 (610bps)</option>
<option value="300">BW 125khz CR 4:5 SF 12 (300bps)</option>
<option value="240">BW 125khz CR 4:6 SF 12 (244bps)</option>
<option value="210">BW 125khz CR 4:7 SF 12 (209bps)</option>
<option value="180">BW 125khz CR 4:8 SF 12 (183bps)</option>
</select>
</div>
</div>
<div class="grid-container halves">
<div>
<label for="rx_qrg">RX on frequencies</label>
2022-03-03 15:10:23 +00:00
(Only honored, if we are NOT configured as WIDE1 or WIDE2 digi. If set to both frequencies: Ratio depends on how many packets are received on each qrg in a 10min window; we stay 20s on one qrg.)
<select id="rx_qrg" name="rx_qrg">
<option value="1">RX on main frequency</option>
<option value="2">RX on secondary frequency</option>
<option value="3">RX on both frequencies</option>
</select>
</div>
<div>
2022-03-03 15:10:23 +00:00
<label for="lora_freq_rx_curr">Current RX Frequency:</label>
<input name="lora_freq_rx_curr" id="lora_freq_rx_curr" type="number" readonly title="Nothing to enter here">
</div>
</div>
<div class="grid-container full">
<h6 class="u-full-width">Additional settings for mode repater:<br/>EXPERIMENTAL - USE WITH CARE!</h6>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
<div class="grid-container full">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<div>
<label for="lora_dig_mode">LoRa Repater Mode</label>
<select id="lora_dig_mode" name="lora_dig_mode">
<option value="0">off. This device does not do any repeating decision.</option>
<option value="1">Repeat if own call is addressed (recommended for normal users). default.</option>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<option value="2">Act as WIDE1 (fill-in) digi</option>
<option value="3">Act as a simple WIDE2 digi (consider to instead attach a real aprs-digipeater software via KISS)</option>
</select>
</div>
</div>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<div class="grid-container full">
<div>
<label for="lora_myalias">My alias for digipeating (optional)</label>
<input class="u-full-width" type="text" minlength="0" maxlength="9" name="lora_myalias" id="lora_myalias" title="My alias for digipeting (empty recommended). Kenwood users know it as UITRACE. We repeat this alias, if found in first position of the path and if it is not already repeated. Don't set this to WIDEn-m. This option is only active in LoRa Repeater Mode >= 1">
</div>
</div>
<div class="grid-container halves">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<div>
<label for="lora_dig_x_m">Digipeat heard stations from MAIN frequency to which frequencies</label>
2022-03-03 15:10:23 +00:00
(If LoRa Repeater Mode has not been set to off)
<select class="u-full-width" id="lora_dig_x_m" name="lora_dig_x_m">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<option value="0">Repeat only to main frequency (default)</option>
<option value="1">Repeat to both frequencies</option>
<option value="2">Repeat only to cross-digi frequency</option>
</select>
</div>
<div>
<label for="tx_qrg_bc">TX our beacon from this device or from-kiss to frequencies</label>
2022-03-03 15:10:23 +00:00
(Only honored, if we are configured as WIDE1 or WIDE2 digi)
<select class="u-full-width" id="tx_qrg_bc" name="tx_qrg_bc">
2022-03-03 15:10:23 +00:00
<option value="1">TX on main frequency</option>
<option value="2">TX on secondary frequency</option>
<option value="3">TX on both frequencies</option>
<option value="5">(TX on both frequencies as USER - not recommended, needed in SP)</option>
<option value="0">Don't send our beacon on RF (but only to kiss and to APRS-IS)</option>
2022-03-03 15:10:23 +00:00
</select>
</div>
</div>
<div class="grid-container full">
<h5 class="u-full-width">APRS-IS settings</h5>
<h6 class="u-full-width">changes in the foollowing section need a reboot to ensure correct login into APRS-IS</h6>
2021-03-08 17:55:52 +00:00
</div>
<div class="grid-container halves">
2022-03-03 15:10:23 +00:00
<div>
<label for="aprsis_en">Enable APRS-IS connection</label>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<input name="aprsis_en" id="aprsis_en" type="checkbox" value="1" title="If we are configured as WIFI client, connect to the APRS-IS net">
</div>
2022-03-03 15:10:23 +00:00
<div>
<label for="aprsis_srv_h">Server Name</label>
<input type="text" name="aprsis_srv_h" id="aprsis_srv_h" placeholder="euro.aprs2.net" title="Server name or IP Address. I.e. euro.aprs2.net. If your igate is in the HAMNET, use aprs.hc.r1.ampr.org">
</div>
2022-03-03 15:10:23 +00:00
<div>
<label for="aprsis_srv_p">TCP Port</label>
<input type="number" name="aprsis_srv_p" id="aprsis_srv_p" placeholder="14580" min="1" max="65535" title="TCP Port, i.e. 14580">
</div>
2022-03-03 15:10:23 +00:00
<div>
<label for="aprsis_call">Callsign (optional)</label>
<input type="text" name="aprsis_call" id="aprsis_call" minlength="3" maxlength="9" title="Use this callsign for the APRS-IS connection. If not configured, your default callsign is used." placeholder="may be left blank">
</div>
2022-03-03 15:10:23 +00:00
<div>
<label for="aprsis_pw">Password (required)</label>
<input type="password" name="aprsis_pw" id="aprsis_pw" title="Your password for the APRS-IS connection.">
</div>
<div>
local aprsis-filter, bugfix, vers_xxshort_bn, no gif 1.1 local aprsis-filter 1.1 Filter type (local, optional) Local aprsis-filter incoming for packet-types. We observed that if you have a server-site filter, i.e. for receive private messages only, 20km around you (t/m/MYCALL/20), aprsis sends also some location positions of users (if you heard them on RF), and even if \>20km away. Also we have seen packets of type objects telemetry, etc. With this option, you can filter incoming aprsis-packets localy in order to prevent them from gating to RF. Valid filters are poimqstunwb (Position packets, objects, items, message, query, status, telemetry, user-defined, NWS, weather, bulletin (bulletins are aprs-messages prefixed with BLN'). You can invert the filter ('all except ...') by adding a leading '-', i.e. '-mws'. If you leave this field empty, aprsis local filter is disabled. => [-]poimqstunwb 1.2 Filter 'words' (local, optional) Local aprsis-filter incoming for 'words': if this word is part of the header or message body of a packet coming from aprsis, the packet is filtered out. You can sepearate multiple word-filters by space. Leave empty to disable a word filter. Many thanks go to Tomasz SP2ATJ for this idea and nice discussions and intensively testing. 2. bugfix During "save" of the config via web-interface, we call setup_phase2_soft_reconfiguration() String Tcall is changed. OledHdr had a reference to Tcall. OledHdr needs to be updated. Else there's a very rare race condition (only observed one time in 3 years) where writedisplaytext(OledHdr,OledLine1,OledLine2,OledLine3,OledLine4,OledLine5); crashed during accessing OledHdr. OledHdr = String(Tcall); sould make a local copy. OledLines1-5 are also set explicit to "" now. 3. VERS_XXSHORT_BN buildscript_versioning.py generates BUILD_NUMBER, VERSION, VERSION_SHORT, etc. We compute the build_nr with base62 (0-9, a-z, A-Z) This gives us room for (62**2)-1 = 3843 builds between git commits. Should be enough. git_id short is 7 bytes. length of 5 has hopefully enough entropy. VERS_XXSHORT_BN may also be sent on RF -> We keep it short. 8 bytes now, (5 bytes git id, 2 bytes base62-encoded build_no) instead of typically 3 bytes before. Why we need both? 1. git-id: you can determine which was the git head when you checked out, and what has changed since then 2. During developmment / testing, build-nr increases each compiler run - but the git id only changes after git push. build_no helps you to distinguish, which version of a compler run you currently use. VERSION had a date resolution of 1 microsecond. -> now cutting string after the minute value. 4. style.css I decided to remove the #logo ("background-image"), which is a base64- encoded inline gif. We need space for the flash, because the code reached 100% of it's size!! If we have a solution, the logo comes back. Other options: - don't compile with -DENABLE_SYSLOG, or the like - re-partition. Other firmmware-developers did this. But I'm a bit sceptical to do this. Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-03-17 04:42:21 +00:00
<label for="aprsis_fltr">Filter (server-site, optional)</label>
<input type="text" name="aprsis_fltr" id="aprsis_fltr" title="Request server-site filter (may be left empty). See http://www.aprs-is.net/javAPRSFilter.aspx ; Example: 't/mqs/YOURCALL/50' -> Gate only messages, query and status messages to RF, from a circle of 50km around your last known position. w, o and i may be of interest, but some people on 2m APRS or APRS-IS may send those packets much too frequently. Please trace the effect! Perhaps in combination with '-e/DB0FRI-10'. In our case, the digi positioning beacon from DB0FRI-10 (which is also an igate nearby, APRS-IS path qAI,DB0FRI-10) came from APRS-IS to us and we gated his beacon, encoded as third-party-trafffic, back to RF (which makes no sense: 1. His direct RF beacon is much better heard than ours -> all RF users heard it. 2. We needless consumed airtime). -> Using -e/IGATE1/IGATE2/.. , everything heard (and sent to APRS-IS) by our neighbor igates like DB0FRI-10 will not be re-gated by us. Please also check, if '-d/..' instead of (or additional to) '-e/..' is more suitiable in your environment; you may also consider -/b/.. ." placeholder="may be left blank">
</div>
local aprsis-filter, bugfix, vers_xxshort_bn, no gif 1.1 local aprsis-filter 1.1 Filter type (local, optional) Local aprsis-filter incoming for packet-types. We observed that if you have a server-site filter, i.e. for receive private messages only, 20km around you (t/m/MYCALL/20), aprsis sends also some location positions of users (if you heard them on RF), and even if \>20km away. Also we have seen packets of type objects telemetry, etc. With this option, you can filter incoming aprsis-packets localy in order to prevent them from gating to RF. Valid filters are poimqstunwb (Position packets, objects, items, message, query, status, telemetry, user-defined, NWS, weather, bulletin (bulletins are aprs-messages prefixed with BLN'). You can invert the filter ('all except ...') by adding a leading '-', i.e. '-mws'. If you leave this field empty, aprsis local filter is disabled. => [-]poimqstunwb 1.2 Filter 'words' (local, optional) Local aprsis-filter incoming for 'words': if this word is part of the header or message body of a packet coming from aprsis, the packet is filtered out. You can sepearate multiple word-filters by space. Leave empty to disable a word filter. Many thanks go to Tomasz SP2ATJ for this idea and nice discussions and intensively testing. 2. bugfix During "save" of the config via web-interface, we call setup_phase2_soft_reconfiguration() String Tcall is changed. OledHdr had a reference to Tcall. OledHdr needs to be updated. Else there's a very rare race condition (only observed one time in 3 years) where writedisplaytext(OledHdr,OledLine1,OledLine2,OledLine3,OledLine4,OledLine5); crashed during accessing OledHdr. OledHdr = String(Tcall); sould make a local copy. OledLines1-5 are also set explicit to "" now. 3. VERS_XXSHORT_BN buildscript_versioning.py generates BUILD_NUMBER, VERSION, VERSION_SHORT, etc. We compute the build_nr with base62 (0-9, a-z, A-Z) This gives us room for (62**2)-1 = 3843 builds between git commits. Should be enough. git_id short is 7 bytes. length of 5 has hopefully enough entropy. VERS_XXSHORT_BN may also be sent on RF -> We keep it short. 8 bytes now, (5 bytes git id, 2 bytes base62-encoded build_no) instead of typically 3 bytes before. Why we need both? 1. git-id: you can determine which was the git head when you checked out, and what has changed since then 2. During developmment / testing, build-nr increases each compiler run - but the git id only changes after git push. build_no helps you to distinguish, which version of a compler run you currently use. VERSION had a date resolution of 1 microsecond. -> now cutting string after the minute value. 4. style.css I decided to remove the #logo ("background-image"), which is a base64- encoded inline gif. We need space for the flash, because the code reached 100% of it's size!! If we have a solution, the logo comes back. Other options: - don't compile with -DENABLE_SYSLOG, or the like - re-partition. Other firmmware-developers did this. But I'm a bit sceptical to do this. Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-03-17 04:42:21 +00:00
<div>
<label for="aprsis_fli">Filter type (local, optional)</label>
<input type="text" name="aprsis_fli" id="aprsis_fli" title="Local aprsis-filter incoming for packet-types. This is a positive-filter, i.e. 'ms', which means: accept aprs-text-message and status packets. You can invert the filter ('all except ...') by adding a leading '-', i.e. '-mws'. Valid packet type filters are: poimqstunwb (Position packets, objects, items, message, query, status, telemetry, user-defined, NWS, weather, bulletin (bulletins are aprs-messages prefixed with BLN'). If you leave this field empty, aprsis local filter is disabled. Reason for this local filter: We observed that if you have a server-site filter, i.e. for receiving onöly private text messages for hams a radius 20km around you (t/m/MYCALL/20), aprsis sends also some location positions of users (if you heard them on RF), and even if \>20km away. Also we have seen packets of type objects telemetry, etc. With this option, you can filter incoming aprsis-packets localy in order to prevent them from gating to RF." placeholder="[-]poimqstunwb">
local aprsis-filter, bugfix, vers_xxshort_bn, no gif 1.1 local aprsis-filter 1.1 Filter type (local, optional) Local aprsis-filter incoming for packet-types. We observed that if you have a server-site filter, i.e. for receive private messages only, 20km around you (t/m/MYCALL/20), aprsis sends also some location positions of users (if you heard them on RF), and even if \>20km away. Also we have seen packets of type objects telemetry, etc. With this option, you can filter incoming aprsis-packets localy in order to prevent them from gating to RF. Valid filters are poimqstunwb (Position packets, objects, items, message, query, status, telemetry, user-defined, NWS, weather, bulletin (bulletins are aprs-messages prefixed with BLN'). You can invert the filter ('all except ...') by adding a leading '-', i.e. '-mws'. If you leave this field empty, aprsis local filter is disabled. => [-]poimqstunwb 1.2 Filter 'words' (local, optional) Local aprsis-filter incoming for 'words': if this word is part of the header or message body of a packet coming from aprsis, the packet is filtered out. You can sepearate multiple word-filters by space. Leave empty to disable a word filter. Many thanks go to Tomasz SP2ATJ for this idea and nice discussions and intensively testing. 2. bugfix During "save" of the config via web-interface, we call setup_phase2_soft_reconfiguration() String Tcall is changed. OledHdr had a reference to Tcall. OledHdr needs to be updated. Else there's a very rare race condition (only observed one time in 3 years) where writedisplaytext(OledHdr,OledLine1,OledLine2,OledLine3,OledLine4,OledLine5); crashed during accessing OledHdr. OledHdr = String(Tcall); sould make a local copy. OledLines1-5 are also set explicit to "" now. 3. VERS_XXSHORT_BN buildscript_versioning.py generates BUILD_NUMBER, VERSION, VERSION_SHORT, etc. We compute the build_nr with base62 (0-9, a-z, A-Z) This gives us room for (62**2)-1 = 3843 builds between git commits. Should be enough. git_id short is 7 bytes. length of 5 has hopefully enough entropy. VERS_XXSHORT_BN may also be sent on RF -> We keep it short. 8 bytes now, (5 bytes git id, 2 bytes base62-encoded build_no) instead of typically 3 bytes before. Why we need both? 1. git-id: you can determine which was the git head when you checked out, and what has changed since then 2. During developmment / testing, build-nr increases each compiler run - but the git id only changes after git push. build_no helps you to distinguish, which version of a compler run you currently use. VERSION had a date resolution of 1 microsecond. -> now cutting string after the minute value. 4. style.css I decided to remove the #logo ("background-image"), which is a base64- encoded inline gif. We need space for the flash, because the code reached 100% of it's size!! If we have a solution, the logo comes back. Other options: - don't compile with -DENABLE_SYSLOG, or the like - re-partition. Other firmmware-developers did this. But I'm a bit sceptical to do this. Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-03-17 04:42:21 +00:00
</div>
<div>
<label for="aprsis_fliw">Filter 'words' (local, optional)</label>
<input type="text" name="aprsis_fliw" id="aprsis_fliw" title="Local aprsis-filter incoming for 'words': if this word is part of the header or message body of a packet coming from aprsis, the packet is filtered out. You can sepearate multiple word-filters by space. Leave empty to disable a word filter." placeholder="">
</div>
<div>
<label for="tx_aprsis_sm">Send status-message to APRS-IS</label>
<input name="tx_aprsis_sm" id="tx_aprsis_sm" type="checkbox" value="1" title="Send APRS-status-message about new tcp connectioni, -attepts or your requested shutdown/reboot to APRS-IS. This helps you to trace reboots and unexpected loss of wifi- or internet-access.">
</div>
<div>
<label for="tx_aprsis_bc">Allow send our beacon to APRS-IS</label>
<input name="tx_aprsis_bc" id="tx_aprsis_bc" type="checkbox" value="1" title="Allow sending our beacon from this device or from KISS to APRS-IS. You may like to disable this i.e. if you are a portable hotspot together with your tracker, but others already gate your own packets to APRS-IS -> you'll see at APRS-IS who heard you.">
</div>
<div>
<label for="aprsis_2rf">Gate APRS-IS traffic to frequencies</label>
(Will be '3rd-party encoded'. Be careful - do not flood our slow main frequency! Use filters..)
<select id="aprsis_2rf" name="aprsis_2rf">
<option value="0">Don't gate APRS-IS to RF (default)</option>
<option value="1">Gate to main frequency</option>
<option value="2">Gate to secondary frequency</option>
<option value="3">Gate to both frequencies</option>
</select>
</div>
<div>
2022-03-03 15:10:23 +00:00
<label for"aprsis_status">Connection status</label>
<input type="text" name="aprsis_status" id="aprsis_status" readonly title="Connection status. Nothing to enter here">
</div>
2022-03-03 15:10:23 +00:00
</div>
2021-02-18 16:59:18 +00:00
<div class="grid-container full">
<div>
2021-03-08 18:51:01 +00:00
<input class="button-primary u-full-width" type="submit" value="Save" title="save settings, remember reboot tracker after save">
2021-02-18 16:59:18 +00:00
</div>
</div>
</form>
</article>
</section>
2021-03-08 21:47:00 +00:00
<section>
<article>
<form action="/save_device_cfg" method="post">
<div class="grid-container full">
<h2 class="u-full-width">Device Settings</h2>
</div>
<div class="grid-container quarters">
2021-03-09 09:45:15 +00:00
<div>
2021-09-14 17:58:35 +00:00
<label for="oled_enabled">OLED Display enabled</label>
<input name="oled_enabled" id="oled_enabled" type="checkbox" value="1" title="Enables or disables OLED">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
2021-03-08 21:47:00 +00:00
<div>
<label for="bt_enabled">Bluetooth enabled</label>
<input name="bt_enabled" id="bt_enabled" type="checkbox" value="1" title="enable or disable bluetooth">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
<!--
<div>
<label for="logserial_en">Serial Logging</label>
<input name="logserial_en" id="logserial_en" type="checkbox" value="0" title="Enable or disable verbose logging on usb-serial port. If disabled, KISS-receive and KISS-send is disabled on usb-serial.">
</div>
-->
<div>
<label for="usbser_proto">USB-Serial protocol</label>
<select id="usbser_proto" name="usbser_proto">
<option value="0">1. KISS (default)</option>
<option value="1">2. Serial logging</option>
<option value="2">3. Trace packets from LoRa (TNC-trace-format)</option>
features: exernal gps, usbserial nmea. changed: aprsis-connect wait time 1. usb-serial: option for output gps nmea sentences I patched taskGPS.cpp this for an om a few months ago. Unexpectedly, I pushed this change to github with my last push a few days ago. -> I needed to implent this feature now, because else gps nmea output was sent uninterruptable. I needed to add a small change to taskGPS.cpp. You can enable this in the webinterface tnc mode now also has the option to enable nmea (like the logging and trace command). 2. Feature for those who attached a GPS to a non-gps-tracker like the lora32 device. - GPS speed for those devices is currently hardcoded accordnig to the need of one OM (the way it was already hardcoded for T-BEAM devices) Perhaps it will become a web-configurable featuee - new compile time option FORCE_ENABLE_GPS for your platform.ini if you use a non-T-BEAM hardware (-> gps_state = true) - in setup_phase2_soft_reconfiguration I removed the condition #else 3. On aprsis-connection setup, we waited up to 25s for login prompt. -> The webinterface is unresponsive for this time. connect_to_aprsis() is a sub sub function from the main loop with many checked conditions like variables and retry times. A better solution would need a major redesign. => the wait time for the prompt is now 5s. 4. removed block if (curr_hdop < bestHdop && curr_sats >= 4) { do_update = 1; } else because bestHdop always <= curr_hdop (assignment above) -> This condition was always false, and it is obsolete (came from a time when experimenting for best values, and where the assignment bestHdop = curr_hdop was done after that block). Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-08-24 17:55:01 +00:00
<option value="4">4. NMEA GPS data</option>
<option value="3">5. 2) and 3)</option>
<option value="5">6. 4) and 2)</option>
<option value="6">7. 4) and 3)</option>
<option value="7">8. 4) and 2) and 3)</option>
<option value="128">8. No KISS, no logging, no tnc-trace, no NMEA.</option>
</select>
</div>
2021-03-08 21:47:00 +00:00
<div>
<label for="led_enable">LED signaling</label>
<input name="led_enable" id="led_enable" type="checkbox" value="1" title="enable or disable LED (not implemented)" DISABLED>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
</div>
<div class="grid-container quarters">
<div>
<label for="cpufreq">Adjust CPU frequency (MHz)</label>
<input name="cpufreq" id="cpufreq" type="number" min="0" max="250" title="Reduce CPU freq for power consumption (up to 20 % less). Use with extreme care! Tested with value 80. 0 means: no change to power-on-state." placeholder="0">
</div>
<div>
<label for="reboot_intrvl">Reboot every n hours</label>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<input name="reboot_intrvl" id="reboot_intrvl" type="number" min="0" max="1193" title="Do a periodical reboot every n hous. 0 = disable. Range 0 to 1193" placeholder="0">
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
</div>
2021-03-13 12:50:04 +00:00
<div>
2021-03-13 13:56:38 +00:00
<label for="shutdown_act">Auto power off</label>
Support for heltec wireless tracker. And many fixes. Two weeks hard work. - Webserver config: - Allow freq to be configured down to 430.1000. Set to at minimum 430.150 if you use bandwith 250 kHz! - Added hint for wifi tcp kiss android config - platformio.ini: - less monolithic lib dependencies, because with heltec wireless tracker we have another radiolib and a TFT instead of OLED, no AXP chip, etc. - heltec section: need to have the many defineshere (two hand full are needed for TFT) - heltec wireless tracker: - long press (if WiFi off) sets the tracker to deep sleep (there's no real power-off due to the lack of an axp chip. But the current is very very low). See also notes at webserver config. - uses RadioLib SX126X - has no AXP chip, and the VEXT_CTRL pin only switches (both at the same time!), gps and tft. For power saving ("lora rx disabled" config setting), we can call radio.sleep(), and wake it up with radio.standby() - If you set gps to allow sleep, VEXT_CTRL turns also TFT. Be aware of it, it's not a bug but a hardware limitation. GPS sleep is for powersave. TFT off saves also power. That's what you should expect. On wakeup, tft is reinitialized. - Funny: If you do Serial.flush() and immediately call setCpuFrequencyMhz(adjust_cpuFreq_to), then USB chip is reset to a state before that what the esp32 driver inizializes. -> Serial.printf's don't work. This lead to Serial.print("CPU Freq ad"); Serial.flush(); setCpuFrequencyMhz(adjust_cpuFreq_to); // ..survived Serial.printf("justed to: %d MHz\r\n", adjust_cpuFreq_to); -> "CPU Freq ad" - and finito. => removed the flush() - TODO: bluetooth LE support. Unfortunately, the chip lacks support for classic bluetooth serial. If you need to connect aprsdroid to the device, look at the wifi tcp server description. - TTGO_T-Beam_LoRa_APRS.ino: - better platform dependend includes - I had a bad usb cable or switch with too less voltage which caused the ttgo to reboot -> Changes to minimum voltage for shutdown Disabled brownout detector (which was per default according to esp32 libs) WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); Please check if this would be a problem of deep discharging your akku: #if defined(T_BEAM_V1_0) || defined(T_BEAM_V1_2) - if (InpVolts > 4.3) { + //if (InpVolts > 4.3) { // No, my usb hub suddenly only made 4.1V + if (InpVolts > 4.0) { I suppose no, because AXP does it's job at thosee devices - Needed to define BATTERY_PIN for every hardware - Renamed definition of LOW to TXLED_LOW - What is key_up, t_lock and time_delay? Wrong, it's for button control. -> Changed the names to button_key_up, button_t_lock and button_time_delay - LORA_MAX_MESSAGE_LEN is for SX127X (B_RF95 lib), because it includes the 4 bytes header. For the RadioLib buffer we need to reserver more space. - quite nice hack for reusing the display.xxx() routines for tft (class Emulated_SSD1306 which provides the needed functions) - New OLED_LINE_LEN_MAX instead of hardcoded value 21, because heltec TFT has in the normal font a width of 25. - RadioLib calls interrupt drivven signal_new_packet_received after a packet was receeived. - RadioLib special: Added definition for lora speeds / coding rate, like they have been addigned in the BG_RF95 lib - Pseudo-Sema-Locks: does not work 100%. Avoided endless loop by adding ESP.restart after 5min Also a delay of 1s in LoraSend() to mitigate lock problems when digipeating to the second of the both frequencies. - BG_RF95 sometimes causes crashes, esp. in waitPacketSent(). Introduced a delay. 100ms between sendAprs() and waitPacketSend() Changed calls to rf95.waitAvailableTimeout() to rf95.available() for stability reasons. - richonguzman has a good docu for power readings for non-AXP-chips. I use it for the heltec wireles tracker We may think about using it on T_BEAM_V0_7 and the rest. Problem: intensive testing needed, and the old T_BEAM_V0_7 devices became rare. - timer_once_a_second(): This is ok: if (!freeze_display) fillDisplayLine1(0); //update time & uptime But the following operations destroyed line3to5 for a displayed "((RX))" packet. -> Commented it out. No side effects observed-. - write2display(): now uses caching (calls write2display_cached()). Reason: TFT flickers when updates happen too often. On the other hand, caching on OLED is not possible because calling display.clearDisplay() is mandatory, else you get a pixel puzzle with old and new characters at each position. TFT has no display.display() and also nothing like clearLine. -> IF we write a line, we have to add (when using the normal font) blanks at the end of the text (up to position 25)-. Also, instead of OLED, TFT cannot brak long lins to the next; that's why we need to break the line ourself. The "next" lines we use in this case must not be cached. - fillDisplayLine1: Word "Up:" was behind the uptime value (caused by one of the commits of the last weeks). Fixed. - If own callsign is still N0CALL, disable lora_tx and set txPower to 0. - If during setup init lora chip or display fails, do not for(;;); , but sleep 5min and do ESP.restart(). Else you cannot land on the moon ;) TODO: check for correct initialization of SX126X chip - Removed tuplicate "Time used since start"-message - start of taskGPS moved to setup_phase2 section - If you double-click (or better "dit daah") the user button, manual beacon is triggered (like the behaviour at the end of the section). Needed by someone driving a car and cannot look at the display menu page number. - long press (if WiFi off) sets the heltec wireeless trackeer to deep sleep (nearly off - see description above). If wifi is off, press two times (first long-press starts webserver; second one does the shutdown). If tracker is not compiled with WIFI, long-press does a shutdown on heltec and a a reboot on other devices. TODO (and TEST!): check if other non-AXP-chip esp32 devices would instead also profit from a deep sleep - Tests before radio.readData() on SX126X devices are easier (no locking; no call comparing to rf95.available()), because flag_lora_packet_available is set. Changed general variable name packet_available to flag_lora_packet_available. - In part "((TX))", enforce a display update: fillDisplayLines3to5(1); Reason: tracker had his first gps fix and transmits - but the OLED showed the old position during TX; the sent packet hat the correct current position. - taskGPS: - support for heltec wireless tracker (Pin assignment and correct bitrate) - fix: - Serial.println(gpsDataBuffer); + Serial.print(gpsDataBuffer); - taskTNC: - if (serial_bt_client_is_connected) { + if (enable_bluetooth && serial_bt_client_is_connected) { - taskWebServer.cpp: deadlock protection, as in TTGO_T-Beam_LoRa_APRS.ino - data_embed: style.css and js.js had many blanks and comments which needed a quite large amount of disk space. A new script ../tools/remove_comment_from_code.py (which also can be used as a library) removes them, but leaves copyright comments intact. Feel free to use it in other projects. In summuary, many changes $ git diff|wc -l 2470 Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-05-27 07:29:21 +00:00
<input name="shutdown_act" id="shutdown_act" type="checkbox" value="1" title="activate auto shutdown after usb plug off (not for T-BEAM 0.7). The device will powered down. You can interrupt this by pressing the middle button in time (right after pluging of or short before it powers down). Default: 'yes' (power off). Consider if you need to switch it to 'no' (keep power on), i.e. if you are an additionaly battery-connected igate, or if you have a not reliable power source. Please also look at the option 'Send Status-packet when shutdown' above.">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
<div>
<label for="shutdown_dt">Auto power off delay [s]</label>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<input name="shutdown_dt" id="shutdown_dt" type="number" min="3" max="3600" title="auto shutdown delay in seconds. Range 3 to 3600. You can interrupt the timer by pressing the middle-button.">
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
</div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
<div class="grid-container thirds">
2021-03-09 09:45:15 +00:00
<div>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<label for="sh_rxtime">Seconds to show RX packets [s]</label>
<input name="sh_rxtime" id="sh_rxtime" type="number" min="0" max="45" title="show a received packet for seconds, refresh rate for OLED. Range 0 to 45.">
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
2021-03-13 12:50:04 +00:00
<div>
<label for="sh_oledtime">Display timeout [s]</label>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<input name="sh_oledtime" id="sh_oledtime" type="number" min="0" max="60" title="Turn OFF OLED after X seconds. Set 0 to disable (constantly active OLED has a refresh rate of 1s. Range 0 to 60.">
</div>
<div>
<label for="units">Units</label>
<select id="units" name="units">
<option value="65">km/h, m (metric)</option>
<option value="66">m/s, m (metric)</option>
<option value="132">mph, ft (imperial)</option>
<option value="136">kn, ft (aero)</option>
<option value="72">kn, m (nautic)</option>
</select>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
</div>
</div>
<div class="grid-container thirds">
<div>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<label for="oledl3l4fmt">OLED Line3 and Line4 Format</label>
<select id="oledl3l4fmt" name="oledl3l4fmt" title="A: (default): Original format, L3: Lat/Lon; L4: speed, course, altitude. Lat/Lon in APRS format. Good for learning how aprs works.
Bx: Left side: L3: course, altitude. L4: speed. Right side: see below:
B1: Lat/Lon in classic format, good for non-technicals. Lat/Lon on right side.
B2: Lat/Lon in nautical notation. Lat/Lon Lat/Lon on right side.
Cx: Right side: L3: speed. L4: course, altitude. Left side: see below:
C1: Lat/Lon in classic format, good for non-technicals. Lat/Lon on left side.
C2: Lat/Lon in nautical notation. Lat/Lon on left side.
About Lat/Lon notations: Acuracy depends on speed, gps signal quality and choosen format; B2 and C2 has room for precision up to 0.1'.
APRS-style is 1234.56N 01234.56E.
Beginners style is 012°34.56'.
Nautical style is 12-34,567N 012-34.567E.
See also the option beneath about showing maidenhead grid locator.">
<option value="0">A: Lat/Lon in APRS-notation</option>
<option value="1">B1: Lat/Lon in classic notation</option>
<option value="2">B2: Lat/Lon in nautical notation</option>
<option value="3">C1: Lat/Lon in classic notation, left side</option>
bug fixes, features, much work on telemetry - bugfixes - on reset and read from preferences.cfg file, configured lat/lon have been ignored. - fix for compressed position with ambiguity > 0 - right after boot, do not wait for a precise position. this avoids a jump to the configured fixed position, which may be very far away. The code will become even nicer in a next release (I'm currently testing with hdop.hdop(), which will have changes of the decision-making of storing a current location); so the use of no_gps_position_since_boot will become nice. - display: - show P= instead of Batt= if powered from USB - "Up " instead of " Up " for uptime if no system time is available - display " LoRa-TX: dis" instead of " never TX" - display " GPS: no fix " instead of " no GPS fix" Why?: "WiFi-Cli no GPS fix" is irritating (no WiFi-Client but GPS fix? No, it was WiFo mode Client, and GPS without fix). - show P: instead tof Batt: on boot - show axp temperature on TTGO - InpVolts vs BattVolts: Hardware without AXP chip (all except T-BEAM TTGO) have no idea of battery voltage. -> Changed Display and Telemetry vor this: InpVolts instead of VattVolts. - system time from GPS: - Added check if function calls are successful - changed nasty code with type errors and misleading variable names - etc.. - manual beacon (button pressed): added next_fixed_beacon = ... - Telemetry - removed dependency of define KISS_PROTOCOL - the AXP chip of the T-BEAM could measure temperature! Cewl.. But we already have all 5 telemetry-positions in use. -> If we have no battery on boot, we have 3 fields free (Batt V, Current in ant out). If we have no usb on battery-boot connected, we have one field free for the temperature. Temperature is measured in steps of 0.25 degrees C. - The new temperature field as well as the "InputVolts vs BatteryVolts values" for the different devices needet a re-mix of the positions in the telemetry frame. I also decided "AC V" and "AC C" to "P V" and "P C". Trackers are powered on DC, not AC ;) For various reasons, we add temperature to the 5'th field. "B Out" was irritating: what, Volt, Current, Light? It's now BCout. - Changed equations for Volt. The problem with the old method was, that if you have 0 V (i.E. no battery attached), it was interpreted by the += 3000 level -> 3V. Unfortunately, the APRS spec does not define an encoding if i.E. a sensor is not available. ",," would be nice. But the field is defined exactly as ",nmo," with n, m and o as digit. - We had two cases for // DO NOT ENABLE THIS UNTIL YOU READ AND UNDERSTOOD THE IMPACT DESCRIBED ABOVE and people have overseen the second case. Changed the concept (one boolean variable). - Searched more than week why often EQNS are sent (while PARM, etc.. was expected). Our local state variable (type static) sometimes, but not always, was set to 0 on re-entering the function block. -> either a compiler problem, or might be a buffer overflow corrupts the stack? After I fixed this, the same happeneed with the new local static variable static const boolan may_add_temperature = ..., which changed it's assigned value during runtime. - taskWebserver: made status messages more consistent. - watchdog patches from hb9xar Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-03-27 16:28:25 +00:00
<option value="4">C2: Lat/Lon in nautical notation, left side</option>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
</select>
</div>
<div>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<label for="oledlocator">Maidenhead Locator</label>
<select id="oledlocator" name="oledlocator" title="Show Maidenhead grid locator: always (instead of Lat/Lon), never, alternating. Alternating:
0: Never
1: Always
2: Maidenhead 10s, Lat/Lon 50s
3: Maidenhead 20s, Lat/Lon 100s
4: Maidenhead 20s, Lat/Lon 20s
While showing maidenhead grid locator, free space is left at one side of line3 or line4 (depending on your 'Oled Line3 and Line4 Format' settings), so other values like measurement of temp/humidity/pressure or statistics, etc. may be displayed.">
<option value="0">Off (only Lat/Lon)</option>
<option value="1">On (never Lat/Lon)</option>
<option value="2">Loc 10s, Lat/Lon 50s</option>
<option value="3">Loc 20s, Lat/Lon 100s</option>
<option value="4">Loc 20s, Lat/Lon 20s</option>
</select>
</div>
<div>
Major changes. Hard work on this new releae. Improvements - Even more intelligent behavior in "Allow failback Mode AP" - Webserver: Current GPS location can be stored as current lat/lon; And fixed a not-so-nice down-rounding from i.e. 53.2100N to 53.2099N - Webserver: better input handling for ap password, remoteAP ssid and password, syslog and ntp server - Webserver: fixed typos in tooltip texts, and improved documentation, especially for the new features - Position ambiguity and higher precision You can choose now between - compressed position (also when fixed position). - uncompressed aprs position - uncompressed aprs position with higher precision (DAO W and w) Improvement for unknown position: encode it according to aprs spec - OLED: more variants to display lat/lon positions. Displayed lat/lon resolution depends on setting and if you move, and current gps hdop. You can also configure if maidenhead grid locator is shown (always, never, in intervals). Locator could be shown as RR99XX, RR99XX99 or RR99XX99xx - you can choose which variant you like. - Oled Lines: one-liners now cut at end of display-length; except for line2 (if line3-5 are empty). Oled display.display() is called only if display is on. Improvement for fillDisplayLines3to5 (may be forced) - Serial output on boot: Warn for unser preference variables only once, and set them accordingly - Digipeating / Gate handling. Don't send 3rd-party packets back to aprsis. Digipeat telemetry only do secondary qrg. - aprs-is: - 3rd-party traffic: it's not seldom that igates use lowercase calls. Don't tread this as (minor) error anymore. - aprs-is: improved filters according to aprsis spec - digipeating: - if we are a WIDE1 (= fill-in) digi and if a packet is in lora_TXBUF_for_digipeating and we hear a repeated one with same source-address and content, we clear it from queue. Improved viscous-delay. For development (compile time): different debug-verbose levels Fixes - aprsLatPreset (etc..) variables are now changed from their temporary variable names at once. Reading from preferences, a separate variable is filled. This mitigates a smp problem between webserver and main threads - aprsis login messages missed word "vers " placed before the version string - Small fix for aprsis 3rd party traffic encoding according to the spec. - Some numbers with decimals are now shown complete (instead of cut'ed to two decimals (default of String(floatVariable)). - fixes for some buffer dimensions; detected two buffer overflow conditions - Telemetry: assurance that values > 255 are ceiled and not start from 0 again (An analoge value must not exceet 255) This dedicated to the three-country-edge SysOp meeting in Engen 2023-02-11 ;) LoRa was one topic.. Signed-off-by: DL3EL <dl3el@darc.de> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2023-02-19 19:36:05 +00:00
<label for="oled_loc_amb">Locator precision</label>
<select id="oled_loc_amb" name="oled_loc_amb" title="Maidenhead grid locator resolution on your display.
The longer the string is, the harder it's to read. That's why we toggle between the length of 10 and the length of 8,
depending on your speed and your configured position precision.
If you prefer the max. displayed length of 6, choose the first entry.
RR99XX (default)
RR99XX99
RR99XX99xx
For RR99XX99xx99, we do not have enough space on the display.
Length of 6 has a precision (for lattitude) with 2.5nm; longitude: 5nm on aequator (and abt 2nm at 60deg N or S).
Background:
RR99 has a range of 18*10 degrees in latitude and 18*10*2 degress in longitude and has a resolution of 1 deg (60min == 60nm == 111.12km ) in lat and 2 deg (120min in lon).
Length of 4 (RR99) would have a resolution 25nm in lat (46.3km). It does not make sense to have this ambiguity being displayed.
RR99XX is 180deg / 24 = 2.5min = 2.5nm (= 4.63km) in lat (and 5min = 5nm (= 9.26km in lon at 0 deg north).
RR99XX99 divides the values above by 10, as you might have expected: 463m in lat, 926m in lon. Good to read, good resolution if you are moving.
RR99XX99xx has a resolution of 0.010416 nm (== 19.3m) in latitude; standard aprs resolution is 0.01nm (18.52m) -> Matches quite good - for latitude.
In longgitude, maidenhead's resolution is 0.02083 nm (385.83m at aequator).
Hard readable lengths / too long for our display:
RR99XX99xx99 has half the resolution than the one above. -> 1.93m in lat. It matches quite good to the Position precision 'uncompressed with DAO (!W..!)' extension (which has a resolutuion of 1.852m in lat and lon).
RR99XX99xx99xx is unreadable and would give us a resolution of 0.000434' (8.043cm) in lat. So precise is no GPS, and your antenna is probably longer than that locator.">
<option value="0">RR99XX (default)</option>
<option value="-1">RR99XX99</option>
<option value="-2">RR99XX99xx</option>
</select>
</div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</div>
2021-03-08 21:47:00 +00:00
<div class="grid-container full">
<div>
<input class="button-primary u-full-width" type="submit" value="Save" title="save settings, remember reboot tracker after save">
</div>
</div>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</form>
2021-03-08 21:47:00 +00:00
</article>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
</section>
<section>
<div class="grid-container full">
<h2 class="u-full-width">Device Info</h2>
</div>
<div class="grid-container halves">
<div>
<label for="UptimeMinutes">Uptime of Device [min]</label>
<input type="text" name="UptimeMinutes" id="UptimeMinutes" readonly title="uptime device in minutes">
</div>
<div>
<label for="curPos">Current Position</label>
<input type="text" name="curPos" id="curPos" readonly title="Current Position of device [P if fixed mode; p, if gps is invalid and used as temporary preset]">
</div>
<div>
<label for="OledLine5">Satellite & Batt Info</label>
<input type="text" name="OledLine5" id="OledLine5" readonly title="Satellite (#Sats/HDOP) [more sats are good, lowest HDOP is best. Should be < 8], and Batt Info [B means Battery; P means external pwr. Positive current is battery-charge-current, while prefixed with 'B', and battery voltage shown.]">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="OledLine1">OledLine1</label>
<input type="text" name="OledLine1" id="OledLine1" readonly title="OledLine1">
</div>
<div>
<label for="OledLine2">OledLine2</label>
<input type="text" name="OledLine2" id="OledLine2" readonly title="OledLine2">
</div>
</div>
<div class="grid-container halves">
<div>
<label for="OledLine3">OledLine3</label>
<input type="text" name="OledLine3" id="OledLine3" readonly title="OledLine3">
</div>
<div>
<label for="OledLine4">OledLine4</label>
<input type="text" name="OledLine4" id="OledLine4" readonly title="OledLine4">
</div>
</div>
</section>
<section>
<div class="grid-container full">
<h2 class="u-full-width">Received</h2>
</div>
<article style="overflow-x:auto;">
<table>
<thead>
<tr>
2021-04-26 12:45:29 +00:00
<th>Time (UTC)</th>
<th>Frame</th>
<th>RSSI</th>
<th>SNR</th>
</tr>
</thead>
<tbody id="receivedFrames">
</tbody>
</table>
</article>
</section>
2021-02-18 16:59:18 +00:00
<section>
<div class="grid-container full">
<h2 class="u-full-width">Actions</h2>
<h6 class="u-full-width">NEW: reboot after changes above only necessary, where explicitly stated</h6>
2021-02-18 16:59:18 +00:00
</div>
<article>
<div class="grid-container quarters">
2021-06-14 15:34:34 +00:00
<form action="/shutdown" method="post" onsubmit="return confirmAction('shutdown');">
<div>
<input class="button-primary" type="submit" value="Shutdown">
</div>
</form>
<form action="/reboot" method="post" onsubmit="return confirmAction('reboot');">
2021-02-18 16:59:18 +00:00
<div>
<input class="button-primary" type="submit" value="Reboot">
</div>
</form>
2021-06-14 15:34:34 +00:00
<form action="/restore" method="post" onsubmit="return confirmAction('do factory reset');">
2021-02-18 16:59:18 +00:00
<div>
<input class="button-primary" type="submit" value="Factory reset">
</div>
</form>
2021-09-14 18:47:32 +00:00
<form action="/beacon" method="post" onsubmit="return confirmAction('send beacon');">
<div>
<input class="button-primary" type="submit" value="Send Beacon">
</div>
</form>
2021-02-18 16:59:18 +00:00
</div>
</article>
</section>
2021-03-01 13:47:34 +00:00
<section>
<div class="grid-container full">
<h2 class="u-full-width">Update</h2>
</div>
<article>
<div class="grid-container full">
<h5 class="u-full-width">View configuration</h5>
</div>
<div class="grid-container full">
Click <a href="/cfg">here</a> to view (backup) your current settings.
</div>
<div class="grid-container full">
Click <a href="/wificfg">here</a> to view your configured wifi settings.
</div>
<div class="grid-container full">
<h5 class="u-full-width">Firmware update</h5>
</div>
2021-03-01 13:47:34 +00:00
<div class="grid-container full">
<form action="/update" method="post" enctype="multipart/form-data" id="upload_form" onsubmit="updateFileUpload(event)">
<div>
<label id="file-input" for="file">Choose firmware_file.bin ...</label>
2021-03-01 13:47:34 +00:00
<div><progress id="file-progress" max="100"></progress></div>
<input type="file" name="update" id="file" onchange="onFileChange(this)">
<input class="button-primary" type="submit" value="Update firmware">
2021-03-01 13:47:34 +00:00
</div>
</form>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Save configuration</h5>
</div>
<div class="grid-container full">
Save configuration to tracker's filesystem (/preferences.cfg)
<form action="/save2fs" method="post">
<div>
<input class="button-primary" type="submit" value="save2fs">
2021-03-01 13:47:34 +00:00
</div>
</form>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Save configuration</h5>
</div>
<div class="grid-container full">
Save Wifi configuration to tracker's filesystem (/wifi.cfg)
<form action="/savewifi2fs" method="post">
<div>
<input class="button-primary" type="submit" value="savewifi2fs">
</div>
</form>
</div>
2021-03-01 13:47:34 +00:00
</article>
</section>
<section>
<div class="grid-container full">
<h2 class="u-full-width">Documentation</h2>
</div>
<article>
<div class="grid-container full">
<h5 class="u-full-width">Tooltip</h5>
</div>
<div>If you navigate your mouse over an input field / button, you see a detailed description what it does / which values are expected.</div>
<div class="grid-container full">
<h5 class="u-full-width">Info for SNR/RSSI path encoding</h5>
</div>
<div>If enabled, add SNR and RSSI in path on receiption, prefixed with 'Q'. Examples:<br/>
SNR 23 RSSI -73 -> Q2373<br/>
SNR -03 RSSI -104 -> QA3K4<br/>
SNR -13 RSSI -114 -> QB3L4<br/>
Still testing, if it behaves good to our network.<br/>
Use with care; resulting longer path consumes a bit more airtime.
</div>
<div class="grid-container full">
<h5 class="u-full-width">TTGO T-Beam <b>middle</b> hardware-button<br>(User key functions):</h5>
</div>
<div>
<h6 class="u-full-width">short press</h6>
If OLED is enabled and OLED is OFF:<br/>
<ul>
<li>a short press will wake it up and show current data (as long as your configured "Display Timeout")</li>
</ul>
If OLED is disabled or OLED is ON:<br>
<ul>
<li>flip through the available pages</li>
<li>1. press: show lastheard list (Call, time, distance, direction). Distance and direction based on your current (or last known) position.</li>
<li>2. press: show current build number</li>
<li>3. - 5. press: show last 3 received packets (raw)</li>
<li>6a. press, if you have GPS-FIX: immediate send a beacon with the position from the GPS</li>
<li>6b. press, if you don't have a GPS-FIX: immediate send a beacon with the position saved in the configuration (or last known position)</li>
</ul>
<h6 class="u-full-width">long press</h6>
<ul>
Support for heltec wireless tracker. And many fixes. Two weeks hard work. - Webserver config: - Allow freq to be configured down to 430.1000. Set to at minimum 430.150 if you use bandwith 250 kHz! - Added hint for wifi tcp kiss android config - platformio.ini: - less monolithic lib dependencies, because with heltec wireless tracker we have another radiolib and a TFT instead of OLED, no AXP chip, etc. - heltec section: need to have the many defineshere (two hand full are needed for TFT) - heltec wireless tracker: - long press (if WiFi off) sets the tracker to deep sleep (there's no real power-off due to the lack of an axp chip. But the current is very very low). See also notes at webserver config. - uses RadioLib SX126X - has no AXP chip, and the VEXT_CTRL pin only switches (both at the same time!), gps and tft. For power saving ("lora rx disabled" config setting), we can call radio.sleep(), and wake it up with radio.standby() - If you set gps to allow sleep, VEXT_CTRL turns also TFT. Be aware of it, it's not a bug but a hardware limitation. GPS sleep is for powersave. TFT off saves also power. That's what you should expect. On wakeup, tft is reinitialized. - Funny: If you do Serial.flush() and immediately call setCpuFrequencyMhz(adjust_cpuFreq_to), then USB chip is reset to a state before that what the esp32 driver inizializes. -> Serial.printf's don't work. This lead to Serial.print("CPU Freq ad"); Serial.flush(); setCpuFrequencyMhz(adjust_cpuFreq_to); // ..survived Serial.printf("justed to: %d MHz\r\n", adjust_cpuFreq_to); -> "CPU Freq ad" - and finito. => removed the flush() - TODO: bluetooth LE support. Unfortunately, the chip lacks support for classic bluetooth serial. If you need to connect aprsdroid to the device, look at the wifi tcp server description. - TTGO_T-Beam_LoRa_APRS.ino: - better platform dependend includes - I had a bad usb cable or switch with too less voltage which caused the ttgo to reboot -> Changes to minimum voltage for shutdown Disabled brownout detector (which was per default according to esp32 libs) WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); Please check if this would be a problem of deep discharging your akku: #if defined(T_BEAM_V1_0) || defined(T_BEAM_V1_2) - if (InpVolts > 4.3) { + //if (InpVolts > 4.3) { // No, my usb hub suddenly only made 4.1V + if (InpVolts > 4.0) { I suppose no, because AXP does it's job at thosee devices - Needed to define BATTERY_PIN for every hardware - Renamed definition of LOW to TXLED_LOW - What is key_up, t_lock and time_delay? Wrong, it's for button control. -> Changed the names to button_key_up, button_t_lock and button_time_delay - LORA_MAX_MESSAGE_LEN is for SX127X (B_RF95 lib), because it includes the 4 bytes header. For the RadioLib buffer we need to reserver more space. - quite nice hack for reusing the display.xxx() routines for tft (class Emulated_SSD1306 which provides the needed functions) - New OLED_LINE_LEN_MAX instead of hardcoded value 21, because heltec TFT has in the normal font a width of 25. - RadioLib calls interrupt drivven signal_new_packet_received after a packet was receeived. - RadioLib special: Added definition for lora speeds / coding rate, like they have been addigned in the BG_RF95 lib - Pseudo-Sema-Locks: does not work 100%. Avoided endless loop by adding ESP.restart after 5min Also a delay of 1s in LoraSend() to mitigate lock problems when digipeating to the second of the both frequencies. - BG_RF95 sometimes causes crashes, esp. in waitPacketSent(). Introduced a delay. 100ms between sendAprs() and waitPacketSend() Changed calls to rf95.waitAvailableTimeout() to rf95.available() for stability reasons. - richonguzman has a good docu for power readings for non-AXP-chips. I use it for the heltec wireles tracker We may think about using it on T_BEAM_V0_7 and the rest. Problem: intensive testing needed, and the old T_BEAM_V0_7 devices became rare. - timer_once_a_second(): This is ok: if (!freeze_display) fillDisplayLine1(0); //update time & uptime But the following operations destroyed line3to5 for a displayed "((RX))" packet. -> Commented it out. No side effects observed-. - write2display(): now uses caching (calls write2display_cached()). Reason: TFT flickers when updates happen too often. On the other hand, caching on OLED is not possible because calling display.clearDisplay() is mandatory, else you get a pixel puzzle with old and new characters at each position. TFT has no display.display() and also nothing like clearLine. -> IF we write a line, we have to add (when using the normal font) blanks at the end of the text (up to position 25)-. Also, instead of OLED, TFT cannot brak long lins to the next; that's why we need to break the line ourself. The "next" lines we use in this case must not be cached. - fillDisplayLine1: Word "Up:" was behind the uptime value (caused by one of the commits of the last weeks). Fixed. - If own callsign is still N0CALL, disable lora_tx and set txPower to 0. - If during setup init lora chip or display fails, do not for(;;); , but sleep 5min and do ESP.restart(). Else you cannot land on the moon ;) TODO: check for correct initialization of SX126X chip - Removed tuplicate "Time used since start"-message - start of taskGPS moved to setup_phase2 section - If you double-click (or better "dit daah") the user button, manual beacon is triggered (like the behaviour at the end of the section). Needed by someone driving a car and cannot look at the display menu page number. - long press (if WiFi off) sets the heltec wireeless trackeer to deep sleep (nearly off - see description above). If wifi is off, press two times (first long-press starts webserver; second one does the shutdown). If tracker is not compiled with WIFI, long-press does a shutdown on heltec and a a reboot on other devices. TODO (and TEST!): check if other non-AXP-chip esp32 devices would instead also profit from a deep sleep - Tests before radio.readData() on SX126X devices are easier (no locking; no call comparing to rf95.available()), because flag_lora_packet_available is set. Changed general variable name packet_available to flag_lora_packet_available. - In part "((TX))", enforce a display update: fillDisplayLines3to5(1); Reason: tracker had his first gps fix and transmits - but the OLED showed the old position during TX; the sent packet hat the correct current position. - taskGPS: - support for heltec wireless tracker (Pin assignment and correct bitrate) - fix: - Serial.println(gpsDataBuffer); + Serial.print(gpsDataBuffer); - taskTNC: - if (serial_bt_client_is_connected) { + if (enable_bluetooth && serial_bt_client_is_connected) { - taskWebServer.cpp: deadlock protection, as in TTGO_T-Beam_LoRa_APRS.ino - data_embed: style.css and js.js had many blanks and comments which needed a quite large amount of disk space. A new script ../tools/remove_comment_from_code.py (which also can be used as a library) removes them, but leaves copyright comments intact. Feel free to use it in other projects. In summuary, many changes $ git diff|wc -l 2470 Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-05-27 07:29:21 +00:00
<li>toggle on or off WiFi and WebServer. Switching off WebServer will cause the device to reboot (or on a heltec wireless tracker device: shutdown (deep sleep)).</li>
<li><b>Cave</b>: if you long-press during boot, your <b>settings are purged!</b></li>
</ul>
</div>
<div class="grid-container full">
<h5 class="u-full-width">TTGO T-Beam left/right hardware-buttons:</h5>
</div>
<div>
<ul><li>Left button (nearby USB-port): if long-pressed, your device will powered off (press 7s), or is switched on again (2s).</li></ul>
<ul><li>Right button (lateral): short-press reboots your device (restarts the CPU).</li></ul>
</div>
<div>
</div>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<div class="grid-container full">
<h5 class="u-full-width">Tips for reducing power (Usage as tracker only):</h5>
</div>
<div>
WiFi OFF<br/>
<ul>
<li>be aware, that aprs-is connection depends on the Webserver and will stop working).</li>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
<li>select option 0 to disable WiFi & APRS-IS</li>
<li>select option 1 to disable WiFi if a bluetooth client is connected in between 60s on boot (recommended for portables, and for LORA32_21 devices)</li>
</ul>
LoRa Receiver OFF:<br>
<ul>
<li>reduces power consumption, if you just use the device as a tracker</li>
</ul>
Fixed Beacon off:<br>
<ul>
Many new features. bug fixes and improvements New features ------------ - personal text messages addressed to the tracker - are now recognized and stay local -> will not be digipeated or sent to aprsis see handle_aprs_messsage_addressed_to_us(), used in the main program (for rf-received packets) and in taskWebServer for packets received from aprs-is It also displays the message + writedisplaytext(" ((MSG))","",String(msg_from) + String(": ") + String(header_normal_or_third_party_end + 11+1),"","",""); for 30s: + display_dont_update_until = millis() + 30000L; We display the msg in favour of the RX packet. - we send an ACK when a message-ID is present - This is also useful for the winlink feature described below - Winlink feature - if enabled, your device will add the word @winlink to the position beacon text every hour (Refresh interval at winlink is two hours). You can choose if it is sent always, or only if a bluetooth device (i.e. aprsdroid) is connected. Winlink documented that you could send a "status packet" instead. This would be really nice and I implemented it - but they ignore it. -> I've commented it our (for not loosing it), and switched to the position comment approach. - If we get a notification, a "W" is in the display as indicator that new messages are waiting for you. The W is displayed for 24h. Because winlink only informs every 24 hours, and the tracker does not know if you read the message at the winlink system - Powerdown: - If you disconnect external power (USB) from the TTGO device, it can shutdown if you configured the shutdown delay. This is useful when operating in the car and you park. Someone configured a shutdown delay of 1h. -> Shutdown info is displayed a few seconds (you can interrupt the shutdown by pressing the middle button), and info is displayed again a few seconds right before the actual shutdown (also with the option do interrupt the shutdown by pressing the middle button). - On shutdown, a message QRT status message could be sent automatically, if configured - LoRa APRS digipeating: you can configure now an alias reacting as digipeater (kenwood names it "UITRACE". We react only on this call if it's in the first position of the path and has no digipeated flag. - Serial console tnc cli: - Show reboot and halt info also at the display if you issue the reboot or shutdown command And send a status packet if configured (see new status packet feature described above) Bug fixes --------- - Fix for AXP2101 on T-Beam V1.2: In setup() (setup_phase2_soft_reconfiguration()), we needed to add + axp.setButtonBatteryChargeVoltage(3300); // enable charge of the gps battery + axp.enableButtonBatteryCharge(); else the button battery (which is a capacitor) never became loaded. This lead to a time of 10 min to get a GPS fix after powering on (because it needed to wait for the almanach) - Fix and improve of smartbeaconing computation. Sometimes the timer went too fast down, sometimes it went up to max again -> we mostly relied on the course-change event. You will really notice the improvement. - Wrong info if lora TX is enabled and current state of dont_send_own_position_packets is true. Display showed "LoRa-TX; dis", but only the active sending of the beacon is stopped: - if (dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)) { + if (dont_send_own_position_packets) { + OledLine2 = wifi_info + " Own Bcn: dis"; + } else if (!(lora_tx_enabled || aprsis_enabled)) { OledLine2 = wifi_info + " LoRa-TX: dis"; - Beautifying the lines in the display output (indents for different speed units, missing blank if no "p" or "P", etc. I had developed that with the device with-display-and-no-GPS and saw the indent errors at the moment I used my new-device-with-display-and-GPS - During debugging, I was not able to send a packet with digipeated flag via serial console converse mode: typo (q instead of p check): - if (! (*p == '-' || *p == '>' || *p == ',' || *q == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) + if (! (*p == '-' || *p == '>' || *p == ',' || *p == '*' || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) ;)) - Moved update_speed_from_gps() higher, before gps.speed() calls, because update_speed_from_gps() implicitly changes the gps.speed.isUpdated() value during his calls. This lead to unexpected fewer conditions of speed updates - Improved gps location / speed / ... handling: Work on bestHdop section. You know, gps jumps at low speeds, and it's hard to find a good value between needed updates and wrong-positives. I left old values commented-out in the code. In my test, it now behaves much better. If situation is "p" (had a fix, but lost it), not only set aprsPresetShown "p" but also call displayInvalidGPS(); If situation is " ": we had no gps fix, but we now have a fix: // No GPS signal for a long time? Enforce tx: + if ((millis() - lastPositionTX) > ((sb_max_interval - sb_min_interval) / 2)) + nextTX = sb_min_interval; Sounds good? - removed time_to_refresh = millis() + showRXTime from handle_usb_serial_input(), KISSTX, TX-Xdigi, .. because this value is only intended for the time of displaying ((RX)-packets and must not be overloaded by other stuff. See also new variable display_dont_update_until. - taskWebServer send_queue_to_aprsis(): While \r is a valid char in an aprs message text (for separating lines), it must not be sent to aprs-is, because they interpret \r, \n, \r\n as EOL. That means, the rest of the line will be interpreted and may lead to a disconnect due to garbled input. -> + data.replace("\r", " "); data.replace("\n", " "); data.replace("\0", " "); - is_call_blacklisted(): moved strcat after length check: - // our ssid filter construct: -0 means search for call with ssid 0 zero. - if (!(r = strchr(buf, '-'))) - strcat(buf, "-0"); // after modifications above, is len(buf) still < 10 (space for ',' and \0)? if (strlen(buf) > 10) return 0; + // our ssid filter construct: -0 means search for call with ssid 0 zero. + if (!(r = strchr(buf, '-'))) + strcat(buf, "-0"); - Fixed: average_speed array: last field was always zero (%4 instead of %5) - average_speed[point_avg_speed] = (((curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 4]); // calculate smart beaconing. Even a not-updated old speed is ok here. + average_speed[point_avg_speed] = ((curr_kmph < 1.8 || (curr_hdop < 1.5 && curr_sats >= 3 && curr_kmph <= 16.0) || (curr_hdop < 4.0 && curr_sats >= 3 && curr_kmph > 16.0)) ? curr_kmph : average_speed[(point_avg_speed-1) % 5]); // calculate smart beaconing. Even a not-updated old speed is ok here. average_speed_final = (average_speed[0]+average_speed[1]+average_speed[2]+average_speed[3]+average_speed[4])/5; Other changes ------------- - Instead of if (enable_bluetooth && SerialBT.hasClient()){ we now have if (serial_bt_client_is_connected){ in TTGO_T-Beam_LoRa_APRS.ino, taskWebServer.cpp and taskTNC.cpp and the current state is checked in the main loop. This way we also learn if a new serial_bt_client is connected - Oled: new display_dont_update_until prevents display changes -> important messages are not interrupted - Better space handling for beacon text additions like "@winlink" "Batt=", "P=", " !W..!" - nextTX and next_fixed_beacon adjustments moved now in sendpacket(), because they need to be adjusted (and only then) after calling this function: + lastPositionTX = millis(); + // reset timer for automatic fixed beacon after manual beacon + next_fixed_beacon = millis() + fix_beacon_interval; + nextTX = sb_max_interval; - enableOled_now() enforces Oled to be on (without waiting for the next loop in main loop). display_dont_update_until is set to the needed values - variable name lastTX changed to lastPositionTX because this variable is only needed in the context of the last position transmission. -> the name lastTX was misleading. - is_call_blacklisted(): whitelist call "WLNK", because it has to be valid for winlink communication - at various places in the code: moved display routines like writedisplaytext("((KISSTX))","",inputBuf,"","",""); to the place before loraSend -> more time for the user to read the message - Middle button code: - fillDisplayLines3to5(0) added to MAN TX / FIX TX part - handle the power-off-timer condition (-> timeslots for being able to abort the poweroff) - variables t_last_smart_beacon_sent and lastPositionTX had the same meaning. -> Abandoned t_last_smart_beacon_sent. - New tmp_t_since_last_sb_tx in the loop: avoid unnecessary recomputations of millis() - lastPositionTX at various places afterwards in the loop. - taskWebserver: - On shutdown or reboot, send statusPacket if configured. And set a delay for do_send_status_message_about_shutdown_to_aprsis() - code beautify in handle_SaveAPRSCfg() and read_from_aprsis() (here: changed log message read_from_aprs to the more correct read_from_aprsis). - aprs-message ack-handling (described above) - renamed send_to_aprsis() to send_queue_to_aprsis(), because we have in TTGO_T-Beam_LoRa_APRS.ino the same function (which only fills the queue, which is handled by send_queue_to_aprsis() in taskWebServer.cpp). - More comprehensible: - <label for="aprs_llfgps">Use lat/lon of current GPS position</label> + <label for="aprs_llfgps">Instead, store current GPS position</label> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-02-24 11:29:10 +00:00
<li>Smart Beaconing is activated and GPS position is sent (if GPS fix is available). There is no fixed beacon. Beaconing starts after first GPS-fix (or if you manualy send a fixed beacon). If GPS-fix is lost, the last GPS position is sent in Fixed Beacon Interval.</li>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
</ul>
</div>
<div class="grid-container full">
<h5 class="u-full-width">Config in Filesystem:</h5>
</div>
<div>
General<br>
<ul>
<li>There could be two files: wifi.cfg and preferences.cfg. You find in the directory "data" of this sources-tree. </li>
<li>Each file should not exceed 2560 bytes.</li>
<li>To upload both files to SPIFFS of your board, you have to do this via Upload File System image in PlatformIO!</li>
<li>To find the 'Upload File System image' click the PlatformIO symbol (the little alien) on the left side, choose your configuration, click on 'Platform' and search for 'Upload File System image'. If you use platformio-cli, upload the filesystem as described below.</li>
</ul>
data/wifi.cfg<br>
<ul>
<li>wifi.cfg can to be created manually, following the json structure in the example. The names of the variables (aka keys) must not be altered</li>
<li>The preferred way is to upgrade the firmware to the newest version, make sure, that the wifi credentials are set correctly and then kilck the SAVEWIFI2FS Button.</li>
<li>The content, what will be saved, can be viewed above.</li>
<li>wifi.cfg in the directory data contains SSID and password of up to 10 AP and a password for the local accesspoint</li>
<li>The password must not be shorter that 8 byte. The json structure must not be changed</li>
<li>if something is wrong or the file is missing, the complete file will be ignored. If credentials are available in flash, they will be used.</li>
<li>An alternative to upload wifi.cfg to your board is via Upload File System image in PlatformIO!</li>
<li>To find the 'Upload File System image' click the PlatformIO symbol (the little alien) on the left side, choose your configuration, click on 'Platform' and search for 'Upload File System image'. If you use platformio-cli, upload the filesystem as described below.</li>
</ul>
which WiFi is selected?<br/>
<ul>
<li>An AP entry containing the keyword "prio":1 defines the entry which is taken as first to connect before following the configured order</li>
<li>if there is nothing prioritized, then the configured order is followed. If credentials are available in flash, they will be used first.</li>
<li>if no connection to a configured AP could be established, a local accesspoint with the SSID "call AP" will be created. After connected to, this Webserver will be reachable with the IP Address 192.168.4.1. The password for the selfAP can be preconfigured with the key "ap_password" in this file</li>
</ul>
data/preferences.cfg<br>
<ul>
<li>preferences.cfg can be created by the system, if you kilck to "SAVE2FS" in the Update section of the site.
<li>if you want to changes items of the preferences, you have to start with the data shown in the configuration view of this WebSite. Be sure to deleted everything before the "{". Again the keys must not be altered. The file then has to be placed into the data directory on your system using the name preferences.cfg.
</ul>
which config is selected?<br/>
<ul>
<li>during startup it will be checked, if there is a prevously used config stored in the system. Normally that is the config, you enter via the webserver. This will be used, if available.</li>
<li>If the previously stored config is not available (i.e., after a complete system erase or a factory reset), it will be checked, if a correct file data/preferences.cfg is availabe. If yes, it will be used. If not, the system comes up with the default values.</li>
</ul>
Factory reset<br/>
<ul>
<li>if factory reset is selected (either via the right button or the webserver), the system will start up with the config saved in data/preferences.cfg. So if you are in the field, make sure, that you have a working setup stored there and be carefull when overwriting.</li>
<li>If you really need a fresh system with the compiled default configuration, you have to delete the file data/preferences.cfg on the board, before you do a factory reset.</li>
</ul>
Platform.IO CLI<br>
<ul>
<li>if your computer is a raspberry PI3 or if you do not want/need the overhead of the Platfrom.IO GUI, you can use the CLI</li>
<li>you can find it <a href="https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html">here</a></li>
<li>usefull commands, if the board is connected to the PI via USB:</li>
<li>Clean all of project compilation: ~/.platformio/penv/bin/pio run -e [board identifier] -t cleanall --upload-port /dev/[port]</li>
<li>Erase Flash: ~/.platformio/penv/bin/pio run -e [board identifier] -t erase --upload-port /dev/[port]</li>
<li>Build Filesystem: ~/.platformio/penv/bin/pio run -e [board identifier] -t buildfs --upload-port /dev/[port]</li>
<li>Upload Filesystem: ~/.platformio/penv/bin/pio run -e [board identifier] -t uploadfs --upload-port /dev/[port]</li>
<li>Compile and Upload Firmware: ~/.platformio/penv/bin/pio run -e [board identifier] -t upload --upload-port /dev/[port]</li>
<li>start serial monitor: ~/.platformio/penv/bin/pio device monitor -p /dev/[port] -b 115200</li>
<li>all the commands above executed in that order, will completely erase the board, compile and upload the filesystem, compile and upload the current firmware, reboot the board and start the serial monitor</li>
<li>if a precompiled fw should be uploaded, without compilation, use the nobuild switch:<br/>
~/.platformio/penv/bin/pio run -e ttgo-t-beam-v1.0-development -t nobuild -t upload --upload-port /dev/ttyACM0</li>
Many fixes, improvements and new features - new web option - Otion Send Course/Speed along with Altitude. Removed option "Show Altitude in compressed position" removed. - Added hint for min/max values in tooltip - Tips for reducing power - platformio.ini: - enabled ENABLE_TNC_SELF_TELEMETRY. Reason: imho, no really need for telemetry. But code is not much. Tried to configure it in web-iface for debug purpose and it had no effect: because it was not compiled in. - always_send_cseSpd_AND_altitude feature (see also webconfig) - sendpacket() now gets information (flags) why / for what it is called This is for deciding if you send altitude with each transmission (then course/speed is always sent in compressed format, and /A=...... is added to the message text). [Vice versa is not allowed due to spec] If disabled, one transmission has course/speed and the next one altitude (depending on altitude ratio). Pretty cewl ;) - improvements on display output - improvements for handling gps state change valid/invalid. Lesser (better) cpu-consuming storage of last position. It's now handled in one routine at start of the main loop. - mheard list: json list was cuted. -> - DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 500); + DynamicJsonDocument doc(MAX_RECEIVED_LIST_SIZE * 1000); But we still face the problem of empty mheard lists in the webinterface. -> STILL NEED FOR FIX - webserver - wifi client / AP: Fix. If you loose connection to the AP, we now go to the algorithm again for reconnect, or start own AP. And if no client is associated in AP mode, we also try to re-determine. -> moved to new function restart_AP_or_STA() Reconnect also if we are STA and got no IP address by dhcp (there are some known compatibility issues with some dhcp-serrvers, where on dhcp refresh we lost the gateway): if (WiFi.getMode() == 1 && (WiFi.status() != WL_CONNECTED || WiFi.localIP() == IP_NULL || WiFi.subnetMask() == IP_SUBNET_NULL || WiFi.gatewayIP() == IP_GATEWAY_NULL)) - wifi status now with one status variable, i.E.: wifi_connection_status = WIFI_RUNNING_AS_AP; Used in the main program for display routine. === dl3el's commit messages (newest on top) - update time and sec of next beacon per second, even if rxshow is >0 - show gps time in OLED show gps time in OLED - smoothen speed in OLED. display current Position, Uptime & Satt Info on Website - bug fix in WebServer: Enable Wifi menu did not show the currently selected value - Features: - Change gps reception in main loop - do not accept gps data when hdop is > 10 - when gps data is invalid, show gps.location.age - when beacon is send manually and reset the timer for fixed beacon - when oled is constantly on, refresh screen every second - "." blinks in the upper left corner to show system is working - show wifi mode on screen (CLI or AP, run or stopped) - show SSID & IP on screen when manual tx (button, web) and as boot message - Bugfixes: - manual send works now, when oled is constantly o - fix output to Oled Display - reenable GPS: show alt in Display delay first AUT TX if fixed beacon is on - show Discharge mA in OLED for optimization === And finally, from the old changelog with changes since the last release: Changelog of 2022-08-09: Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-20 06:34:28 +00:00
</ul>
</div>
</article>
<article>
<div class="grid-container full">
<h5 class="u-full-width">Hardware notices</h5>
</div>
<div>
<h6 class="u-full-width">TTGO LoRa32 V2.1 (aka T3 V1.6.1)</h6>
Hardware limitation: if bluetooth is enabled and BT-client is connected, WIFI (-> Web-Server) does not work anymore.<br/>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
You'll see the red LED while booting turned on for 60s as indicatior for waiting for BT-clients.
Hack: firmware compiled with -e ttgo-lora32-v2.1 and bluetooth configuration variable is set to enabled, now listens on boot up to one minute for your bluetooth device to connect.<br/>
Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd) Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2022-08-07 18:01:24 +00:00
If a bluetooth device connects, it does not start the Web-Server. Else, it closes SerialBT port and starts the Web-Server on LORA32_21 devices.<br>
See also: new feature for switching WIFI off (i.e. if you use the device as portable tracker), if you don't need it: Webserver eats abt 80mA..<br>
Fix/Improvements/Features/Issues for commit from 2022-08-07 Fix - logical error for setting lora chip to sleep after tx; affected users with digipeating mode switched off. -> They did not receive any RF packets. Improvements: - hack for re-enabling webserver if it was switched off_ moved from the short-pressed beacon button to the long-pressed GPS button. Thanks to Thomas Beiderwieden <dl3el> for the patch. Feature - If you press the GPS button, on your OLED display now your AP name and IP address are displayed. Thanks to Thomas Beiderwieden <dl3el> for the patch. - Known issues_ The first Menu in the webinterface, "Enable WIFI", stores the chosen value. You can see it in the json config, and how boot-up behaves (-> correctly stored in the preferences). But: the chooser always displays Menu item 1 as active. Signed-off-by: Thomas Osterried <dl9sau@darc.de> Changelog of 2022-08-07: Major improvements and smaller bugfixes - feature: option to disable wifi. Saves abt 80mA current 3 options: 2 alaways on; 1 off if no bluetooth client is connected in between 60s after boot (watch red oled button; goes off as soon as a bt client connects in the boot phase). 0 disable (re-enabl by pressing beacon button) - pseudo csma/cd. ppersist / slottime as we know it from standard packet-radio / -APRS In loaSend. TODO: better concept with a tx-queue. But this is rather complex, because the queue must not grow too large, else we re-send old packts.. - feature to encode altitude in compressed position instead of /A=... compressed position can encode course/speed, altitude (and others). Option to send course/speed to 0%, 100% or something in between. altitude check button is obsolete. Switch off by setting alt ratio to 0. - cross-digipeating: just for sure, clear rx queue after going back to main freq. - if we are not a digipeater and we have no serial-bt-client, we may let the loraChip sleep (axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF)) -> saves current (a bit) - adjust_cpu_freq_to: change CPU frequency. May reduce cpu power consumption up to 20 %. Suggesting (and tested with) 80 MHz. USE WITH CARE! I.e. 40 MHz or 20 MHz did not work with my device (boot phase never ended) - options to start tncServer and gpsServer (if you don't need them, you may not like to expose these tcp ports to your LAN or HAMNET) - changed preferences.getString(PREFxxxxx) to preferences.getString(PREFxxxxx, ""), because if variable is not set, the preferences library returns "the variable name itself" - wtf!. In the case of PREF_NTP_SERVER, we saw log messages that ntp server with fqdn "ntp_server" could not be resolved; it had no impact, because it did a failback to the compiled-in default. Changed call for PREF_WIFI_PASSWORD, PREF_AP_PASSWORD, etc.. too. - wifi-AP: is set to esp_wifi_set_max_tx_power(8) (for lesser power consumption of the devie). 8 dBm are too less fore some cases. -> New web config for setting max_tx_power in AP- and STA- modes. - Fix: In mode wifi-client, it did not reconnect if association was lost. - small improvement for comment-text ratelimiting BG_RF95.cpp: BG_RF95::SignalDetected feature (needed for pseudo csma/cd)
2022-08-09 00:13:47 +00:00
How to switch the Webserver on again, please read the long-press button (GPS) section.
</div>
</article>
</section>
2021-02-18 16:59:18 +00:00
</div>
<footer>
<center><b>Contributors in order of appearance:</b><br> OE1ACM, OE3CJB, SQ9MDD, SQ5RWU, DJ1AN, M0IGA, SQ5WPR, DO2JMG, SP6VWX, SQ2WB, IU2FRL, DO3BOX, DL9SAU, DL3EL</center>
This commit brings many enhancements (like digipeating), fixes, and cosmetic changes. (c) 2021 Thomas Osterried dl9sau, License GPL CAVE: webconfig does not work properly. This needs to be fixed before the changes could go upstream! Until then, you can hardcode values in TTGO_T-Beam_LoRa_APRS.ino after the "// enforce valid transmissions even on wrong configurations" section. For examples, see appendix 1. New features Changes - improved automatic CodeRate adaption - Concept for adding SNR+RSSI in packet path. Q23073* means, 23 dB SNR, -73 dB RSSI. - full smart-beaconing implementation, with default parameters from kenwood / yaesu devices Changed files: 1. data_embed/index.html ------------------------ - cosmetic changes - added configuration options for new features described above - description how to configure DST-call-path-addressing - make configurable - automatic coderate adaption - rate limiting comment text - My recent "Accept own positions via KISS" feature - My recent "Allow GPS sleep while own positions received via KISS" feature - LoRa Digipeating - LoRa cross-digipeating (Mode, frequency, speed) 2. preference_storage.h ----------------------- definitions for the new configuration variables 3. platformio.ini ------------------k Variable MAX_TIME_TO_NEXT_TXT commented out. Was not implemented, and needs not be configured anymore. Default enabling of ENABLE_TNC_SELF_TELEMETRY switched off because most people do not need this DIGI_PATH="1": suggestion to make this default "FIXED_BEACON_EN": switched off, because if you have a tracker with GPS, you do smart-beaconing. Or if you have no GPS, you need to configure LAT/LONG before enabling fixed beaconing. "SHOW_BATT": if you really need this, enable it. "SPEED_1200": most regions use 300. Typo: LATIDUDE_PRESET -> changed to LATITUDE_PRESET (also in TTGO_T-Beam_LoRa_APRS.ino) 4. TTGO_T-Beam_LoRa_APRS.ino ---------------------------- global variables: - -D SPEED_1200 had not effekt. Added appropriete #ifdef. Perhaps, "LORA_SPEED_LOW" or "LORA_SPEED_FAST" (like mentioned in the web interface) would be a better approach - gps state: set default on only at devices with GPS-RX - New smartbeaconing: - values like sb_turn_slope and sb_turn_time - if -D SB_ALGO_KENWOOD, use those defaults. Scales better at low speed. - my new featerus: - lora_speed_cross_digi - lora_freq_cross_digi - lora_automatic_cr_adaption - lora_digipeating_mode - lora_add_snr_rssi_to_path - lora_cross_digipeating_mode - acceptOwnLocationReportsViaKiss - allow_gps_sleep_while_kiss - acceptOwnPositionReportsViaKiss - gps_allow_sleep_while_kiss - added code for new preferences values - in prepareAPRSFrame() - beautified DST-path addition on outString - better comment-ratelimiting computation - loraSend(): small change. - If lora freq was changed for sending one packet on another frequency (cross digi mode): + // cross-digipeating may have altered our RX-frequency. Revert frequency change needed for this transmission. + if (lora_FREQ != lora_freq) + rf95.setFrequency(lora_freq); - FEATURE request: // Feauture request: add param lora_speed. Currently, we need a variable for storing the old speed, and affer loraSend(), we have to revert :( I did not change the function parametes without asking - new sanity check: +// enforce valid transmissions even on wrong configurations +if (aprsSymbolTable.length() != 1) + aprsSymbolTable = String("/"); +if (aprsSymbol.length() != 1) + aprsSymbol = String("["); +if (aprsLatPreset.length() != 8 || !(aprsLatPreset.endsWith("N") || aprsLatPreset.endsWith("S")) || aprsLatPreset.c_str()[4] != '.') + aprsLatPreset = String("0000.00N"); +if (aprsLonPreset.length() != 9 || !(aprsLonPreset.endsWith("E") || aprsLonPreset.endsWith("W")) || aprsLonPreset.c_str()[5] != '.') + aprsLonPreset = String("00000.00E"); -> Without this, and if unconfigured, invalid packets without position in the position-part of the AX.25 packets could occur. Saw this happens, at findu.com ;) - encode_snr_rssi_in_path(): My idea of coding SNR and RSSI in packet path. Instead of modifying user's comment text (which some digi software does, and is a really bad idea) - add_element_to_path(): a quick, string based option to add a digi element to the AX.25 header - tnc_format_to_ax25_frame(): header parser, needed for handle_lora_frame_for_lora_digipeating - handle_lora_frame_for_lora_digipeating: does header rewrite for digipeating - implemented digipeating and cross-digipeating - redesignt automatic cr-adatpion - improved smart-beaconing decisions 5. taskWebServer.cpp: --------------------- - added code for new preferences values Appendix 1 ---------- I.e. my enforced test settings in TTGO_T-Beam_LoRa_APRS.ino behind the block "// enforce valid transmissions even on wrong configurations" were: lora_speed = 180; lora_digipeating_mode = 2; lora_cross_digipeating_mode = 0; sb_min_interval = 90000L; sb_max_interval = 1800000L; lora_automatic_cr_adaption = true; lora_speed_cross_digi = 1200; lora_freq_cross_digi = 433.900; sb_max_speed = 20; sb_turn_slope = 11; rate_limit_message_text = true; acceptOwnPositionReportsViaKiss = true; lora_add_snr_rssi_to_path = true; And in platformio.ini: -D 'KISS_PROTOCOL' ; leave enabled -D 'CALLSIGN="DL9SAU-12"' ; can be set from www interface -D 'DIGI_PATH="1"' ; can be set from www interface ; -D 'FIXED_BEACON_EN' ; can be set from www interface -D 'SB_ALGO_KENWOOD' ; Kenwood skales better on lower speed. -D 'LATITUDE_PRESET="0000.00N"' ; can be set from www interface -D 'LONGITUDE_PRESET="00000.00E"' ; can be set from www interface -D 'APRS_SYMBOL_TABLE="/"' ; can be set from www interface -D 'APRS_SYMBOL="["' ; can be set from www interface -D 'MY_COMMENT="/145.500MHz d023/Thomas D23. TTGO-T-Beam LoRa 70cm; KISS-Test"' ; can be set from www interface -D 'SHOW_ALT' ; can be set from www interface ; -D 'SHOW_BATT' ; can be set from www interface -D 'SHOW_RX_PACKET' ; can be set from www interface -D 'SHOW_RX_TIME=10000' ; can be set from www interface -D 'TXFREQ=433.775' ; set operating frequency ; -D 'LORA_SPEED_1200' ; comment out to set 300baud -D 'TXdbmW=23' ; set power ; -D 'ENABLE_OLED' ; can be set from www interface -D 'ENABLE_LED_SIGNALING' ; can be set from www interface -D 'NETWORK_TNC_PORT=8001' ; default KISS TCP port ; -D 'MAX_TIME_TO_NEXT_TX=120000L' ; can be set from www interface -- not implemented -D 'FIX_BEACON_INTERVAL=1800000L' ; can be set from www interface -D 'NETWORK_GPS_PORT=10110' ; GPS NMEA Port ; -D 'ENABLE_TNC_SELF_TELEMETRY' ; can be set from www interface -D 'TNC_SELF_TELEMETRY_INTERVAL=3600L' ; can be set from www interface (seconds) -D 'SHOW_OLED_TIME=15000' ; an be set from www interface (OLED Timeout) Signed-off-by: Thomas Osterried <dl9sau@github>
2021-11-24 12:34:04 +00:00
<center><b>Latest stable version:</b> <a href=https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS>https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS</a></center>
<center><b>This version runs the DL9SAU/DL3EL fork:</b> <a href=https://github.com/DL9SAU/TTGO-T-Beam-LoRa-APRS>https://github.com/DL9SAU/TTGO-T-Beam-LoRa-APRS</a></center>
2021-02-27 21:38:39 +00:00
<center><b>Licensed under:</b> CC BY-NC-SA</center>
2021-02-27 21:42:50 +00:00
<center><!--VERSION--></center>
local aprsis-filter, bugfix, vers_xxshort_bn, no gif 1.1 local aprsis-filter 1.1 Filter type (local, optional) Local aprsis-filter incoming for packet-types. We observed that if you have a server-site filter, i.e. for receive private messages only, 20km around you (t/m/MYCALL/20), aprsis sends also some location positions of users (if you heard them on RF), and even if \>20km away. Also we have seen packets of type objects telemetry, etc. With this option, you can filter incoming aprsis-packets localy in order to prevent them from gating to RF. Valid filters are poimqstunwb (Position packets, objects, items, message, query, status, telemetry, user-defined, NWS, weather, bulletin (bulletins are aprs-messages prefixed with BLN'). You can invert the filter ('all except ...') by adding a leading '-', i.e. '-mws'. If you leave this field empty, aprsis local filter is disabled. => [-]poimqstunwb 1.2 Filter 'words' (local, optional) Local aprsis-filter incoming for 'words': if this word is part of the header or message body of a packet coming from aprsis, the packet is filtered out. You can sepearate multiple word-filters by space. Leave empty to disable a word filter. Many thanks go to Tomasz SP2ATJ for this idea and nice discussions and intensively testing. 2. bugfix During "save" of the config via web-interface, we call setup_phase2_soft_reconfiguration() String Tcall is changed. OledHdr had a reference to Tcall. OledHdr needs to be updated. Else there's a very rare race condition (only observed one time in 3 years) where writedisplaytext(OledHdr,OledLine1,OledLine2,OledLine3,OledLine4,OledLine5); crashed during accessing OledHdr. OledHdr = String(Tcall); sould make a local copy. OledLines1-5 are also set explicit to "" now. 3. VERS_XXSHORT_BN buildscript_versioning.py generates BUILD_NUMBER, VERSION, VERSION_SHORT, etc. We compute the build_nr with base62 (0-9, a-z, A-Z) This gives us room for (62**2)-1 = 3843 builds between git commits. Should be enough. git_id short is 7 bytes. length of 5 has hopefully enough entropy. VERS_XXSHORT_BN may also be sent on RF -> We keep it short. 8 bytes now, (5 bytes git id, 2 bytes base62-encoded build_no) instead of typically 3 bytes before. Why we need both? 1. git-id: you can determine which was the git head when you checked out, and what has changed since then 2. During developmment / testing, build-nr increases each compiler run - but the git id only changes after git push. build_no helps you to distinguish, which version of a compler run you currently use. VERSION had a date resolution of 1 microsecond. -> now cutting string after the minute value. 4. style.css I decided to remove the #logo ("background-image"), which is a base64- encoded inline gif. We need space for the flash, because the code reached 100% of it's size!! If we have a solution, the logo comes back. Other options: - don't compile with -DENABLE_SYSLOG, or the like - re-partition. Other firmmware-developers did this. But I'm a bit sceptical to do this. Signed-off-by: Thomas Osterried <dl9sau@darc.de>
2024-03-17 04:42:21 +00:00
<center>
<label for="CompileFlags">Hardware / compiled with features:</label>
<input type="text" name="CompileFlags" id="CompileFlags" readonly title="CompileFlags">
</center>
2021-02-18 16:59:18 +00:00
</footer>
</body>
</html>