wb2osz / direwolf

Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder. It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate). For more information, look at the bottom 1/4 of this page and in https://github.com/wb2osz/direwolf/blob/dev/doc/README.md
GNU General Public License v2.0
1.56k stars 305 forks source link

Extensibility and how to access read and written frames? #470

Open iontodirel opened 1 year ago

iontodirel commented 1 year ago

Hi

I'd like to get programmatic access to the data that is being sent to Direwolf by 3rd party clients like Xastir via the serial, KISS or AGWPE interfaces, and get access to the data the data that Direwolf itself writes to the serial, KISS and AGWPE interfaces.

I need this for my own real-time logging into a database. I don't want to touch any log files.

For the latter, I can simply attach to the KISS interface and monitor the traffic with no issues, and that works well.

For the former, I can't see how I do it without changing Direwolf itself, is that accurate?

wb2osz commented 1 year ago

the direwolf logging facility only records packets received over the radio.

There are a lot of command line debugging options to see what is going on inside for troubleshooting. They all begin with "-d" and then other letters to specify the type of information. Listing the same letter again often produces more detail. those you would be most interested in are: a a = AGWPE network protocol client. k k = KISS serial port or pseudo terminal client. n n = KISS network client.

The formatting is meant to be human readable and not easy to capture into another application. You would probably need to look in the source code, for where those debug messages are produced, and capture the data there. I welcome any suggestions for a generalized interface to make all of this available to other applications.

73, John WB2OSZ

iontodirel commented 1 year ago

Probably another TCP interface makes the most sense here, where you connect and simply get all raw packet data and a flag whether it is incoming or outgoing

ShawnStoddard commented 1 year ago

Would putting a proxy in front of Direwolf address the need?