mqtt-aprs.py
def send_packet(packet):
    """
    Create a socket, log on to the APRS server, and send the packet
    """
    logging.debug(APRS_SERVER + ":" + str(APRS_PORT))
    connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    connection.connect((APRS_SERVER, APRS_PORT))

    # Log on to APRS server
    connection.send('user ' + APRS_CALLSIGN + ' pass ' + APRS_PASS + ' vers "mqtt-zabbix" \n')

    # Send APRS packet
    logging.debug("Sending %s", packet)
    connection.send(packet)
    logging.debug("Sent packet at: " + time.ctime())

    # Close socket -- must be closed to avoidbuffer overflow
    time.sleep(15)  # 15 sec. delay
    connection.shutdown(0)
    connection.close()

    Create a socket, log on to the APRS server, and send the packet
    
Create a socket, log on to the APRS server, and send the packet
Create a socket log on to the APRS server and send the packet
def send_packet(packet):
    logging.debug(APRS_SERVER + ":" + str(APRS_PORT))
    connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    connection.connect((APRS_SERVER, APRS_PORT))
    connection.send('user ' + APRS_CALLSIGN + ' pass ' + APRS_PASS + ' vers "mqtt-zabbix" \n')
    logging.debug("Sending %s", packet)
    connection.send(packet)
    logging.debug("Sent packet at: " + time.ctime())
    time.sleep(15)  
    connection.shutdown(0)
    connection.close()
def send_packet ( packet ) : logging . debug ( APRS_SERVER + ":" + str ( APRS_PORT ) ) connection = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) connection . connect ( ( APRS_SERVER , APRS_PORT ) ) connection . send ( 'user ' + APRS_CALLSIGN + ' pass ' + APRS_PASS + ' vers "mqtt-zabbix" \n' ) logging . debug ( "Sending %s" , packet ) connection . send ( packet ) logging . debug ( "Sent packet at: " + time . ctime ( ) ) time . sleep ( 15 ) connection . shutdown ( 0 ) connection . close ( )
Create a socket, log on to the APRS server, and send the packet
Create a socket log on to the APRS server and send the packet
"""
    Create a socket, log on to the APRS server, and send the packet
    """ # Log on to APRS server # Send APRS packet # Close socket -- must be closed to avoidbuffer overflow # 15 sec. delay
packet