Beacon time randomized and processing of aprsis messages.
This commit is contained in:
		| @@ -41,3 +41,11 @@ First official release with LoRa support. | ||||
|  | ||||
| ### Removed | ||||
| - LoRa SX1278 library is now a stand alone project and should be cloned separately from this project. | ||||
|  | ||||
| ## [1.1.1] - 2022-02-06 | ||||
|  | ||||
| ### Changed | ||||
| - Beacons time is now "set time" + random seconds between 0-60. This way the beacons are not send at exactly hole minutes. This also prevents rapid firing of beacons on different channels. | ||||
|  | ||||
| ### Added | ||||
| - Messages from APRS-IS are now also processed and displayed on the web interface. | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| PE1RXF-1>APRX29,WIDE2-1:!5302.78N/00707.91E-https://meezenest.nl/pe1rxf | ||||
| PE1RXF-1>APRX29,WIDE2-1:!5302.78NR00707.91E&APRS RX iGATE 144.800MHz https://meezenest.nl/pe1rxf | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| /usr/sbin/beacon -d "APRX29" -s ax1 '!5302.78N/00707.91E-https://meezenest.nl/pe1rxf' | ||||
| /usr/sbin/beacon -d "APRX29" -s ax1 '!5302.78NR00707.91E&APRS RX iGATE 432.500MHz https://meezenest.nl/pe1rxf' | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| /usr/sbin/beacon -d "APRX29" -s ax2 '!5302.78N/00707.91E-https://meezenest.nl/pe1rxf' | ||||
| /usr/sbin/beacon -d "APRX29" -s ax2 '!5302.78NL00707.91E&LoRa APRS RX iGATE 433.775MHz https://meezenest.nl/pe1rxf' | ||||
|   | ||||
| @@ -34,10 +34,10 @@ | ||||
| */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 | ||||
| */10 * * * * sleep $(echo | awk '{print rand()*60};') && /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 | ||||
| #* * * * * sleep $(echo | awk '{print rand()*60};') && /home/marcel/ham/aprs_utils/send_beacon_external_radio.sh | ||||
|  | ||||
| #Send beacon on AX2 (LoRa internal radio) | ||||
| #* * * * * /home/marcel/ham/aprs_utils/send_beacon_lora_radio.sh | ||||
| */10 * * * * sleep $(echo | awk '{print rand()*60};') && /home/marcel/ham/aprs_utils/send_beacon_lora_radio.sh | ||||
|   | ||||
| @@ -10,11 +10,11 @@ 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_time=10 | ||||
| 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_position=!5302.78NR00707.91E& | ||||
| ax0_beacon_comment=APRS RX iGATE 144.800MHz 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/ | ||||
|  | ||||
| @@ -47,8 +47,8 @@ ax1_frequency=432.500 MHz | ||||
| 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_position=!5302.78NR00707.91E& | ||||
| ax1_beacon_comment=APRS RX iGATE 432.500MHz https://meezenest.nl/pe1rxf | ||||
| ax1_beacon_file=/home/marcel/ham/aprs_utils/beacon_ax1.txt | ||||
|  | ||||
| # Predefined messages | ||||
| @@ -77,11 +77,11 @@ ax2_name=Digipeater LoRa | ||||
| ax2_frequency=433.775 MHz | ||||
|  | ||||
| # Beacon time LoRa radio (ax2) in minutes. 0-60, where 0 disables beaconing. | ||||
| ax2_beacon_time=0 | ||||
| ax2_beacon_time=10 | ||||
| ax2_beacon_destination=APRX29 | ||||
| ax2_beacon_path=none | ||||
| ax2_beacon_position=!5302.78N/00707.91E- | ||||
| ax2_beacon_comment=https://meezenest.nl/pe1rxf | ||||
| ax2_beacon_position=!5302.78NL00707.91E& | ||||
| ax2_beacon_comment=LoRa APRS RX iGATE 433.775MHz https://meezenest.nl/pe1rxf | ||||
| ax2_beacon_file=/home/marcel/ham/aprs_utils/beacon_ax2.txt | ||||
|  | ||||
| # Predefined messages | ||||
|   | ||||
| @@ -69,7 +69,21 @@ while read LINE | ||||
|             CALL="$(grep -oP "(?<=PE1RXF-2  R ).+?\>"<<<$LINE)" | ||||
|             PORT="ax1" | ||||
|        fi     | ||||
|         | ||||
|  | ||||
|        # If call is empty, frame not from channel 1 or 2, maybe from channel 3? | ||||
|        if [ -z $CALL ]; then | ||||
|             #CALL="$(grep -o -P "(?<=PE1RXF-2  R \*).+?\>"<<<$LINE)" | ||||
|             CALL="$(grep -oP "(?<=PE1RXF-3  R ).+?\>"<<<$LINE)" | ||||
|             PORT="ax2" | ||||
|        fi     | ||||
|  | ||||
|        # If call is empty, frame not from channel 1, 2 or 3, maybe from channel APRSIS? | ||||
|        if [ -z $CALL ]; then | ||||
|             #CALL="$(grep -o -P "(?<=PE1RXF-2  R \*).+?\>"<<<$LINE)" | ||||
|             CALL="$(grep -oP "(?<=APRSIS    R ).+?\>"<<<$LINE)" | ||||
|             PORT="aprsis" | ||||
|        fi     | ||||
|  | ||||
|        # Lets do something with the message from channel 1 or 2 | ||||
|        if [[ $CALL ]]; then | ||||
|         | ||||
| @@ -85,9 +99,15 @@ while read LINE | ||||
|         if [ $PORT == "ax0" ]; then | ||||
|             #FULL_PATH="$(grep -o -P '(?<=PE1RXF-1  R \*).+?:'<<<$LINE)" | ||||
|             FULL_PATH="$(grep -oP "(?<=PE1RXF-1  R ).+?:"<<<$LINE)" | ||||
|         else | ||||
|         elif [ $PORT == "ax1" ]; then | ||||
|             #FULL_PATH="$(grep -o -P '(?<=PE1RXF-2  R \*).+?:'<<<$LINE)" | ||||
|             FULL_PATH="$(grep -oP "(?<=PE1RXF-2  R ).+?:"<<<$LINE)" | ||||
|         elif  [ $PORT == "ax2" ]; then | ||||
|             #FULL_PATH="$(grep -o -P '(?<=PE1RXF-2  R \*).+?:'<<<$LINE)" | ||||
|             FULL_PATH="$(grep -oP "(?<=PE1RXF-3  R ).+?:"<<<$LINE)" | ||||
|         elif  [ $PORT == "aprsis" ]; then | ||||
|             #FULL_PATH="$(grep -o -P '(?<=PE1RXF-2  R \*).+?:'<<<$LINE)" | ||||
|             FULL_PATH="$(grep -oP "(?<=APRSIS    R ).+?:"<<<$LINE)" | ||||
|         fi | ||||
|          | ||||
|         FULL_PATH="$(grep -o -P '(?<=\>).*'<<<$FULL_PATH)" | ||||
| @@ -138,7 +158,7 @@ while read LINE | ||||
|                 echo "$APRS_FRAME" > "$APRS_SEND_MESSAGE_DIRECTORY$APRS_TRANSMIT_FILE" | ||||
|  | ||||
|             # Message on port ax1 | ||||
|             else | ||||
|             elif [ $PORT == "ax1" ]; then | ||||
|  | ||||
|                 # Local (own) stations do not need to be digipeated | ||||
|                 if [ $OWN_CALL ]; then | ||||
| @@ -165,6 +185,34 @@ while read LINE | ||||
|                 #/usr/sbin/beacon -d "$APRS_HEADER" -s ax1 "$APRS_FRAME" | ||||
|                 /usr/sbin/beacon "${args[@]}" | ||||
|  | ||||
|             # Message on port ax2 | ||||
|             elif [ $PORT == "ax2" ]; then | ||||
|  | ||||
|                 # 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]=ax2 | ||||
|                     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]=ax2 | ||||
|                     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 | ||||
|   | ||||
| @@ -144,6 +144,7 @@ ConstructBeaconFile() | ||||
| Interface="0" | ||||
| TimeInterval="-1" | ||||
| crontab_time_string="* * * * *" | ||||
| crontab_delay_string="sleep \\\$(echo | awk '{print rand()*60};') && " | ||||
| crontab_command_string_ax0="/home/marcel/ham/aprs_utils/send_beacon_internal_radio.sh" | ||||
| crontab_command_string_ax1="/home/marcel/ham/aprs_utils/send_beacon_external_radio.sh" | ||||
| crontab_command_string_ax2="/home/marcel/ham/aprs_utils/send_beacon_lora_radio.sh" | ||||
| @@ -210,17 +211,17 @@ if [ "$work_with_config_file" -eq "1" ]; then | ||||
|          | ||||
|         # Select ax.25 port | ||||
|         if [ "$Interface" == "ax0" ]; then | ||||
|             crontab_full_string="$crontab_time_string $crontab_command_string_ax0" | ||||
|             crontab_full_string="$crontab_time_string $crontab_delay_string$crontab_command_string_ax0" | ||||
|             sed_string="sed -i \"/send_beacon_internal_radio/c\\$crontab_full_string\" $crontab_intermediate_file" | ||||
|         elif [ "$Interface" == "ax1" ]; then | ||||
|             crontab_full_string="$crontab_time_string $crontab_command_string_ax1" | ||||
|             crontab_full_string="$crontab_time_string $crontab_delay_string$crontab_command_string_ax1" | ||||
|             sed_string="sed -i \"/send_beacon_external_radio/c\\$crontab_full_string\" $crontab_intermediate_file" | ||||
|         elif [ "$Interface" == "ax2" ]; then | ||||
|             crontab_full_string="$crontab_time_string $crontab_command_string_ax2" | ||||
|             crontab_full_string="$crontab_time_string $crontab_delay_string$crontab_command_string_ax2" | ||||
|             sed_string="sed -i \"/send_beacon_lora_radio/c\\$crontab_full_string\" $crontab_intermediate_file" | ||||
|         else | ||||
|             echo "No valid value. Using default." | ||||
|             crontab_full_string="$crontab_time_string $crontab_command_string_ax0" | ||||
|             crontab_full_string="$crontab_time_string $crontab_delay_string$crontab_command_string_ax0" | ||||
|             sed_string="sed -i \"/send_beacon_internal_radio/c\\$crontab_full_string\" $crontab_intermediate_file"            | ||||
|         fi | ||||
|          | ||||
|   | ||||
| @@ -385,7 +385,24 @@ | ||||
|          | ||||
|         ?>  | ||||
|     </h3> | ||||
|      | ||||
|  | ||||
|    <h2 align="left">APRS-IS (internet)</h2> | ||||
|      <h3 align="left"> | ||||
|         <?php | ||||
|         $csv = array_map('str_getcsv', file("/home/marcel/ham/aprs_utils/aprs_log/aprs_received_messages.log")); | ||||
|  | ||||
|         for ($i = 0; $i < count($csv); $i++) { | ||||
|             if ($csv[$i][1] == "aprsis") { | ||||
|                 echo $csv[$i][2]; | ||||
|                 echo ": "; | ||||
|                 echo $csv[$i][4]; | ||||
|                 echo "<br>"; | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         ?>  | ||||
|     </h3> | ||||
|  | ||||
|        <a href=""><h1 style="color:Black;" onclick="show_main_page()"><i class="fa fa-arrow-left" aria-hidden="true"></i>   Back</h1></a> | ||||
|   </div> | ||||
|    | ||||
|   | ||||
		Reference in New Issue
	
	Block a user