From 664f2d4b3a4e6c6ccf983fb20ba88add98e5b156 Mon Sep 17 00:00:00 2001 From: marcel Date: Tue, 28 Dec 2021 18:10:26 +0100 Subject: [PATCH] First working version --- README.md | 36 +- .../2021-12-27_telemetry_PE1RXF-7.dat | 5 + ...ges_from_PE1RXF-7_extracted_datafields.dat | 5 + .../2021-12-28_telemetry_PE1RXF-7.dat | 18 + .../aprs_log/aprs_received_messages.log | 228 ++ aprs_utils/aprs_log/aprs_send_messages.log | 36 + .../aprs_stations_heard_digipeated.log | 36 + .../aprs_log/aprs_stations_heard_direct.log | 8 + .../aprs_log/latest_telemetry_PE1RXF-7.dat | 1 + ...es_from_PE1RXF-7_latest_telemetry_data.dat | 1 + .../telemetry_PE1RXF-7_max_values.dat | 2 + .../telemetry_PE1RXF-7_min_values.dat | 2 + aprs_utils/beacon_ax0.txt | 1 + aprs_utils/beacon_ax1.txt | 1 + aprs_utils/config.shlib | 44 + aprs_utils/crontab.pe1rxf | 41 + ...nerate_diagrams_from_aprs_data_PE1RXF-7.sh | 276 ++ aprs_utils/get_max_min_values.sh | 132 + aprs_utils/pe1rxf-aprs-server.cfg | 73 + aprs_utils/pe1rxf-aprs-server.cfg.defaults | 71 + aprs_utils/pe1rxf-aprs-server.sh | 62 + aprs_utils/process_aprs_messages.sh | 217 ++ aprs_utils/process_traffic.sh | 182 ++ aprs_utils/send_beacon_external_radio.sh | 52 + aprs_utils/send_beacon_internal_radio.sh | 36 + aprs_utils/send_message.sh | 131 + aprs_utils/set_beacon.sh | 236 ++ documentation/APRS101.PDF | Bin 0 -> 3173392 bytes documentation/APRS_protocol_nodes_PE1RXF.pdf | Bin 0 -> 69080 bytes documentation/Raspberry-Pi-APRS.pdf | Bin 0 -> 1572829 bytes documentation/aprx-manual.pdf | Bin 0 -> 490077 bytes installation_pe1rxf-aprs-server.txt | 246 ++ screenshots/screenshot_main_page.png | Bin 0 -> 90723 bytes screenshots/screenshot_send_message.png | Bin 0 -> 94449 bytes screenshots/screenshot_telemetry.png | Bin 0 -> 123957 bytes start_aprs_server.sh | 73 + web-interface/css/font-awesome.min.css | 4 + web-interface/css/popup.css | 87 + web-interface/css/styles.css | 148 + web-interface/fonts/FontAwesome.otf | Bin 0 -> 134808 bytes web-interface/fonts/fontawesome-webfont.eot | Bin 0 -> 165742 bytes web-interface/fonts/fontawesome-webfont.svg | 2671 +++++++++++++++++ web-interface/fonts/fontawesome-webfont.ttf | Bin 0 -> 165548 bytes web-interface/fonts/fontawesome-webfont.woff | Bin 0 -> 98024 bytes web-interface/fonts/fontawesome-webfont.woff2 | Bin 0 -> 77160 bytes web-interface/images/home.svg | 17 + web-interface/images/mail-in.svg | 125 + web-interface/images/mail-out.svg | 132 + web-interface/images/preload.gif | Bin 0 -> 39159 bytes web-interface/images/received.svg | 185 ++ web-interface/images/settings.svg | 38 + web-interface/images/telemetry.svg | 155 + web-interface/index.php | 468 +++ web-interface/less/animated.less | 34 + web-interface/less/bordered-pulled.less | 25 + web-interface/less/core.less | 12 + web-interface/less/fixed-width.less | 6 + web-interface/less/font-awesome.less | 18 + web-interface/less/icons.less | 789 +++++ web-interface/less/larger.less | 13 + web-interface/less/list.less | 19 + web-interface/less/mixins.less | 60 + web-interface/less/path.less | 15 + web-interface/less/rotated-flipped.less | 20 + web-interface/less/screen-reader.less | 5 + web-interface/less/stacked.less | 20 + web-interface/less/variables.less | 800 +++++ web-interface/scss/_animated.scss | 34 + web-interface/scss/_bordered-pulled.scss | 25 + web-interface/scss/_core.scss | 12 + web-interface/scss/_fixed-width.scss | 6 + web-interface/scss/_icons.scss | 789 +++++ web-interface/scss/_larger.scss | 13 + web-interface/scss/_list.scss | 19 + web-interface/scss/_mixins.scss | 60 + web-interface/scss/_path.scss | 15 + web-interface/scss/_rotated-flipped.scss | 20 + web-interface/scss/_screen-reader.scss | 5 + web-interface/scss/_stacked.scss | 20 + web-interface/scss/_variables.scss | 800 +++++ web-interface/scss/font-awesome.scss | 18 + web-interface/send_message.php | 897 ++++++ web-interface/telemetry.php | 72 + web-interface/telemetry/humidity_graph.png | Bin 0 -> 10280 bytes .../minmax_humidity_large_greenhouse.png | Bin 0 -> 10691 bytes .../telemetry/minmax_humidity_outside.png | Bin 0 -> 10576 bytes .../minmax_humidity_small_greenhouse.png | Bin 0 -> 10679 bytes .../minmax_temperature_large_greenhouse.png | Bin 0 -> 9353 bytes .../telemetry/minmax_temperature_outside.png | Bin 0 -> 9220 bytes .../minmax_temperature_small_greenhouse.png | Bin 0 -> 9356 bytes .../telemetry/soilmoisture_graph.png | Bin 0 -> 11157 bytes web-interface/telemetry/temperature_graph.png | Bin 0 -> 9203 bytes 92 files changed, 10922 insertions(+), 1 deletion(-) create mode 100644 aprs_utils/aprs_log/2021-12-27_telemetry_PE1RXF-7.dat create mode 100644 aprs_utils/aprs_log/2021-12-28_messages_from_PE1RXF-7_extracted_datafields.dat create mode 100644 aprs_utils/aprs_log/2021-12-28_telemetry_PE1RXF-7.dat create mode 100644 aprs_utils/aprs_log/aprs_received_messages.log create mode 100644 aprs_utils/aprs_log/aprs_send_messages.log create mode 100644 aprs_utils/aprs_log/aprs_stations_heard_digipeated.log create mode 100644 aprs_utils/aprs_log/aprs_stations_heard_direct.log create mode 100644 aprs_utils/aprs_log/latest_telemetry_PE1RXF-7.dat create mode 100644 aprs_utils/aprs_log/messages_from_PE1RXF-7_latest_telemetry_data.dat create mode 100644 aprs_utils/aprs_log/telemetry_PE1RXF-7_max_values.dat create mode 100644 aprs_utils/aprs_log/telemetry_PE1RXF-7_min_values.dat create mode 100644 aprs_utils/beacon_ax0.txt create mode 100644 aprs_utils/beacon_ax1.txt create mode 100644 aprs_utils/config.shlib create mode 100644 aprs_utils/crontab.pe1rxf create mode 100755 aprs_utils/generate_diagrams_from_aprs_data_PE1RXF-7.sh create mode 100755 aprs_utils/get_max_min_values.sh create mode 100644 aprs_utils/pe1rxf-aprs-server.cfg create mode 100644 aprs_utils/pe1rxf-aprs-server.cfg.defaults create mode 100755 aprs_utils/pe1rxf-aprs-server.sh create mode 100755 aprs_utils/process_aprs_messages.sh create mode 100755 aprs_utils/process_traffic.sh create mode 100755 aprs_utils/send_beacon_external_radio.sh create mode 100755 aprs_utils/send_beacon_internal_radio.sh create mode 100755 aprs_utils/send_message.sh create mode 100755 aprs_utils/set_beacon.sh create mode 100644 documentation/APRS101.PDF create mode 100644 documentation/APRS_protocol_nodes_PE1RXF.pdf create mode 100644 documentation/Raspberry-Pi-APRS.pdf create mode 100644 documentation/aprx-manual.pdf create mode 100644 installation_pe1rxf-aprs-server.txt create mode 100644 screenshots/screenshot_main_page.png create mode 100644 screenshots/screenshot_send_message.png create mode 100644 screenshots/screenshot_telemetry.png create mode 100755 start_aprs_server.sh create mode 100644 web-interface/css/font-awesome.min.css create mode 100644 web-interface/css/popup.css create mode 100644 web-interface/css/styles.css create mode 100644 web-interface/fonts/FontAwesome.otf create mode 100644 web-interface/fonts/fontawesome-webfont.eot create mode 100644 web-interface/fonts/fontawesome-webfont.svg create mode 100644 web-interface/fonts/fontawesome-webfont.ttf create mode 100644 web-interface/fonts/fontawesome-webfont.woff create mode 100644 web-interface/fonts/fontawesome-webfont.woff2 create mode 100644 web-interface/images/home.svg create mode 100644 web-interface/images/mail-in.svg create mode 100644 web-interface/images/mail-out.svg create mode 100644 web-interface/images/preload.gif create mode 100644 web-interface/images/received.svg create mode 100644 web-interface/images/settings.svg create mode 100644 web-interface/images/telemetry.svg create mode 100644 web-interface/index.php create mode 100644 web-interface/less/animated.less create mode 100644 web-interface/less/bordered-pulled.less create mode 100644 web-interface/less/core.less create mode 100644 web-interface/less/fixed-width.less create mode 100644 web-interface/less/font-awesome.less create mode 100644 web-interface/less/icons.less create mode 100644 web-interface/less/larger.less create mode 100644 web-interface/less/list.less create mode 100644 web-interface/less/mixins.less create mode 100644 web-interface/less/path.less create mode 100644 web-interface/less/rotated-flipped.less create mode 100644 web-interface/less/screen-reader.less create mode 100644 web-interface/less/stacked.less create mode 100644 web-interface/less/variables.less create mode 100644 web-interface/scss/_animated.scss create mode 100644 web-interface/scss/_bordered-pulled.scss create mode 100644 web-interface/scss/_core.scss create mode 100644 web-interface/scss/_fixed-width.scss create mode 100644 web-interface/scss/_icons.scss create mode 100644 web-interface/scss/_larger.scss create mode 100644 web-interface/scss/_list.scss create mode 100644 web-interface/scss/_mixins.scss create mode 100644 web-interface/scss/_path.scss create mode 100644 web-interface/scss/_rotated-flipped.scss create mode 100644 web-interface/scss/_screen-reader.scss create mode 100644 web-interface/scss/_stacked.scss create mode 100644 web-interface/scss/_variables.scss create mode 100644 web-interface/scss/font-awesome.scss create mode 100644 web-interface/send_message.php create mode 100644 web-interface/telemetry.php create mode 100644 web-interface/telemetry/humidity_graph.png create mode 100644 web-interface/telemetry/minmax_humidity_large_greenhouse.png create mode 100644 web-interface/telemetry/minmax_humidity_outside.png create mode 100644 web-interface/telemetry/minmax_humidity_small_greenhouse.png create mode 100644 web-interface/telemetry/minmax_temperature_large_greenhouse.png create mode 100644 web-interface/telemetry/minmax_temperature_outside.png create mode 100644 web-interface/telemetry/minmax_temperature_small_greenhouse.png create mode 100644 web-interface/telemetry/soilmoisture_graph.png create mode 100644 web-interface/telemetry/temperature_graph.png diff --git a/README.md b/README.md index 7c946eb..5a7fb4d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,37 @@ # pe1rxf-aprs-server -A dual band aprs digipeater with enhanced telemetry capabilities. \ No newline at end of file +## A dual band APRS digipeater with enhanced telemetry capabilities. + +This is the custom software for a self build two band APRS digipeater. +It runs on a Raspberry Pi Zero with Raspberry Pi OS Bullseye. + +## In short + +It can: + + * Function as a normal digipeater (mono, dual or cross band) + * Work as an IGate (RX only or RX/TX) + * Send and receive APRS messages + * Display some basic statistics like heard stations. + * Process and display data from the custom telemetry devices from PE1RXF + +In has (hardware): + + * Two build in 1200bps AFSK modems + * Build in transceiver + * Connector for external (second) transceiver + * Two USB ports for a network adapter and a third modem + * Real Time Clock + * Raspberry Pi Zero + +It has (software): + + * APRX digipeater software for the basic functions + * Apache2 web server for the user interface + * Custom software (from this repository) for extra functionality + +Want to know more? The complete guide (and more) is available on https://www.meezenest.nl/mees + +![Main page](image screenshots/screenshot_main_page.png "Main page") +![Send message](image screenshots/screenshot_send_message.png "Send message") +![Telemetry](image screenshots/screenshot_telemetry.png "Telemetry") diff --git a/aprs_utils/aprs_log/2021-12-27_telemetry_PE1RXF-7.dat b/aprs_utils/aprs_log/2021-12-27_telemetry_PE1RXF-7.dat new file mode 100644 index 0000000..f1fe870 --- /dev/null +++ b/aprs_utils/aprs_log/2021-12-27_telemetry_PE1RXF-7.dat @@ -0,0 +1,5 @@ +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:39,16.6,59.8,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/aprs_log/2021-12-28_messages_from_PE1RXF-7_extracted_datafields.dat b/aprs_utils/aprs_log/2021-12-28_messages_from_PE1RXF-7_extracted_datafields.dat new file mode 100644 index 0000000..b992500 --- /dev/null +++ b/aprs_utils/aprs_log/2021-12-28_messages_from_PE1RXF-7_extracted_datafields.dat @@ -0,0 +1,5 @@ +2021-12-28 11:48,16.2,57.8,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 11:58,16.1,57.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:08,16.0,57.4,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:18,16.1,59.9,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:19,16.1,59.9,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/aprs_log/2021-12-28_telemetry_PE1RXF-7.dat b/aprs_utils/aprs_log/2021-12-28_telemetry_PE1RXF-7.dat new file mode 100644 index 0000000..0e9b542 --- /dev/null +++ b/aprs_utils/aprs_log/2021-12-28_telemetry_PE1RXF-7.dat @@ -0,0 +1,18 @@ +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:29,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:39,16.6,59.8,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:49,16.9,59.4,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 12:59,17.1,59.6,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 13:24,16.3,58.7,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 13:24,16.3,58.7,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 13:24,16.3,58.7,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 13:34,16.1,59.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 13:44,16.1,59.1,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 13:54,16.1,59.1,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 14:04,16.1,59.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 14:05,16.1,59.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 14:15,16.2,59.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 14:25,16.2,59.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28 14:35,16.3,59.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/aprs_log/aprs_received_messages.log b/aprs_utils/aprs_log/aprs_received_messages.log new file mode 100644 index 0000000..2c13cd0 --- /dev/null +++ b/aprs_utils/aprs_log/aprs_received_messages.log @@ -0,0 +1,228 @@ +2021-12-26 10:18:05,ax0,PE1RXF-1,APRX29,Test message +2021-12-26 10:18:38,ax0,PE1RXF-1,APRX29,Test message +2021-12-26 10:18:56,ax1,PE1RXF-1,APRX29,Test message +2021-12-26 10:19:29,ax1,PA1RXF-1,APRX29,Test message +2021-12-26 10:28:22,ax1,PA1RXF-1,APRX29,Test message{001 +2021-12-26 10:29:30,ax1,PE1RXF-1,APRX29,Test message{001 +2021-12-26 10:30:20,ax1,PE1RXF-1,APRX29,Test message{001 +2021-12-26 10:33:16,ax0,PE1RXF-1,APRX29,Test message{001 +2021-12-26 14:42:29,ax0,PE1RXF-1,APRX29,Test message 3 +2021-12-26 14:57:09,ax0,KM6LYW-9,APZ100,Your sister swims out to meet troop ships.{2 +2021-12-26 14:57:18,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 14:58:19,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 14:59:01,ax0,KM6LYW-9,APZ100,You will be recognized and honored as a community leader.{3 +2021-12-26 14:59:09,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 19:39:59,ax0,KM6LYW-9,APZ100,"A tall, dark stranger will have more fun than you.{4" +2021-12-26 19:40:06,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 19:40:13,ax0,KM6LYW-9,APZ100,A tall, dark stranger will have more fun than you.{4 +2021-12-26 19:40:20,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 19:40:34,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 19:40:54,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 19:41:01,ax0,KM6LYW-9,APZ100,ack0 +2021-12-26 19:46:20,ax0,KM6LYW-9,APZ100,"A tall, dark stranger will have more fun than you." +2021-12-26 19:51:03,ax0,KM6LYW-9,APZ100,"Your lucky number has been disconnected.{5" +2021-12-26 19:51:14,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:51:25,ax0,KM6LYW-9,APZ100,"Your lucky number has been disconnected.{5" +2021-12-26 19:51:36,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:51:47,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:51:58,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:53:02,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:53:13,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:58:23,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:58:34,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 19:59:17,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 20:02:30,ax0,PE1RXF-1,APRX29,"Test message" +2021-12-26 20:02:50,ax0,PE1RXF-1,APRX29,"Test message" +2021-12-26 20:03:54,ax0,KM6LYW-9,APZ100,"Do not overtax your powers.{7" +2021-12-26 20:04:15,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 20:04:36,ax0,KM6LYW-9,APZ100,"Do not overtax your powers.{7" +2021-12-26 20:04:58,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 20:08:37,ax0,KM6LYW-9,APZ100,"Condense soup, not books!{8" +2021-12-26 20:11:58,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 20:12:18,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 20:16:26,ax0,KM6LYW-9,APZ100,"Condense soup, not books!{8" +2021-12-26 20:16:47,ax0,KM6LYW-9,APZ100,"Condense soup, not books!{8" +2021-12-26 20:17:08,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 20:17:49,ax0,KM6LYW-9,APZ100,"Do not overtax your powers.{7" +2021-12-26 20:18:10,ax0,KM6LYW-9,APZ100,"Do not overtax your powers.{7" +2021-12-26 20:18:51,ax0,KM6LYW-9,APZ100,"Condense soup, not books!{8" +2021-12-26 20:19:12,ax0,KM6LYW-9,APZ100,"Condense soup, not books!{8" +2021-12-26 21:21:22,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 21:21:42,ax0,KM6LYW-9,APZ100,"You will gain money by a speculation or lottery.{9" +2021-12-26 21:21:43,ax0,KM6LYW-9,APZ100,"You will gain money by a speculation or lottery.{9" +2021-12-26 21:21:45,ax0,KM6LYW-9,APZ100,"You will gain money by a speculation or lottery.{9" +2021-12-26 21:21:56,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-26 21:21:58,ax0,KM6LYW-9,APZ100,"ack0" +2021-12-28 08:58:07,ax0,PE1RXF-1,APRX29,"Test message" +2021-12-28 08:58:08,ax0,PE1RXF-1,APRX29,"Test message" +2021-12-28 09:07:02,ax0,PE1RXF-1,APRX29,"Test message" +2021-12-28 09:08:53,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:11:50,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:14:11,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:15:02,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:17:10,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:49:49,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:53:28,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:54:35,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:59:04,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 09:59:05,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:59:06,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 09:59:43,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01<0x1b><0xa9>" +2021-12-28 10:00:11,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01<0x0d>F" +2021-12-28 10:00:51,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:01:07,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:01:15,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:01:29,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:01:55,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01<0xfb>" +2021-12-28 10:01:59,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01<0xf2><0x9d>" +2021-12-28 10:02:01,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:02:06,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:02:24,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:02:33,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:02:50,ax0,PE1RXF-2,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:02:57,ax1,PE1RXF-1,APRX29,"PE1RXF-7 :?01" +2021-12-28 10:03:18,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:03:21,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:03:22,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:03:39,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:03:40,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:03:41,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:03:49,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:03:50,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:03:51,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:04:12,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:04:17,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:04:28,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:04:53,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:05:09,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:05:25,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:05:34,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:05:44,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:06:21,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:06:22,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:06:23,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:06:27,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:06:36,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:06:53,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:06:54,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:07:43,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:07:44,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:07:45,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:09:35,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:09:36,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:09:37,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:09:52,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:09:58,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:07,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:11:12,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:22,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:25,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:11:38,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:40,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:45,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:11:47,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:50,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:53,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:11:54,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:11:55,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:28,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:12:29,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:30,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:39,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:12:40,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:41,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:48,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:12:53,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:12:54,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:55,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:12:58,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:12:59,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:13:00,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:15:17,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:15:27,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:15:27,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:15:28,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:16:43,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:16:44,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:16:52,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:16:52,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:17:07,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:17:08,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:33:23,ax1,PE1RXF-1,APRX29,"?01" +2021-12-28 10:33:29,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:33:32,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:33:39,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:33:40,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:33:41,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:33:44,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:33:45,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:33:46,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:33:51,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:33:52,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:33:53,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:34:08,ax0,PE1RXF-2,APRX29,"?01" +2021-12-28 10:34:09,ax0,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:34:10,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:35:48,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:36:16,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:36:44,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 10:37:43,ax1,PE1RXF-7,APZMDM," 15.2,58.8, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0" +2021-12-28 10:38:21,ax1,PE1RXF-7,APZMDM,"ack10" +2021-12-28 10:39:17,ax1,PE1RXF-7,APZMDM,"rej51" +2021-12-28 10:41:04,ax1,PE1RXF-7,APZMDM,"ack21" +2021-12-28 10:41:05,ax1,PE1RXF-7,APZMDM," 15.3,59.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 10:41:10,ax1,PE1RXF-7,APZMDM," 15.3,59.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 10:41:15,ax1,PE1RXF-7,APZMDM," 15.3,59.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 10:41:20,ax1,PE1RXF-7,APZMDM," 15.3,59.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 10:41:50,ax1,PE1RXF-7,APZMDM,"ack21" +2021-12-28 10:44:08,ax0,PE1RXF-2,APRX29,"?21{21" +2021-12-28 10:44:09,ax0,PE1RXF-7,APZMDM,"ack21" +2021-12-28 10:44:10,ax1,PE1RXF-7,APZMDM,"ack21" +2021-12-28 10:44:11,ax1,PE1RXF-1,APRX29,"ack21" +2021-12-28 10:51:25,ax0,PE1RXF-7,APZMDM," 15.4,58.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 10:51:26,ax1,PE1RXF-7,APZMDM," 15.4,58.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 10:51:27,ax1,PE1RXF-1,APRX29,"ack002" +2021-12-28 10:51:28,ax1,PE1RXF-1,APRX29,"ack002" +2021-12-28 10:51:30,ax0,PE1RXF-7,APZMDM," 15.4,58.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 10:51:31,ax1,PE1RXF-7,APZMDM," 15.4,58.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 10:51:32,ax1,PE1RXF-1,APRX29,"ack002" +2021-12-28 10:51:33,ax1,PE1RXF-1,APRX29,"ack002" +2021-12-28 10:57:55,ax1,PE1RXF-7,APZMDM,"ack21" +2021-12-28 11:07:37,ax1,PE1RXF-7,APZMDM," 15.5,58.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:07:42,ax1,PE1RXF-7,APZMDM," 15.5,58.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:07:47,ax1,PE1RXF-7,APZMDM," 15.5,58.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:15:53,ax1,PE1RXF-7,APZMDM," 15.5,58.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:16:24,ax1,PE1RXF-7,APZMDM," 15.5,58.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:16:53,ax1,PE1RXF-7,APZMDM," 15.5,58.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:27:59,ax1,PE1RXF-7,APZMDM," 15.9,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:28:09,ax1,PE1RXF-7,APZMDM," 15.9,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:28:14,ax1,PE1RXF-7,APZMDM," 15.9,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:31:56,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 11:32:14,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 11:36:14,ax1,PE1RXF-7,APZMDM," 16.1,58.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:37:14,ax1,PE1RXF-7,APZMDM," 16.1,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 11:38:14,ax1,PE1RXF-7,APZMDM," 16.1,59.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{003" +2021-12-28 11:43:20,ax1,PE1RXF-7,APZMDM,"APRS node V1" +2021-12-28 11:48:46,ax1,PE1RXF-7,APZMDM," 16.2,57.8, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 11:58:46,ax1,PE1RXF-7,APZMDM," 16.1,57.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 12:08:45,ax1,PE1RXF-7,APZMDM," 16.0,57.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{003" +2021-12-28 12:18:45,ax1,PE1RXF-7,APZMDM," 16.1,59.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{004" +2021-12-28 12:19:00,ax1,PE1RXF-7,APZMDM," 16.1,59.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{004" +2021-12-28 12:29:01,ax1,PE1RXF-7,APZMDM," 16.3,60.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{005" +2021-12-28 12:29:15,ax1,PE1RXF-7,APZMDM," 16.3,60.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{005" +2021-12-28 12:29:30,ax1,PE1RXF-7,APZMDM," 16.3,60.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{005" +2021-12-28 12:29:45,ax1,PE1RXF-7,APZMDM," 16.3,60.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{005" +2021-12-28 12:39:45,ax1,PE1RXF-7,APZMDM," 16.6,59.8, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{006" +2021-12-28 12:49:45,ax1,PE1RXF-7,APZMDM," 16.9,59.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{007" +2021-12-28 12:59:44,ax1,PE1RXF-7,APZMDM," 17.1,59.6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{008" +2021-12-28 13:24:02,ax1,PE1RXF-7,APZMDM," 16.3,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 13:24:17,ax1,PE1RXF-7,APZMDM," 16.3,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 13:24:32,ax1,PE1RXF-7,APZMDM," 16.3,58.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{001" +2021-12-28 13:34:32,ax1,PE1RXF-7,APZMDM," 16.1,59.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{002" +2021-12-28 13:44:47,ax1,PE1RXF-7,APZMDM," 16.1,59.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{003" +2021-12-28 13:54:47,ax1,PE1RXF-7,APZMDM," 16.1,59.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{004" +2021-12-28 14:04:47,ax1,PE1RXF-7,APZMDM," 16.1,59.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{005" +2021-12-28 14:05:02,ax1,PE1RXF-7,APZMDM," 16.1,59.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{005" +2021-12-28 14:15:01,ax1,PE1RXF-7,APZMDM," 16.2,59.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{006" +2021-12-28 14:25:01,ax1,PE1RXF-7,APZMDM," 16.2,59.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{007" +2021-12-28 14:35:01,ax1,PE1RXF-7,APZMDM," 16.3,59.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0{008" diff --git a/aprs_utils/aprs_log/aprs_send_messages.log b/aprs_utils/aprs_log/aprs_send_messages.log new file mode 100644 index 0000000..a046d4c --- /dev/null +++ b/aprs_utils/aprs_log/aprs_send_messages.log @@ -0,0 +1,36 @@ +2021-12-26 19:06:37,ax1,PE1RXF-7,APRX29,test berichtje +2021-12-26 19:06:39,ax0,PE1RXF-7,APRX29,test berichtje +2021-12-26 19:57:59,ax0,PE1RXF-7,APRX29,Test message +2021-12-26 20:01:09,ax0,PE1RXF-7,APRX29,Test message +2021-12-26 20:02:20,ax0,PE1RXF-7,APRX29,Test message +2021-12-26 20:02:52,ax0,KM6LYW-9,APRX29,fortune +2021-12-26 21:20:39,ax0,KM6LYW-9,APRX29,fortune +2021-12-28 08:57:37,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 08:58:03,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 08:58:19,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 08:58:32,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 08:58:46,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 08:58:56,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 09:06:59,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 09:07:44,ax0,PE1RXF-7,APRX29,Test message +2021-12-28 09:08:22,ax0,PE1RXF-7,APRX29,01 +2021-12-28 09:08:50,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:09:37,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:11:07,ax0,PE1RXF,APRX29,?01 +2021-12-28 09:11:36,ax0,PE1RXF,APRX29,?01 +2021-12-28 09:11:47,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:14:08,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:14:59,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:17:06,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:49:47,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:53:25,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:54:31,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 09:59:02,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 10:03:15,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 10:04:50,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 10:07:41,ax0,PE1RXF-7,APRX29,?01 +2021-12-28 11:30:48,ax1,PE1RXF-7,APRX29,?01 +2021-12-28 11:31:03,ax1,PE1RXF-7,APRX29,?01 +2021-12-28 11:31:13,ax1,PE1RXF-7,APRX29,?01 +2021-12-28 11:31:53,ax1,PE1RXF-7,APRX29,?01 +2021-12-28 11:32:12,ax1,PE1RXF-7,APRX29,?01 diff --git a/aprs_utils/aprs_log/aprs_stations_heard_digipeated.log b/aprs_utils/aprs_log/aprs_stations_heard_digipeated.log new file mode 100644 index 0000000..7f15610 --- /dev/null +++ b/aprs_utils/aprs_log/aprs_stations_heard_digipeated.log @@ -0,0 +1,36 @@ +2021-12-28 14:28:57,ax0,DO1IBS-4,APNU19-3 +2021-12-28 14:42:54,ax0,DL0PBS-5,APMI03 +2021-12-28 14:42:54,ax0,DO1EJK,APU25N +2021-12-28 10:27:43,ax0,DB0PDF-10,AP4R10 +2021-12-28 14:40:48,ax0,SM5WXF-9,APOTC1 +2021-12-28 13:50:33,ax0,DG4BRT-1,WIDE1-1 +2021-12-28 14:40:18,ax0,DB0ET,APTT4 +2021-12-27 20:38:17,ax0,DB0LER,APRX29 +2021-12-28 14:40:31,ax0,DB0PBG-5,APMI03 +2021-12-27 16:18:09,ax0,DL9OBG-9,UR5RY4 +2021-12-28 14:33:57,ax0,DB0WHV,APRX29 +2021-12-28 13:38:01,ax0,DH9AG-7,UR0TW1-2 +2021-12-28 14:08:40,ax0,DO6DN-10,APRX28 +2021-12-28 11:00:42,ax0,DL2KV-9,APPIC3 +2021-12-28 11:28:49,ax0,DB0OL-10,AP4R10 +2021-12-28 12:49:42,ax0,DB0SAH,APMI06 +2021-12-28 14:27:43,ax0,DB0OHB,APDW16 +2021-12-28 14:42:28,ax0,DO2DAN-6,APRS +2021-12-28 12:51:21,ax0,DL2MT-6,APRS +2021-12-28 12:54:26,ax0,DL1BJN-1,USRQX8 +2021-12-28 09:05:06,ax0,DB1NTO-2,APRS +2021-12-28 14:30:36,ax0,DG4BRT-6,WIDE1-1 +2021-12-28 11:14:11,ax0,DD1GO,5S0YX8 +2021-12-28 13:47:01,ax0,DG9OBI-9,US2TT6 +2021-12-27 15:29:20,ax0,DG9BFE-9,US2TR0 +2021-12-28 04:53:47,ax0,DO6HT-9,US2VT3 +2021-12-28 11:32:52,ax0,DL5UHR-9,US2TR2 +2021-12-27 14:54:30,ax0,PA0EMS-9,US2PQ4 +2021-12-28 13:54:19,ax0,PD1ATA,5S2RQ5 +2021-12-28 14:38:38,ax0,DB0LER-13,APRX29 +2021-12-28 08:44:58,ax0,OE5DRP-9,UQ3UT0 +2021-12-28 09:07:03,ax0,PE1RXF-1,APRX29 +2021-12-28 09:07:15,ax0,DB6PBG-5,APMI03 +2021-12-28 11:52:50,ax0,DO9BG-9,APOTC1 +2021-12-28 12:47:06,ax0,PA0KNW-2,APRS +2021-12-28 13:20:45,ax0,DG7ACF-9,5R1WQ2 diff --git a/aprs_utils/aprs_log/aprs_stations_heard_direct.log b/aprs_utils/aprs_log/aprs_stations_heard_direct.log new file mode 100644 index 0000000..75ce5d7 --- /dev/null +++ b/aprs_utils/aprs_log/aprs_stations_heard_direct.log @@ -0,0 +1,8 @@ +2021-12-28 14:41:24,ax0,DB0PBG-5,APMI03 +2021-12-28 14:38:02,ax0,DB0LER,APRX29 +2021-12-28 05:10:44,ax0,DL0PBS-5,APMI33 +2021-12-28 14:39:31,ax0,PA0EMS,USRPR0 +2021-12-28 10:51:30,ax0,PE1RXF-7,APZMDM +2021-12-28 10:51:33,ax1,PE1RXF-1,APRX29 +2021-12-28 14:35:02,ax1,PE1RXF-7,APZMDM +2021-12-28 10:44:09,ax0,PE1RXF-2,APRX29 diff --git a/aprs_utils/aprs_log/latest_telemetry_PE1RXF-7.dat b/aprs_utils/aprs_log/latest_telemetry_PE1RXF-7.dat new file mode 100644 index 0000000..9594f09 --- /dev/null +++ b/aprs_utils/aprs_log/latest_telemetry_PE1RXF-7.dat @@ -0,0 +1 @@ +16.3,59.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/aprs_log/messages_from_PE1RXF-7_latest_telemetry_data.dat b/aprs_utils/aprs_log/messages_from_PE1RXF-7_latest_telemetry_data.dat new file mode 100644 index 0000000..cd21fbe --- /dev/null +++ b/aprs_utils/aprs_log/messages_from_PE1RXF-7_latest_telemetry_data.dat @@ -0,0 +1 @@ +16.1,59.9,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/aprs_log/telemetry_PE1RXF-7_max_values.dat b/aprs_utils/aprs_log/telemetry_PE1RXF-7_max_values.dat new file mode 100644 index 0000000..b5ea927 --- /dev/null +++ b/aprs_utils/aprs_log/telemetry_PE1RXF-7_max_values.dat @@ -0,0 +1,2 @@ +2021-12-28,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/aprs_log/telemetry_PE1RXF-7_min_values.dat b/aprs_utils/aprs_log/telemetry_PE1RXF-7_min_values.dat new file mode 100644 index 0000000..b5ea927 --- /dev/null +++ b/aprs_utils/aprs_log/telemetry_PE1RXF-7_min_values.dat @@ -0,0 +1,2 @@ +2021-12-28,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +2021-12-28,16.3,60.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/aprs_utils/beacon_ax0.txt b/aprs_utils/beacon_ax0.txt new file mode 100644 index 0000000..67736e2 --- /dev/null +++ b/aprs_utils/beacon_ax0.txt @@ -0,0 +1 @@ +PE1RXF-1>APRX29,WIDE2-1:!5302.78N/00707.91E-https://meezenest.nl/pe1rxf diff --git a/aprs_utils/beacon_ax1.txt b/aprs_utils/beacon_ax1.txt new file mode 100644 index 0000000..ee85e06 --- /dev/null +++ b/aprs_utils/beacon_ax1.txt @@ -0,0 +1 @@ +/usr/sbin/beacon -d "APRX29" -s ax1 '!5302.78N/00707.91E-https://meezenest.nl/pe1rxf' diff --git a/aprs_utils/config.shlib b/aprs_utils/config.shlib new file mode 100644 index 0000000..f895ced --- /dev/null +++ b/aprs_utils/config.shlib @@ -0,0 +1,44 @@ +################################################################################## +# Bash library for reading configuration file # +# # +# Example use: # +# # +# #!/usr/bin/env bash # +# source config.shlib; # load the config library functions # +# echo "$(config_get myvar)"; # will be found in user-cfg # +# printf -- "%s\n" "$(config_get myvar $config_file_name)"; # safer way of # +# # echoing! # +# myvar="$(config_get myvar)"; # how to just read a value without echoing # +# echo "$(config_get othervar)"; # will fall back to defaults # +# echo "$(config_get bleh)"; # "__UNDEFINED__" since it isn't set anywhere # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server If not, see . # +# # +################################################################################## + +config_read_file() { + (grep -E "^${2}=" -m 1 "${1}" 2>/dev/null || echo "VAR=__UNDEFINED__") | head -n 1 | cut -d '=' -f 2-; +} + +config_get() { + val="$(config_read_file "${2}" "${1}")"; + if [ "${val}" = "__UNDEFINED__" ]; then + val="$(config_read_file pe1rxf-aprs-server.cfg.defaults "${1}")"; + fi + printf -- "%s" "${val}"; +} diff --git a/aprs_utils/crontab.pe1rxf b/aprs_utils/crontab.pe1rxf new file mode 100644 index 0000000..3642508 --- /dev/null +++ b/aprs_utils/crontab.pe1rxf @@ -0,0 +1,41 @@ +# This is a template crontab for the pe1rxf-aprs-server software. Make sure crontab changes are listed in this file! +# Otherwise, changing the beacon from the website will delete your changes made with crontab -e +# +# Edit this file to introduce tasks to be run by cron. +# +# Each task to run has to be defined through a single line +# indicating with different fields when the task will be run +# and what command to run for the task +# +# To define the time you can provide concrete values for +# minute (m), hour (h), day of month (dom), month (mon), +# and day of week (dow) or use '*' in these fields (for 'any'). +# +# Notice that tasks will be started based on the cron's system +# daemon's notion of time and timezones. +# +# Output of the crontab jobs (including errors) is sent through +# email to the user the crontab file belongs to (unless redirected). +# +# For example, you can run a backup of all your user accounts +# at 5 a.m every week with: +# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ +# +# For more information see the manual pages of crontab(5) and cron(8) +# +# m h dom mon dow command +# Start APRS server at boot time (delay of 1 minute is needed. Otherwise direwolf will not start for some reason) +@reboot sleep 60 && /home/marcel/ham/start_aprs_server.sh + +# Calculate minimum and maximum values from last day (run at one minute past midnight) +1 0 * * * /home/marcel/ham/aprs_utils/get_max_min_values.sh + +# Generate new graphs from telemetry data every thirty minutes +*/30 * * * * /home/marcel/ham/aprs_utils/generate_diagrams_from_aprs_data_PE1RXF-7.sh + +# Send beacon on AX0 (internal radio) +#* * * * * /home/marcel/ham/aprs_utils/send_beacon_internal_radio.sh + +#Send beacon on AX1 (external radio) +#* * * * * /home/marcel/ham/aprs_utils/send_beacon_external_radio.sh + diff --git a/aprs_utils/generate_diagrams_from_aprs_data_PE1RXF-7.sh b/aprs_utils/generate_diagrams_from_aprs_data_PE1RXF-7.sh new file mode 100755 index 0000000..1a07fba --- /dev/null +++ b/aprs_utils/generate_diagrams_from_aprs_data_PE1RXF-7.sh @@ -0,0 +1,276 @@ +#!/bin/bash +################################################################################## +# # +# Generates graphs and images of telemetry data for website # +# Run at the same frequency as telemetry data comes in # +# For example in the crontab # + # +# Data format: # +# [date],1,2,3,4,5,6,7,8,9,10 # +# # +# 1 = temperature outside # +# 2 = humidity outside # +# 3 = temperature small greenhouse # +# 4 = humidity small greenhouse # +# 5 = soil moisture small greenhouse # +# 6 = soil moisture small greenhouse # +# 7 = temperature large greenhouse # +# 8 = humidity large greenhouse # +# 9 = soil moisture large greenhouse # +# 10 = soil moisture large greenhouse # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server. If not, see . # +# # +################################################################################## + +APRS_RECEIVED_MESSAGES_DIR=/home/marcel/ham/aprs_utils/aprs_log/ +APRS_TELEMETRY_FILE_SUFFIX=_telemetry_PE1RXF-7.dat +APRS_LATEST_TELEMETRY_FILE=latest_telemetry_PE1RXF-7.dat +APRS_MAX_DATA=telemetry_PE1RXF-7_max_values.dat +APRS_MIN_DATA=telemetry_PE1RXF-7_min_values.dat + +PUBLISH_DIR=/home/marcel/ham/web-interface/telemetry + +# Get current date YYYY-MM-DD +CURRENT_DATE=$(date +"%Y-%m-%d") +YESTERDAY_DATE=$(date --date="yesterday" +"%Y-%m-%d") +MONTH_AGO_DATE=$(date --date="1 month ago" +"%Y-%m-%d") + +APRS_TELEMETRY_FILE_TODAY="$CURRENT_DATE$APRS_TELEMETRY_FILE_SUFFIX" +APRS_TELEMETRY_FILE_YESTERDAY="$YESTERDAY_DATE$APRS_TELEMETRY_FILE_SUFFIX" +APRS_TELEMETRY_FILE="TEMP$APRS_TELEMETRY_FILE_SUFFIX" + +cat "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE_YESTERDAY" > "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" +cat "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE_TODAY" >> "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" + + +#Temperatuur buiten en in beide kassen +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Temperatuur" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d %H:%M" + set format x "%H:%M" + set xdata time + set xrange ["$YESTERDAY_DATE 00:00":"$CURRENT_DATE 23:59"] + set yrange [-20:45] + set xlabel "tijd" + set ylabel "graden Celcius" + set ytics 10 + set mytics 2 + set mxtics 2 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/temperature_graph.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:2 with lines linewidth 2 title "buiten", "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:8 with lines linewidth 2 title "kleine kas", "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:4 with lines linewidth 2 title "grote kas" +EOFMarker + +#Luchtvochtigheid buiten en in beide kassen +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Luchtvochtigheid" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d %H:%M" + set format x "%H:%M" + set xdata time + set xrange ["$YESTERDAY_DATE 00:00":"$CURRENT_DATE 23:59"] + set yrange [0:100] + set xlabel "tijd" + set ylabel "%" + set ytics 10 + set mytics 2 + set mxtics 2 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/humidity_graph.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:3 with lines linewidth 2 title "buiten", "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:9 with lines linewidth 2 title "kleine kas", "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:5 with lines linewidth 2 title "grote kas" +EOFMarker + +#Bodemvochtigheid in beide kassen +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Bodemvochtigheid" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d %H:%M" + set format x "%H:%M" + set xdata time + set xrange ["$YESTERDAY_DATE 00:00":"$CURRENT_DATE 23:59"] + set yrange [0:1000] + set xlabel "tijd" + set ylabel "absoluut" + set ytics 100 + set mytics 2 + set mxtics 2 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/soilmoisture_graph.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:10 with lines linewidth 2 title "kleine kas", "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" using 1:6 with lines linewidth 2 title "grote kas" +EOFMarker + +#Min-max temperatuur buiten afgelopen maand +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Minimale en maximale buitentemperatuur afgelopen maand" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d" + set format x "%d %B" + set xdata time + set xrange ["$MONTH_AGO_DATE":"$YESTERDAY_DATE"] + set yrange [-20:45] + set xlabel "tijd" + set ylabel "graden Celcius" + set ytics 10 + set mytics 2 + set mxtics 7 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/minmax_temperature_outside.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_MAX_DATA" using 1:2 with lines linewidth 2 title "maxima", "$APRS_RECEIVED_MESSAGES_DIR$APRS_MIN_DATA" using 1:2 with lines linewidth 2 title "minima" +EOFMarker +#Min-max temperatuur kleine kas afgelopen maand +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Minimale en maximale temperatuur kleine kas afgelopen maand" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d" + set format x "%d %B" + set xdata time + set xrange ["$MONTH_AGO_DATE":"$YESTERDAY_DATE"] + set yrange [-20:45] + set xlabel "tijd" + set ylabel "graden Celcius" + set ytics 10 + set mytics 2 + set mxtics 7 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/minmax_temperature_small_greenhouse.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_MAX_DATA" using 1:8 with lines linewidth 2 title "maxima", "$APRS_RECEIVED_MESSAGES_DIR$APRS_MIN_DATA" using 1:8 with lines linewidth 2 title "minima" +EOFMarker +#Min-max temperatuur grote kas afgelopen maand +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Minimale en maximale temperatuur grote kas afgelopen maand" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d" + set format x "%d %B" + set xdata time + set xrange ["$MONTH_AGO_DATE":"$YESTERDAY_DATE"] + set yrange [-20:45] + set xlabel "tijd" + set ylabel "graden Celcius" + set ytics 10 + set mytics 2 + set mxtics 7 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/minmax_temperature_large_greenhouse.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_MAX_DATA" using 1:4 with lines linewidth 2 title "maxima", "$APRS_RECEIVED_MESSAGES_DIR$APRS_MIN_DATA" using 1:4 with lines linewidth 2 title "minima" +EOFMarker +#Min-max luchtvochtigheid buiten afgelopen maand +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Minimale en maximale luchtvochtigheid buiten afgelopen maand" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d" + set format x "%d %B" + set xdata time + set xrange ["$MONTH_AGO_DATE":"$YESTERDAY_DATE"] + set yrange [0:100] + set xlabel "tijd" + set ylabel "%" + set ytics 10 + set mytics 2 + set mxtics 7 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/minmax_humidity_outside.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_MAX_DATA" using 1:3 with lines linewidth 2 title "maxima", "$APRS_RECEIVED_MESSAGES_DIR$APRS_MIN_DATA" using 1:3 with lines linewidth 2 title "minima" +EOFMarker +#Min-max luchtvochtigheid kleine kas afgelopen maand +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Minimale en maximale luchtvochtigheid kleine kas afgelopen maand" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d" + set format x "%d %B" + set xdata time + set xrange ["$MONTH_AGO_DATE":"$YESTERDAY_DATE"] + set yrange [0:100] + set xlabel "tijd" + set ylabel "%" + set ytics 10 + set mytics 2 + set mxtics 7 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/minmax_humidity_small_greenhouse.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_MAX_DATA" using 1:9 with lines linewidth 2 title "maxima", "$APRS_RECEIVED_MESSAGES_DIR$APRS_MIN_DATA" using 1:9 with lines linewidth 2 title "minima" +EOFMarker +#Min-max luchtvochtigheid grote kas afgelopen maand +/usr/bin/gnuplot -persist <<-EOFMarker + set title "Minimale en maximale luchtvochtigheid grote kas afgelopen maand" font ",14" textcolor rgbcolor "royalblue" + set datafile separator "," + set timefmt "%Y-%m-%d" + set format x "%d %B" + set xdata time + set xrange ["$MONTH_AGO_DATE":"$YESTERDAY_DATE"] + set yrange [0:100] + set xlabel "tijd" + set ylabel "%" + set ytics 10 + set mytics 2 + set mxtics 7 + set grid ytics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mytics + set grid xtics lt 0 lw 1 lc rgb "#bbbbbb" + set grid mxtics + set pointsize 1 + set terminal png size 1024,768 + set output "$PUBLISH_DIR/minmax_humidity_large_greenhouse.png" + plot "$APRS_RECEIVED_MESSAGES_DIR$APRS_MAX_DATA" using 1:5 with lines linewidth 2 title "maxima", "$APRS_RECEIVED_MESSAGES_DIR$APRS_MIN_DATA" using 1:5 with lines linewidth 2 title "minima" +EOFMarker +# rest of script, after gnuplot exits + +# Remove temporary file +rm "$APRS_RECEIVED_MESSAGES_DIR$APRS_TELEMETRY_FILE" + diff --git a/aprs_utils/get_max_min_values.sh b/aprs_utils/get_max_min_values.sh new file mode 100755 index 0000000..d1dc35e --- /dev/null +++ b/aprs_utils/get_max_min_values.sh @@ -0,0 +1,132 @@ +#!/bin/bash + +################################################################################## +# Reads telemetry data file from yesterday and output minimum and maximum # +# values of every data field. # +# This script should be run once every day at midnight # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server. If not, see . # +# # +################################################################################## + +APRS_RECEIVED_MESSAGES_DIR=/home/marcel/ham/aprs_utils/aprs_log/ +APRS_TELEMETRY_FILE_SUFFIX=_telemetry_PE1RXF-7.dat +MIN_TELEMETRY_FILE=telemetry_PE1RXF-7_min_values.dat +MAX_TELEMETRY_FILE=telemetry_PE1RXF-7_max_values.dat + +PUBLISH_DIR=/home/marcel/ham/aprs_utils/publish + +# Get current and yesterdays date YYYY-MM-DD +CURRENT_DATE=$(date +"%Y-%m-%d") +YESTERDAY_DATE=$(date --date="yesterday" +"%Y-%m-%d") + +APRS_TELEMETRY_FILE="$APRS_RECEIVED_MESSAGES_DIR$YESTERDAY_DATE$APRS_TELEMETRY_FILE_SUFFIX" + +SINGLE_SHOT=0 + +declare -a max +declare -a min + +##################################################################### +# Evaluate a floating point number conditional expression. +# Bash itself cannot work with floating point, so we use bc + +function float_cond() +{ + local cond=0 + if [[ $# -gt 0 ]]; then + cond=$(echo "$*" | bc -q 2>/dev/null) + if [[ -z "$cond" ]]; then cond=0; fi + if [[ "$cond" != 0 && "$cond" != 1 ]]; then cond=0; fi + fi + local stat=$((cond == 0)) + return $stat +} + +#Read file line by line +while read LINE + do + #echo "$LINE" + #Datafiled should have comma as field seperator, so asume this and put values in array for later testing if data is valid + IFS=',' read -r -a array <<< "$LINE" + + cnt=0 + for index in "${!array[@]}" + do + + #First time in the loop: we fill the min and max values with the first values in the array + if [[ $SINGLE_SHOT -eq 0 ]]; then + #echo "First: ${array[index]}" + max[cnt]=${array[index]} + min[cnt]=${array[index]} + + else + #bash cannot work with floats, so we use this function instead + if float_cond "${array[index]} > ${max[cnt]}"; then + #if [[ ${array[index]} > ${max[cnt]} ]]; then + #echo "Max: $cnt ${max[cnt]} $index ${array[index]}" + max[cnt]=${array[index]} + + fi + #bash cannot work with floats, so we use this function instead + if float_cond "${array[index]} < ${min[cnt]}"; then + #if [[ ${array[index]} < ${min[cnt]} ]]; then + min[cnt]=${array[index]} + # echo "Min: $cnt $index ${array[index]}" + fi + fi + #echo "$cnt" + cnt=$((cnt+1)) + + done + + #First time through loop is different from all the rest + SINGLE_SHOT=1 + +#done < /dev/stdin +done < "$APRS_TELEMETRY_FILE" + +#Store minimum values in file (append file) +for index in "${!min[@]}" + do + #first data field: remove time from date/time field and no leading comma + if [[ index -eq 0 ]] ; then + min[index]="$(echo "${min[index]}" | cut -b 1-10)" + echo -n "${min[index]}" >> "$APRS_RECEIVED_MESSAGES_DIR$MIN_TELEMETRY_FILE" + else + echo -n ",${min[index]}" >> "$APRS_RECEIVED_MESSAGES_DIR$MIN_TELEMETRY_FILE" + fi + done + + #New line + echo "" >> "$APRS_RECEIVED_MESSAGES_DIR$MIN_TELEMETRY_FILE" + +#Store maximum values in file (append file) +for index in "${!max[@]}" + do + #first data field: remove time from date/time field and no leading comma + if [[ index -eq 0 ]] ; then + max[index]="$(echo "${max[index]}" | cut -b 1-10)" + echo -n "${max[index]}" >> "$APRS_RECEIVED_MESSAGES_DIR$MAX_TELEMETRY_FILE" + else + echo -n ",${max[index]}" >> "$APRS_RECEIVED_MESSAGES_DIR$MAX_TELEMETRY_FILE" + fi + done + + #New line + echo "" >> "$APRS_RECEIVED_MESSAGES_DIR$MAX_TELEMETRY_FILE" diff --git a/aprs_utils/pe1rxf-aprs-server.cfg b/aprs_utils/pe1rxf-aprs-server.cfg new file mode 100644 index 0000000..7087bd9 --- /dev/null +++ b/aprs_utils/pe1rxf-aprs-server.cfg @@ -0,0 +1,73 @@ +# Configuration file for PE1RXF-APRS-server +# +# Must be readable AND writable by www-data! +# +# This file is read periodically, so just changing this file will automatically +# update take effect. + +# Internal radio settings +ax0_name=Digipeater 2 meter +ax0_frequency=144.800 MHz + +# Beacon time internal radio (ax0) in minutes. 0-60, where 0 disables beaconing. +ax0_beacon_time=0 +ax0_beacon_destination=APRX29 +ax0_beacon_path=WIDE2-1 +ax0_beacon_position=!5302.78N/00707.91E- +ax0_beacon_comment=https://meezenest.nl/pe1rxf +ax0_beacon_file=/home/marcel/ham/aprs_utils/beacon_ax0.txt +ax0_transmit_directory=/home/marcel/ham/aprs_utils/aprs_files_to_transmit/ + +# Predefined messages +ax0_message1_id=Test naar PE1RXF +ax0_message1_text=Test message +ax0_message1_destination=PE1RXF-7 +ax0_message1_path=WIDE2-2 + +ax0_message2_id=Fortune bot +ax0_message2_text=fortune +ax0_message2_destination=KM6LYW-9 +ax0_message2_path=WIDE2-2 + +ax0_message3_id=Message 3 +ax0_message3_text=Thirth message +ax0_message3_destination=PE1RXF-7 +ax0_message3_path=WIDE2-2 + +ax0_message4_id=Message 4 +ax0_message4_text=Fourth message +ax0_message4_destination=PE1RXF-7 +ax0_message4_path=WIDE2-2 + +# External radio settings +ax1_name=Digipeater 70 cm +ax1_frequency=432.500 MHz + +# Beacon time external radio (ax1) in minutes. 0-60, where 0 disables beaconing. +ax1_beacon_time=0 +ax1_beacon_destination=APRX29 +ax1_beacon_path=none +ax1_beacon_position=!5302.78N/00707.91E- +ax1_beacon_comment=https://meezenest.nl/pe1rxf +ax1_beacon_file=/home/marcel/ham/aprs_utils/beacon_ax1.txt + +# Predefined messages +ax1_message1_id=Message 1 +ax1_message1_text=First message +ax1_message1_destination=PE1RXF-7 +ax1_message1_path=WIDE2-2 + +ax1_message2_id=Message 2 +ax1_message2_text=Second message +ax1_message2_destination=PE1RXF-7 +ax1_message2_path=WIDE2-2 + +ax1_message3_id=Message 3 +ax1_message3_text=Thirth message +ax1_message3_destination=PE1RXF-7 +ax1_message3_path=WIDE2-2 + +ax1_message4_id=Message 4 +ax1_message4_text=Fourth message +ax1_message4_destination=PE1RXF-7 +ax1_message4_path=WIDE2-2 diff --git a/aprs_utils/pe1rxf-aprs-server.cfg.defaults b/aprs_utils/pe1rxf-aprs-server.cfg.defaults new file mode 100644 index 0000000..a1f82ba --- /dev/null +++ b/aprs_utils/pe1rxf-aprs-server.cfg.defaults @@ -0,0 +1,71 @@ +# Default configuration file for PE1RXF-APRS-server +# +# The values in this file are read only if the correspondinf values in the main configuration file are missing. + +# Internal radio settings +ax0_name=Digipeater 2 meter +ax0_frequency=144.800 MHz + +# Beacon time internal radio (ax0) in minutes. 0-60, where 0 disables beaconing. +ax0_beacon_time=0 +ax0_beacon_destination=APRX29 +ax0_beacon_path=WIDE2-1 +ax0_beacon_position=!5302.78N/00707.91E- +ax0_beacon_comment=https://meezenest.nl/pe1rxf +ax0_beacon_file=/home/marcel/ham/aprs_utils/beacon_ax0.txt +ax0_transmit_directory=/home/marcel/ham/aprs_utils/aprs_files_to_transmit/ + +# Predefined messages +ax0_message1_id=Message 1 +ax0_message1_text=First message +ax0_message1_destination=PE1RXF-7 +ax0_message1_path=none + +ax0_message2_id=Message 2 +ax0_message2_text=Second message +ax0_message2_destination=PE1RXF-7 +ax0_message2_path=WIDE2-1 + +ax0_message3_id=Message 3 +ax0_message3_text=Thirth message +ax0_message3_destination=PE1RXF-7 +ax0_message3_path=WIDE2-2 + +ax0_message4_id=Message 4 +ax0_message4_text=Fourth message +ax0_message4_destination=PE1RXF-7 +ax0_message4_path=WIDE3-3 + +# External radio settings +ax1_name=Digipeater 70 cm +ax1_frequency=432.500 MHz + +# Beacon time external radio (ax1) in minutes. 0-60, where 0 disables beaconing. +ax1_beacon_time=0 +ax1_beacon_destination=APRX29 +ax1_beacon_path=none +ax1_beacon_position=!5302.78N/00707.91E- +ax1_beacon_comment=https://meezenest.nl/pe1rxf +ax1_beacon_file=/home/marcel/ham/aprs_utils/beacon_ax1.txt + +# Predefined messages +ax1_message1_id=Message 1 +ax1_message1_text=First message +ax1_message1_destination=PE1RXF-7 +ax1_message1_path=WIDE2-2 + +ax1_message2_id=Message 2 +ax1_message2_text=Second message +ax1_message2_destination=PE1RXF-7 +ax1_message2_path=WIDE2-2 + +ax1_message3_id=Message 3 +ax1_message3_text=Thirth message +ax1_message3_destination=PE1RXF-7 +ax1_message3_path=WIDE2-2 + +ax1_message4_id=Message 4 +ax1_message4_text=Fourth message +ax1_message4_destination=PE1RXF-7 +ax1_message4_path=WIDE2-2 + diff --git a/aprs_utils/pe1rxf-aprs-server.sh b/aprs_utils/pe1rxf-aprs-server.sh new file mode 100755 index 0000000..9e33004 --- /dev/null +++ b/aprs_utils/pe1rxf-aprs-server.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +################################################################################## +# Main loop of PE1RXF-APRS-server. # +# Here it all starts. From here all functions are called. # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server If not, see . # +# # +################################################################################## + +source /home/marcel/ham/aprs_utils/config.shlib; # load the config library functions +ConfigFile="/home/marcel/ham/aprs_utils/pe1rxf-aprs-server.cfg" + +web_interface_config_file="/home/marcel/ham/web-interface/config/pe1rxf-aprs-server.cfg" + +ConfigFileMD5_previous=0 + +while : +do + + # First check if configuration file has changed. If so, update the processes with the new changes. + # Ontherwise, do nothing. + ConfigFileMD5=$(md5sum $ConfigFile | cut -d ' ' -f1) + if [ $ConfigFileMD5 != $ConfigFileMD5_previous ]; then + echo "Configuration file has changed." + + # Update beacon files and corresponding crontab entries + /home/marcel/ham/aprs_utils/set_beacon.sh -c $ConfigFile + + ConfigFileMD5_previous=$ConfigFileMD5 + fi + + # If configuration file on web interface exists, we copy it to the program directory + # and remove it from the web interface + if [ -f "$web_interface_config_file" ]; then + cp $web_interface_config_file $ConfigFile + rm -f $web_interface_config_file + + # change beacon settings + /home/marcel/ham/aprs_utils/set_beacon.sh -c $ConfigFile + fi + + echo + echo "Loop repeats every 1 seconds. Press [CTRL+C] to stop.." + sleep 1 + +done diff --git a/aprs_utils/process_aprs_messages.sh b/aprs_utils/process_aprs_messages.sh new file mode 100755 index 0000000..89784dc --- /dev/null +++ b/aprs_utils/process_aprs_messages.sh @@ -0,0 +1,217 @@ +#!/bin/bash + +################################################################################## +# Background process started by the initializing script start_aprs_server.sh # +# # +# It processes all incomming messages for PE1RXF and sends acknowledges when # +# if asked for (via kissutil for ax0 and beacon for ax1. It also prosesses the # +# special telemetry messages from PE1RXF devices. # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server If not, see . # +# # +################################################################################## + +# Filters out all APRS messages to PE1RXF-1 and saves these to file. +# Generate and send acknowledge message when incomming message ask for it. +# Also, reads APRS message and when it is telemetry converts it to a format readeble by gnuplot +# +# The script aprs_utils.sh starts a filters means of tail | grep on the log file of aprx. +# The output of this command goes to this script via stdin. This script reads this line by line +# and sends an acknowledgement to the stations asking for one. This is done via kissutil, which +# is also started the script aprs_utils.sh + +# Direectory where kissutils expect files to send +APRS_SEND_MESSAGE_DIRECTORY=/home/marcel/ham/aprs_utils/aprs_files_to_transmit/ + +# Directory where APRS messages are stored +APRS_RECEIVED_MESSAGES_DIR=/home/marcel/ham/aprs_utils/aprs_log/ +MESSAGE_FILE=aprs_received_messages.log + +# Get current date YYYY-MM-DD +#CURRENT_DATE=$(date +"%Y-%m-%d") + +#Read file line by line and send acknowledge if needed +while read LINE + do + + ################# + # Section: filter out APRS messages and generate acknowledge if needed + ################# + + # Get current date YYYY-MM-DD (do this every time, because a day may already have passed) + CURRENT_DATE=$(date +"%Y-%m-%d") + CURRENT_DATE_TIME=$(date +"%Y-%m-%d %H:%M:%S") + + # figure out who sent the message + # Check channel 1 (internal radio) + CALL="$(grep -o -P "(?<=PE1RXF-1 d \*).+?\>"<<<$LINE)" + PORT="ax0" + + # If call is empty, frame not from channel 1, maybe from channel 2? + if [ -z $CALL ]; then + CALL="$(grep -o -P "(?<=PE1RXF-2 d \*).+?\>"<<<$LINE)" + PORT="ax1" + fi + + # Lets do something with the message from channel 1 or 2 + if [[ $CALL ]]; then + + # Remove last character from string + CALL=${CALL::-1} + + ACKNOWLEDGE_NUMBER="$(grep -o -P '(?<={).*'<<<$LINE)" + + #Write messages to file with name "YYYY-MM-DD_messages_from_NOCALL.log (append) + #echo "$LINE" >> "$APRS_RECEIVED_MESSAGES_DIR""$CURRENT_DATE""_messages_from_""$CALL"".log" + + # Get full path of message + if [ $PORT == "ax0" ]; then + FULL_PATH="$(grep -o -P '(?<=PE1RXF-1 d \*).+?:'<<<$LINE)" + else + FULL_PATH="$(grep -o -P '(?<=PE1RXF-2 d \*).+?:'<<<$LINE)" + fi + + FULL_PATH="$(grep -o -P '(?<=\>).*'<<<$FULL_PATH)" + # Remove last character from string + FULL_PATH=${FULL_PATH::-1} + + # Messages direct from sender do not contain a '*' in the path + DIRECT="$(grep '*' <<<$FULL_PATH)" + if [ -z $DIRECT ]; then + DIRECT="true" + else + unset DIRECT + fi + # First call in path is destination + DESTINATION="$(awk -F "," '{ print $1} ' <<<$FULL_PATH)" + + # get the message + MESSAGE="$(grep -o -P '(?<=::).*'<<<$LINE)" + MESSAGE="$(grep -o -P '(?<=:).*'<<<$MESSAGE)" + + # Write message to file + echo "$CURRENT_DATE_TIME"",""$PORT"",""$CALL"",""$DESTINATION",\"$MESSAGE\" >> "$APRS_RECEIVED_MESSAGES_DIR""$MESSAGE_FILE" + + #Send incomming message as email + #echo "$LINE" | /home/marcel/ham/aprs_utils/send_aprs_message_to_email.sh + + #Generate acknowledge frame and put in in de directory where kissutil can find (ax0) it or (for channel ax1) send it via beacon + if [[ $ACKNOWLEDGE_NUMBER ]]; then + + # if call is less than 9 characters, add spaces at the end (according to the APRS protocol) + printf -v FORMATTED_CALL %-9.9s "$CALL" + + OWN_CALL="$(grep "PE1RXF"<<<$CALL)" + + # Message on port ax0 + if [ $PORT == "ax0" ]; then + + # Local (own) stations do not need to be digipeated + if [ $OWN_CALL ]; then + APRS_FRAME="PE1RXF-1>APRX29::$FORMATTED_CALL:ack$ACKNOWLEDGE_NUMBER" + # Everyone else is digipeated + else + APRS_FRAME="PE1RXF-1>APRX29,WIDE2-2::$FORMATTED_CALL:ack$ACKNOWLEDGE_NUMBER" + fi + + # Send acknowledge frame + APRS_TRANSMIT_FILE="acknowledge_""$FORMATTED_CALL""_message_""$ACKNOWLEDGE_NUMBER" + echo "$APRS_FRAME" > "$APRS_SEND_MESSAGE_DIRECTORY$APRS_TRANSMIT_FILE" + + # Message on port ax1 + else + + # Local (own) stations do not need to be digipeated + if [ $OWN_CALL ]; then + APRS_HEADER="APRX29" + APRS_FRAME="::$FORMATTED_CALL:ack$ACKNOWLEDGE_NUMBER" + args[0]=-d + args[1]="APRX29" + args[2]=-s + args[3]=ax1 + args[4]=":$FORMATTED_CALL:ack$ACKNOWLEDGE_NUMBER" + # Everyone else is digipeated + else + APRS_HEADER="APRX29 WIDE2-2" + APRS_FRAME="::$FORMATTED_CALL:ack$ACKNOWLEDGE_NUMBER" + args[0]=-d + args[1]="APRX29 WIDE2-2" + args[2]=-s + args[3]=ax1 + args[4]=":$FORMATTED_CALL:ack$ACKNOWLEDGE_NUMBER" + fi + + # use beacon to send acknowledge frame + #echo "/usr/sbin/beacon -d '$APRS_HEADER' -s ax1 '$APRS_FRAME'" + #/usr/sbin/beacon -d "$APRS_HEADER" -s ax1 "$APRS_FRAME" + /usr/sbin/beacon "${args[@]}" + + fi + + fi + + ################# + # Section: process APRS telemetry to format readable by gnuplot + ################# + + # get date field + DATE="$(echo $LINE | cut -b 1-10)" + + # get time field + TIME="$(echo $LINE | cut -b 12-16)" + + # get telemetry fields and remove empty spaces and optional acknowledge message if it is present + TELEMETRY="$(echo $LINE | cut -b 65- | sed 's/{.*//' | tr -d "[:blank:]")" + + #Datafiled should have comma as field seperator, so asume this and put values in array for later testing if data is valid + IFS=',' read -r -a array <<< "$TELEMETRY" + + # Test if message contains valid numbers. It could be an acknowledge or beacon etc. + TELEMETRY_ERROR=0 + for index in "${!array[@]}" + do + + if ! [[ ${array[index]} =~ ^-?[0-9]+([.][0-9]+)?$ ]] ; then + TELEMETRY_ERROR=1 + fi + + done + + # If telemetry message is valid, store it (change APRS date/time (UTM) with local time) + if [ $TELEMETRY_ERROR -eq 0 ] ; then + + # Get current date and time YYYY-MM-DD %H:%M for local time stamp (do this every time, because a day may already have passed) + LOCAL_DATE_TIME=$(date +"%Y-%m-%d %H:%M") + + #Format line by combining all needed fields + DATA_STRING="$(echo "$LOCAL_DATE_TIME","$TELEMETRY")" + #| tr -d "[:blank:]")" + + #Write messages to file with name "YYYY-MM-DD_telemetry_NOCALL.log (append) + echo "$DATA_STRING" >> "$APRS_RECEIVED_MESSAGES_DIR""$CURRENT_DATE""_telemetry_""$CALL"".dat" + + #Write last telemetry message to file (overwrite) for current values + echo "$TELEMETRY" > "$APRS_RECEIVED_MESSAGES_DIR""latest_telemetry_""$CALL"".dat" + + fi + + fi + # end channel 1 + +done < /dev/stdin + diff --git a/aprs_utils/process_traffic.sh b/aprs_utils/process_traffic.sh new file mode 100755 index 0000000..c7a5aed --- /dev/null +++ b/aprs_utils/process_traffic.sh @@ -0,0 +1,182 @@ +#!/bin/bash + +################################################################################## +# Background process started by the initializing script start_aprs_server.sh # +# # +# It processes all incomming traffic and filters out heard stations. # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server If not, see . # +# # +################################################################################## + +# The script aprs_utils.sh starts a filters means of tail | grep on the log file of aprx. +# The output of this command goes to this script via stdin. This script reads this line by line. + +# Directory where APRS data files are stored +APRS_DATA_DIR=/home/marcel/ham/aprs_utils/aprs_log/ +APRS_STATIONS_HEARD_DIRECT=aprs_stations_heard_direct.log +APRS_STATIONS_HEARD_DIGIPEATED=aprs_stations_heard_digipeated.log + +# If files do not exist, create them +if [ ! -f "$APRS_DATA_DIR$APRS_STATIONS_HEARD_DIRECT" ]; then + touch $APRS_DATA_DIR$APRS_STATIONS_HEARD_DIRECT +fi +if [ ! -f "$APRS_DATA_DIR$APRS_STATIONS_HEARD_DIGIPEATED" ]; then + touch $APRS_DATA_DIR$APRS_STATIONS_HEARD_DIGIPEATED +fi + +# Maybe there is an old temporary file still pressent: remove it +for ACTIVE_FILE in $APRS_STATIONS_HEARD_DIRECT $APRS_STATIONS_HEARD_DIGIPEATED +do + rm $APRS_DATA_DIR$ACTIVE_FILE".tmp" +done + +# Get current date YYYY-MM-DD +#CURRENT_DATE=$(date +"%Y-%m-%d") +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %H:%M:%S") +LAST_EPOCH_DATE="$(date -d"$CURRENT_DATE_TIME" +%s)" + +#Read file line by line and send acknowledge if needed +while read LINE + do + + # Start filter for received messages to PE1RXF (all sufixes) + # Messages addressed to PE1RXF are stored in file /home/marcel/ham/aprs_utils/aprs_received_messages.log + MESSAGE_FOR_PE1RXF="$(grep "::PE1RXF"<<<$LINE)" + if [[ $MESSAGE_FOR_PE1RXF ]]; then + #echo "Message from PE1RXF" + /home/marcel/ham/aprs_utils/process_aprs_messages.sh <<<$MESSAGE_FOR_PE1RXF + fi + + # Get current date YYYY-MM-DD (do this every time, because a day may already have passed) + CURRENT_DATE_TIME=$(date +"%Y-%m-%d %H:%M:%S") + CURRENT_DATE=$(date +"%Y-%m-%d") + + # figure out who sent the message + # Check channel 1 (internal radio) + CALL="$(grep -o -P "(?<=PE1RXF-1 d \*).+?\>"<<<$LINE)" + PORT="ax0" + + # If call is empty, frame not from channel 1, maybe from channel 2? + if [ -z $CALL ]; then + CALL="$(grep -o -P "(?<=PE1RXF-2 d \*).+?\>"<<<$LINE)" + PORT="ax1" + fi + + # Lets do something with the frame from channel 1 or 2 + if [[ $CALL ]]; then + + # Remove last character from string + CALL=${CALL::-1} + + # Get full path of message + if [ $PORT == "ax0" ]; then + FULL_PATH="$(grep -o -P '(?<=PE1RXF-1 d \*).+?:'<<<$LINE)" + else + FULL_PATH="$(grep -o -P '(?<=PE1RXF-2 d \*).+?:'<<<$LINE)" + fi + + FULL_PATH="$(grep -o -P '(?<=\>).*'<<<$FULL_PATH)" + # Remove last character from string + FULL_PATH=${FULL_PATH::-1} + + # Messages direct from sender do not contain a '*' in the path + DIRECT="$(grep '*' <<<$FULL_PATH)" + if [ -z $DIRECT ]; then + DIRECT="true" + else + unset DIRECT + fi + # First call in path is destination + DESTINATION="$(awk -F "," '{ print $1} ' <<<$FULL_PATH)" + + #echo "Port: " $PORT + #echo "Call:" $CALL + #echo "Path:" $FULL_PATH + #echo "Destination: "$DESTINATION + + # Select correct log file to use: direct or digipeated + if [ $DIRECT ]; then + ACTIVE_FILE=$APRS_STATIONS_HEARD_DIRECT + else + ACTIVE_FILE=$APRS_STATIONS_HEARD_DIGIPEATED + fi + + # get line number where call occurs (will return NULL if call is never heard) + LINE_NUMBER="$(grep -n $PORT","$CALL "$APRS_DATA_DIR$ACTIVE_FILE" | cut -d : -f 1)" + #LINE_NUMBER=2 + + # If call already heard: replace line + if [[ $LINE_NUMBER ]]; then + # replace found line with new date and time + #SED_CMD="'$LINE_NUMBER c\\""$CURRENT_DATE_TIME"",""$CALL"","$DESTINATION"' ""$APRS_DATA_DIR""$ACTIVE_FILE" + #echo $SED_CMD + RESULT="$(sed -i "$LINE_NUMBER c\\$CURRENT_DATE_TIME,$PORT,$CALL,$DESTINATION" $APRS_DATA_DIR$ACTIVE_FILE )" + # If call not heard before: add to file + else + echo "$CURRENT_DATE_TIME"",""$PORT"",""$CALL"",""$DESTINATION" >> "$APRS_DATA_DIR""$ACTIVE_FILE" + fi + + + fi + + + # Do maintenance on all log files (every 10 minutes) + # Remove all heard calls older than 24 hours + EPOCH_DATE="$(date -d"$CURRENT_DATE_TIME" +%s)" + + EPOCH_COUNTER=$((EPOCH_DATE-LAST_EPOCH_DATE)) + + if [ "$EPOCH_COUNTER" -gt "600" ]; then + LAST_EPOCH_DATE="$EPOCH_DATE" + + for ACTIVE_FILE in $APRS_STATIONS_HEARD_DIRECT $APRS_STATIONS_HEARD_DIGIPEATED + do + touch $APRS_DATA_DIR$ACTIVE_FILE".tmp" + LINE_NR=1 + while read FILE_LINE; do + + # reading each line + + # echo "Line No. $LINE_NR : $FILE_LINE" + LINE_DATE="$(awk -F "," '{ print $1} ' <<<$FILE_LINE)" + EPOCH_LINE_DATE="$(date -d"$LINE_DATE" +%s)" + # echo $EPOCH_LINE_DATE + ELAPSED_TIME=$((EPOCH_DATE-EPOCH_LINE_DATE)) + # echo $ELAPSED_TIME + + # Entry older than 24 hours? Remove entry + if [ "$ELAPSED_TIME" -lt "86400" ]; then + #RESULT="$(sed -e "$LINE_NR d" $APRS_DATA_DIR$ACTIVE_FILE >> $APRS_DATA_DIR$ACTIVE_FILE".tmp")" + echo $FILE_LINE >> $APRS_DATA_DIR$ACTIVE_FILE".tmp" + # echo "OUD" + fi + + LINE_NR=$((LINE_NR+1)) + + done < $APRS_DATA_DIR$ACTIVE_FILE + cp $APRS_DATA_DIR$ACTIVE_FILE".tmp" $APRS_DATA_DIR$ACTIVE_FILE + rm $APRS_DATA_DIR$ACTIVE_FILE".tmp" + + done + fi + # END: remove all heard calls older than 24 hours + + +done < /dev/stdin + diff --git a/aprs_utils/send_beacon_external_radio.sh b/aprs_utils/send_beacon_external_radio.sh new file mode 100755 index 0000000..0edd471 --- /dev/null +++ b/aprs_utils/send_beacon_external_radio.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +################################################################################## +# Send beacon via APRS channel 2 (ax1) # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server. If not, see . # +# # +################################################################################## + +source /home/marcel/ham/aprs_utils/config.shlib; # load the config library functions + +ConfigFile="/home/marcel/ham/aprs_utils/pe1rxf-aprs-server.cfg" +BEACON_FILE="$(config_get ax1_beacon_file $ConfigFile)" + +if [ -f "$BEACON_FILE" ]; then + BEACON_TEXT=$(cat "$BEACON_FILE") + + # The BEACON_FILE holds the command for sending a beacon. So make this file part of the script. + # I shouldn't really do this, as it is a potential security risk. But the BEACON_FILE is as safe as this script itself. + # The BEACON_FILE can not be altered via the web interface, but only by the main program. So it should be ok. + # But this makes the code potential self altering, which is bad! Realy realy bad! + # But than again, is it really not the same as calling an external program from the script, as this program can also be alterred. + # Anyway, enough of my rambling, let's continue with the script. + + # To be safe, lets do some minimal safety checks before executing the external file: + + # BEACON_FILE should only have one line: + NR_OF_LINES=$(awk 'END { print NR }' $BEACON_FILE) + # And this line should contain the beacon command: + RESULT=$(grep "/usr/sbin/beacon" $BEACON_FILE) + + if [ -n "$RESULT" ] && [ $NR_OF_LINES -eq 1 ]; then + # Send the beacon + . $BEACON_FILE + fi + +fi diff --git a/aprs_utils/send_beacon_internal_radio.sh b/aprs_utils/send_beacon_internal_radio.sh new file mode 100755 index 0000000..b3e0c22 --- /dev/null +++ b/aprs_utils/send_beacon_internal_radio.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +################################################################################## +# Send beacon via APRS channel 1 (ax0) # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server. If not, see . # +# # +################################################################################## + +source /home/marcel/ham/aprs_utils/config.shlib; # load the config library functions + +ConfigFile="/home/marcel/ham/aprs_utils/pe1rxf-aprs-server.cfg" +BEACON_FILE="$(config_get ax0_beacon_file $ConfigFile)" +TRANSMIT_LOCATION="$(config_get ax0_transmit_directory $ConfigFile)" + +if [ -f "$BEACON_FILE" ]; then + /bin/cp "$BEACON_FILE" "$TRANSMIT_LOCATION" +fi + + + diff --git a/aprs_utils/send_message.sh b/aprs_utils/send_message.sh new file mode 100755 index 0000000..b67850f --- /dev/null +++ b/aprs_utils/send_message.sh @@ -0,0 +1,131 @@ +#!/bin/bash + +################################################################################## +# Send an APRS message consrructed from the given parameters. # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# NOTE: the ax25 utility 'beacon' has a bug: the first few times it is called # +# the send string ends with some random characters. After these first few # +# times it all comes good and the utility works fine. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server If not, see . # +# # +################################################################################## + +source /home/marcel/ham/aprs_utils/config.shlib; # load the config library functions +ConfigFile=/home/marcel/ham/aprs_utils/pe1rxf-aprs-server.cfg + +# Directory where APRS messages are stored +APRS_RECEIVED_MESSAGES_DIR=/home/marcel/ham/aprs_utils/aprs_log/ +MESSAGE_FILE=aprs_send_messages.log + +############################################################ +# Help # +############################################################ +Help() +{ + # Display Help + echo "Send APRS message." + echo + echo "Syntax: set_beacon.sh [-i |-c |-p |-m ]" + echo "Options:" + echo "-i AX.25 interface (ax0 or ax1)" + echo "-c Destination call" + echo "-p Path: 0=none, WIDE2-1, WIDE2-2, WIDE3-3 or call of digipeater" + echo "-m Message to send." + echo +} + +############################################################ +############################################################ +# Main program # +############################################################ +############################################################ + +# Set variables +Interface="0" +Call="0" +Path="0" +Message="" + +############################################################ +# Process the input options. # +############################################################ +# Get the options +while getopts i:c:p:m: flag; do + case "${flag}" in + i) # Interface + Interface=${OPTARG};; + c) # Destination Call + Call=${OPTARG};; + p) # Path + Path=${OPTARG};; + m) # Message + Message=${OPTARG};; + \?) # Invalid option + echo "Syntax error!" + Help + exit;; + esac +done + +CURRENT_DATE_TIME=$(date +"%Y-%m-%d %H:%M:%S") + +if [ "$Interface" == "ax0" ]; then + + # Log message + echo "$CURRENT_DATE_TIME,ax0,$Call,APRX29,$Message" >> $APRS_RECEIVED_MESSAGES_DIR$MESSAGE_FILE + + # if call is less than 9 characters, add spaces at the end (according to the APRS protocol) + printf -v Call %-9.9s "$Call" + if [ "$Path" == "0" ]; then + APRS_FRAME="PE1RXF-1>APRX29::$Call:$Message" + else + APRS_FRAME="PE1RXF-1>APRX29,$Path::$Call:$Message" + fi + AX0_APRS_TRANSMIT_DIR="$(config_get ax0_transmit_directory $ConfigFile)" + echo "$APRS_FRAME" > "$AX0_APRS_TRANSMIT_DIR"message.msg + #echo "$APRS_FRAME $AX0_APRS_TRANSMIT_DIR" + +else + # Log message + echo "$CURRENT_DATE_TIME,ax1,$Call,APRX29,$Message" >> $APRS_RECEIVED_MESSAGES_DIR$MESSAGE_FILE + + # if call is less than 9 characters, add spaces at the end (according to the APRS protocol) + printf -v Call %-9.9s "$Call" + if [ "$Path" == "0" ]; then + APRS_FRAME="PE1RXF-2>APRX29::$Call:$Message" + args[0]=-d + args[1]="APRX29" + args[2]=-s + args[3]=ax1 + args[4]=":$Call:$Message" + else + APRS_FRAME="PE1RXF-2>APRX29,$Path::$Call:$Message" + args[0]=-d + args[1]="APRX29 $Path" + args[2]=-s + args[3]=ax1 + args[4]=":$Call:$Message" + fi + #echo "$APRS_FRAME" + + #"$APRS_CMD" > tmp.tmp + + /usr/sbin/beacon "${args[@]}" + +fi diff --git a/aprs_utils/set_beacon.sh b/aprs_utils/set_beacon.sh new file mode 100755 index 0000000..bc9440d --- /dev/null +++ b/aprs_utils/set_beacon.sh @@ -0,0 +1,236 @@ +#!/bin/bash + +################################################################################## +# Formats crontab string for periodic APRS beacon and # +# replaces the original crontab entry string with this # +# new string thus changing the crontab. # +# # +# (C)2021 M.T. Konstapel https://meezenest.nl/mees # +# # +# This file is part of PE1RXF-APRS-server. # +# # +# PE1RXF-APRS-server is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# PE1RXF-APRS-server is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with PE1RXF-APRS-server If not, see . # +# # +################################################################################## + +source /home/marcel/ham/aprs_utils/config.shlib; # load the config library functions + +############################################################ +# Help # +############################################################ +Help() +{ + # Display Help + echo "Set interval of APRS beacons in crontab." + echo + echo "Syntax: set_beacon.sh [-i |-t