diff --git a/kiss_and_db.py b/kiss_and_db.py index ae43f14..e3141a4 100644 --- a/kiss_and_db.py +++ b/kiss_and_db.py @@ -28,6 +28,14 @@ def refresh_kiss_connection(kiss_conn): time.sleep(5) logging.debug("Starting new connection") kiss_conn.start() + # alive_frame = aprs.APRSFrame.ui( + # destination="TEST", + # source=config['Settings']['mycall'], + # path=None, + # info=b">None", + # ) + # logging.debug("Sending empty frame to keep connection alive") + # kiss_conn.write(alive_frame) def main(): @@ -43,19 +51,21 @@ def main(): ki = aprs.TCPKISS(host=config['Settings']['kiss_host'], port=int(config['Settings']['kiss_port'])) ki.start() + print(str(ki)) + ki.stop() + print(str(ki)) scheduler = AsyncIOScheduler() - scheduler.add_job(refresh_kiss_connection, 'interval', hours = 1, args = [ki]) + scheduler.add_job(refresh_kiss_connection, 'interval', minutes = 1, args = [ki]) scheduler.start() # Make a simple frame and send it - frame = aprs.APRSFrame.ui( - destination="APZ001", - source=config['Settings']['mycall'], - path=["WIDE1-1"], - info=b">Hello World!", - ) - #ki.write(frame) + # frame = aprs.APRSFrame.ui( + # destination="APZ001", + # source=config['Settings']['mycall'], + # path=['WIDE1-1'], + # info=b">Hello World!", + # ) # Watch for new packets to come in while True: