From 8b7cbc238413b5b32946f0de53f30ed03b22003d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TC=C2=B2?= <130875305+TheCommsChannel@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:39:01 -0500 Subject: [PATCH] Update README and removed the ACK waiting and retries for messages sent via the (S)END command for now as this was causing issues --- README.md | 3 ++- aprs_comm.py | 20 +++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 5e2f3ee..58e8517 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ This is an APRS BBS only because it uses the APRS protocol and it's not meant to Ideally, this is meant to be used within the following frequency ranges (US users): 2M - 144.90-145.10 & 145.50-145.80 -The BBS currently allows for the posting and viewing of Bulletins and Messages for end-users by callsign. More features coming soon! +The BBS currently allows for the posting and viewing of Bulletins and Messages for end-users by callsign. More features +coming soon. This software is experimental and could have bugs. Bug reports and suggestions are welcomed. ## Setup diff --git a/aprs_comm.py b/aprs_comm.py index 6770389..6e50a11 100644 --- a/aprs_comm.py +++ b/aprs_comm.py @@ -212,36 +212,26 @@ def start(): print(f"Error processing frame: {e}") def send_direct_message(recipient, message): - """Send a direct APRS message to a recipient with ACK request and monitor for retries.""" - global message_counter - + """Send a direct APRS message to a recipient without ACK request.""" try: - message_number = message_counter - message_counter += 1 - - ack_info = f":{recipient:<9}:{message}{{{message_number}".encode('utf-8') + frame_info = f":{recipient:<9}:{message}".encode('utf-8') frame = aprs.APRSFrame.ui( destination=recipient.upper(), source=config.MYCALL, path=config.APRS_PATH, - info=ack_info + info=frame_info ) ki = aprs.TCPKISS(host=config.KISS_HOST, port=config.KISS_PORT) ki.start() ki.write(frame) - print(f"Direct message sent to {recipient} with ACK request (msg #{message_number}): {message}") - - if not wait_for_ack(ki, recipient, message_number, timeout=5): - print(f"No ACK received from {recipient} for message #{message_number}. Monitoring for activity...") - with unack_lock: - unacknowledged_messages[recipient.upper()] = (message, message_number) - + print(f"Direct message sent to {recipient}: {message}") ki.stop() except Exception as e: print(f"Failed to send direct message to {recipient}: {e}") + def wait_for_ack(ki, recipient, message_number, timeout=5): """Wait for an acknowledgment from the recipient.""" try: