sjlongland/aioax25

README is out of date?

Closed this issue · 2 comments

hemna commented

I'm struggling with trying to get aioax25 to send me frames from a kiss interface. The README mentions that you can set
listen_destinations in the APRSInterface to specify which callsign/ssid to look for. Yet, when passing in listen_destinations dict to APRSInterface I get a failure.

  File "/Users/i530566/devel/mine/aprsd/aprsd/kissclient.py", line 108, in setup
    self.aprsint = APRSInterface(
TypeError: __init__() got an unexpected keyword argument 'listen_destinations'

I grepped the repo

└─> fgrep -rni listen_destination *
README.md:173: * `listen_destinations` is a list of AX.25 destinations.  Behind the scenes,
README.md:177:   the same scheme as `listen_destinations`.

I am also calling bind() on the APRSInterface and passing in my callsign and setting regex to false (assuming this means look for an exact match?), but my callback is not getting called when I send an APRS packet.

My callsign is WB4BOR-12 for this instance of aioax25 connected to direwolf. I am using a kenwood TH-D74 to send an aprs message to WB4BOR-12. You can see from the log below that aioax25 gets it, says the frame is for us, but yet then never sends it on to my registered callback from the aprsinterface.bind() call.

[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] Processing incoming message WB4BOR*>APK004,WIDE1-1,WIDE2-1: PID=0xf0 Payload=b':WB4BOR-12:ping{93' (type APRSMessageFrame) - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/aprs/aprs.py:247]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] Addressee? WB4BOR-12 - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/aprs/aprs.py:249]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] Frame is for us! - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/aprs/aprs.py:261]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] This is a real message for us! - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/aprs/aprs.py:276]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] Handling incoming frame WB4BOR*>APK004,WIDE1-1,WIDE2-1: PID=0xf0 Payload=b':WB4BOR-12:ping{93' - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/router.py:98]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] Dest: WB4BOR-12 callsign: WB4BOR - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/router.py:108]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] RXers = dict_values([]) - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/router.py:123]
[08/31/2021 01:44:13 PM] [KISSRX_MSG  ] [DEBUG] Dispatching frame to 0 receivers - [/Users/i530566/devel/mine/aprsd/.venv/lib/python3.8/site-packages/aioax25/router.py:139]

I think for APRS, the idea was that when sending a message to a specific station, I'd use the SSID of that station instead of broadcasting it, but observing the behaviour of lots of APRS clients, suggests that's not how it's done.

Documentation definitely needs a clean-up. :-)

Okay, so I've re-instated the listen_destinations feature, but a caveat, it'll break reception of MIC-E traffic if used unless you can find a suitable regular expression pattern to match it, as the destination call-sign is used in MIC-E to encode the position latitude.