| Line 53: |
Line 53: |
| | Visita [[Main_Page#Downloads|wiki.pttlink.org]] y baja a la sección de descargas "'''Downloads'''" y selecciona la imágen apropiada para tu equipo. | | Visita [[Main_Page#Downloads|wiki.pttlink.org]] y baja a la sección de descargas "'''Downloads'''" y selecciona la imágen apropiada para tu equipo. |
| | | | |
| − | [[File:Ptt download.png|frameless|border|533x533px]] | + | [[File:Ptt download.png|none|thumb]] |
| | | | |
| | Transfiere la imágen que descargaste a una memoria. Ya sea esta una memoria USB, un CD o DVD, o una tarjeta microSD (Raspberry Pi) dependiendo de tu equipo. | | Transfiere la imágen que descargaste a una memoria. Ya sea esta una memoria USB, un CD o DVD, o una tarjeta microSD (Raspberry Pi) dependiendo de tu equipo. |
| Line 372: |
Line 372: |
| | Para salir del menu selecciona la opción '''<0>''' (zero) y da '''<Enter>'''. | | Para salir del menu selecciona la opción '''<0>''' (zero) y da '''<Enter>'''. |
| | | | |
| − | == Ajustes de polaridad PTT y COS == | + | == Asegúrate que nodelist se está descargando == |
| | | | |
| − | Si tu radio/repetidor, requiere que se invierta la polaridad de los pines PTT, COS/CTCSS entra al menú principal de ASL, selecciona la opción '''<6>'''.
| + | Antes de que tu nodo se conete, es necesario que se tenga una lista de nodos disponibe. Los siguientes archivos lo harán de forma automática. |
| − | [[File:103_asl_menu_6.png|none|thumb|640x640px]]
| |
| | | | |
| − | Selecciona la opción '''<nowiki><I></nowiki>'''.
| + | === Agrega los archivos faltantes NodeUpdate.sh y NodeNameUpdate.sh === |
| − | [[File:104_config_menu_i.png|none|thumb|640x640px]]
| |
| | | | |
| − | Aparecerá un archivo de texto en el cual podrás hacer los cambios de la polaridad de la siguiente forma:
| + | Crea el siguiente archivo /usr/local/bin/NodeUpdate.sh usando el siguiente comando: |
| | | | |
| − | Para invertir PTT:
| + | <pre> |
| | + | sudo nano /usr/local/bin/NodeUpdate.sh |
| | + | </pre> |
| | | | |
| − | Busca una línea con la palabra '''invertptt =''' y cambia el valor.
| + | Copia el siguiente código en el archivo: |
| | | | |
| − | '''0''' = Transmite al poner el pin a tierra.
| + | <pre> |
| | + | #!/bin/bash |
| | + | # |
| | + | # A cron job script for downloading the extnodes file with error reporting |
| | + | # |
| | + | # |
| | + | # This is intended to be run from cron every 5 min |
| | + | # Copyright 2018 Bryan Fields |
| | + | # Licensed under the GNU GPLv2 |
| | | | |
| − | '''1''' = Transmite al poner como circuito abierto.
| + | URL="http://register.pttlink.org/cgi-bin/gennodes.php" |
| − | [[File:Ptt_invertptt.png|none|thumb|640x640px]]
| + | FILEPATH=/var/lib/asterisk |
| | | | |
| − | Para invertir COS/CTCSS:
| + | #sleep for a random time of 0-300 seconds |
| | + | #sleep $[( $RANDOM % 299 ) + 1 ]s |
| | | | |
| − | Busca una línea con la palabra '''carrierfrom =''' y cambia el valor.
| |
| | | | |
| − | Haz lo mismo con la línea con la palabra '''ctcssfrom =''' y cambia el valor.
| + | # use curl in silent and compressed mode, connect timeout of 5 and |
| | + | # -f for fail with an error code of 22 on server errors |
| | + | #-m 20 is a max time for the whole process of 20 seconds |
| | + | curl -s --compressed --connect-timeout 5 -f -m 20 -o /tmp/rpt_extnodes-temp $URL |
| | + | #curl --connect-timeout 5 -f -m 20 -o /tmp/rpt_extnodes-temp $URL |
| | + | exitcode=$? |
| | + | if [ "$exitcode" = "0" ]; then |
| | + | grep -q extnodes /tmp/rpt_extnodes-temp |
| | + | if [ $? -eq "0" ] ;then |
| | + | chmod 700 /tmp/rpt_extnodes-temp |
| | + | cp /tmp/rpt_extnodes-temp $FILEPATH/rpt_extnodes-temp |
| | + | mv -f $FILEPATH/rpt_extnodes-temp $FILEPATH/rpt_extnodes |
| | + | whenandwhere=`grep "Generated at" /tmp/rpt_extnodes-temp |cut -c2-100` |
| | + | #don't print out on good run |
| | + | #echo "NodeUpdate installed a new nodes list $whenandwhere" |
| | + | logger -i "NodeUpdate installed a new nodes list $whenandwhere" |
| | + | else |
| | + | #echo "NodeUpdate failed to parse node list; node list not updated" |
| | + | logger -i "NodeUpdate failed to parse node list; node list not updated" |
| | + | exit 1 |
| | + | fi |
| | | | |
| − | '''no''' = No detecta carrier.
| + | else |
| | + | #echo "NodeUpdate could not get nodes list from server" |
| | + | logger -i "NodeUpdate could not get nodes list from server" |
| | + | exit 1 |
| | + | fi |
| | + | exit 0 |
| | + | </pre> |
| | | | |
| − | '''usb''' = Activo en alto.
| + | Crea el siguiente archivo /usr/local/bin/NodeNameUpdate.sh usando el siguiente comando: |
| | | | |
| − | '''usbinvert''' = activo en bajo.
| + | <pre> |
| − | [[File:Ptt_invertcarrier.png|none|thumb|640x640px]]
| + | sudo nano /usr/local/bin/NodeNameUpdate.sh |
| | + | </pre> |
| | | | |
| − | Al terminar de hacer los cambios presiona '''<CTRL> + <X>''' y luego presiona '''<Y>''' y luego '''<Enter>'''. Regresarás al menú y selecciona '''<Back>'''.
| + | Copia el siguiente código en el archivo: |
| | | | |
| − | Selecciona la opcion '''<9>'''.
| + | <pre> |
| − | [[File:107_asl_menu_9.png|none|thumb|640x640px]]
| + | #!/bin/bash |
| | + | # |
| | + | # A cron job script for downloading custom node announcements with error reporting |
| | + | # |
| | + | # This is intended to be run from cron every 8 hours and will randomly insert a delay from 0-8 hours |
| | + | # |
| | + | # Copyright 2018 Bryan Fields |
| | + | # Licensed under the GNU GPLv2 |
| | | | |
| − | Selecciona la opción '''<G>''' para que se reinicie el programa de PTTLink y se apliquen los cambios. Posteriormente selecciona '''<Back>''', si es necesario repite las pruebas de audio.
| + | URL="rsync://rsync.pttlink.org/connect-messages" |
| − | [[File:108_diag_menu_g.png|none|thumb|640x640px]]
| + | FILEPATH="/var/lib/asterisk/sounds/rpt/nodenames" |
| | | | |
| − | Con esto tu nodo deberá estar operando. | + | #sleep for a random time of 0-28800 seconds (8 hours) |
| | + | sleep $[ ( $RANDOM % 28799 ) + 1 ]s |
| | + | |
| | + | #assign the filesUpdated var with the number of files changed by rsync. This is nasty, but it works. |
| | + | |
| | + | filesUpdated=`rsync -a --stats $URL $FILEPATH |grep "Number of regular files transferred" | cut -c 38-50` |
| | + | exitcode=$? |
| | + | if [ "$exitcode" = "0" ]; then |
| | + | if [ "$filesUpdated" = "0" ]; then |
| | + | echo "NodeNameUpdate run with no updates" |
| | + | logger -i "NodeNameUpdate run with no updates" |
| | + | elif [ "$filesUpdated" > "0" ]; then |
| | + | echo "NodeNameUpdate updated $filesUpdated nodenames" |
| | + | logger -i "NodeNameUpdate updated $filesUpdated nodenames" |
| | + | fi |
| | + | else |
| | + | echo "NodeNameUpdate failed" |
| | + | logger -i "NodeUpdate failed" |
| | + | exit 1 |
| | + | fi |
| | + | exit 0 |
| | + | </pre> |
| | + | |
| | + | Agrega unas líneas a crontab editandolocon el siguiente comando con: |
| | + | |
| | + | <pre> |
| | + | sudo nano /etc/crontab |
| | + | </pre> |
| | + | |
| | + | Al final del archivo agrega estas dos líneas: |
| | + | |
| | + | <pre> |
| | + | 0 0,8,16 * * * root /usr/local/sbin/NodeNameUpdate.sh > /dev/null 2>&1 |
| | + | */5 * * * * root /usr/local/sbin/NodeUpdate.sh > /dev/null 2>&1 |
| | + | |
| | + | 01 03 * * * cd /var/www/html/allmon2; ./astdb.php |
| | + | </pre> |
| | + | |
| | + | == Configuración de actualizaciones de PTTLink == |
| | + | |
| | + | Ejecuta las siguientes líneas para actualizar la dirección de los servidores PTTLink. |
| | + | |
| | + | <pre> |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /usr/local/bin/rc.updatenodelist |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /usr/local/bin/NodeNameUpdate.sh |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /usr/local/bin/NodeUpdate.sh |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /etc/asterisk/rpt.conf |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /etc/asterisk/iax.conf |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /etc/asterisk/extensions.conf |
| | + | |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /var/www/html/allmon2/astdb.php |
| | + | sudo sed -i 's/Allstar /PTTLink / g' /var/www/html/allmon2/header.inc |
| | + | sudo sed -i 's/allstarlink.org/pttlink.org/g' /var/www/html/allmon2/link.php |
| | + | |
| | + | sudo service asterisk restart |
| | + | </pre> |
| | + | |
| | + | Edita el siguiente archivo con: |
| | + | |
| | + | <pre> |
| | + | sudo nano /usr/local/sbin/astdb.php |
| | + | </pre> |
| | + | |
| | + | Reemplaza la linea: |
| | + | |
| | + | <pre> |
| | + | $url = "https://allstarlink.org/cgi-bin/allmondb.pl"; |
| | + | </pre> |
| | + | |
| | + | con: |
| | + | |
| | + | <pre> |
| | + | $url = "http://allmondb.pttlink.org"; |
| | + | </pre> |
| | + | |
| | + | Reinicia tu nodo. |
| | + | |
| | + | <pre> |
| | + | sudo reboot |
| | + | </pre> |
| | + | |
| | + | |
| | + | '''Con esto tu nodo deberá estar operando.''' |
| | | | |
| | == Instalación de Allmon2. == | | == Instalación de Allmon2. == |