1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-21 15:51:52 -05:00

Try sending raw APRSFrames to aioax25

This seems to work sending out, but still getting
third-party dropped packets as response from the local repeater.
This commit is contained in:
Hemna 2022-08-03 09:29:27 -04:00
parent 8c08c2c216
commit 1d62dd777f

View File

@ -4,6 +4,7 @@ import logging
from aioax25 import interface
from aioax25 import kiss as kiss
from aioax25.aprs import APRSInterface
from aioax25.aprs.frame import APRSFrame
LOG = logging.getLogger("APRSD")
@ -105,11 +106,33 @@ class Aioax25Client:
def send(self, msg):
"""Send an APRS Message object."""
LOG.debug(f"Send {msg} TO KISS")
payload = f"{msg._filter_for_send()}"
self.aprsint.send_message(
addressee=msg.tocall,
message=payload,
path=["WIDE1-1", "WIDE2-1"],
oneshot=True,
# payload = (':%-9s:%s' % (
# msg.tocall,
# payload
# )).encode('US-ASCII'),
# payload = str(msg).encode('US-ASCII')
msg_payload = f"{msg.message}{{{str(msg.id)}"
payload = (
":{:<9}:{}".format(
msg.tocall,
msg_payload,
)
).encode("US-ASCII")
LOG.debug(f"Send '{payload}' TO KISS")
self.aprsint.transmit(
APRSFrame(
destination=msg.tocall,
source=msg.fromcall,
payload=payload,
repeaters=["WIDE1-1", "WIDE2-1"],
),
)
# self.aprsint.send_message(
# addressee=msg.tocall,
# message=payload,
# path=["WIDE1-1", "WIDE2-1"],
# oneshot=True,
# )