mirror of
https://github.com/TheCommsChannel/TC2-APRS-BBS.git
synced 2025-06-28 15:57:15 -04:00
Update README and removed the ACK waiting and retries for messages sent via the (S)END command for now as this was causing issues
This commit is contained in:
parent
f2ad3f47ea
commit
8b7cbc2384
2 changed files with 7 additions and 16 deletions
|
@ -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):
|
Ideally, this is meant to be used within the following frequency ranges (US users):
|
||||||
2M - 144.90-145.10 & 145.50-145.80
|
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
|
## Setup
|
||||||
|
|
||||||
|
|
20
aprs_comm.py
20
aprs_comm.py
|
@ -212,36 +212,26 @@ def start():
|
||||||
print(f"Error processing frame: {e}")
|
print(f"Error processing frame: {e}")
|
||||||
|
|
||||||
def send_direct_message(recipient, message):
|
def send_direct_message(recipient, message):
|
||||||
"""Send a direct APRS message to a recipient with ACK request and monitor for retries."""
|
"""Send a direct APRS message to a recipient without ACK request."""
|
||||||
global message_counter
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
message_number = message_counter
|
frame_info = f":{recipient:<9}:{message}".encode('utf-8')
|
||||||
message_counter += 1
|
|
||||||
|
|
||||||
ack_info = f":{recipient:<9}:{message}{{{message_number}".encode('utf-8')
|
|
||||||
|
|
||||||
frame = aprs.APRSFrame.ui(
|
frame = aprs.APRSFrame.ui(
|
||||||
destination=recipient.upper(),
|
destination=recipient.upper(),
|
||||||
source=config.MYCALL,
|
source=config.MYCALL,
|
||||||
path=config.APRS_PATH,
|
path=config.APRS_PATH,
|
||||||
info=ack_info
|
info=frame_info
|
||||||
)
|
)
|
||||||
ki = aprs.TCPKISS(host=config.KISS_HOST, port=config.KISS_PORT)
|
ki = aprs.TCPKISS(host=config.KISS_HOST, port=config.KISS_PORT)
|
||||||
ki.start()
|
ki.start()
|
||||||
ki.write(frame)
|
ki.write(frame)
|
||||||
print(f"Direct message sent to {recipient} with ACK request (msg #{message_number}): {message}")
|
print(f"Direct message sent to {recipient}: {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)
|
|
||||||
|
|
||||||
ki.stop()
|
ki.stop()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Failed to send direct message to {recipient}: {e}")
|
print(f"Failed to send direct message to {recipient}: {e}")
|
||||||
|
|
||||||
|
|
||||||
def wait_for_ack(ki, recipient, message_number, timeout=5):
|
def wait_for_ack(ki, recipient, message_number, timeout=5):
|
||||||
"""Wait for an acknowledgment from the recipient."""
|
"""Wait for an acknowledgment from the recipient."""
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue