Matt W1CDN
  • Joined on 2023-04-08
W1CDN closed issue W1CDN/aprs_tool#5 2023-04-16 16:45:55 -05:00
Connect API with KISS or AGWPE
W1CDN pushed to main at W1CDN/aprs_tool 2023-04-16 16:45:54 -05:00
467ec11522 Merge pull request 'Add background KISS connection, log frames to database' (#20) from add-kiss into main
2ca627f973 Add kiss stuff to config.
ef5765e87f Add missing fields and try to catch sqlite errors.
7453d50598 Update waitress IP to make it work on production.
14effc9746 Try to get working on production.
Compare 11 commits »
W1CDN opened issue W1CDN/aprs_tool#22 2023-04-16 11:49:15 -05:00
Deal with third-party packets
W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-16 11:32:41 -05:00
Add background KISS connection, log frames to database

I'll be debugging packets forever, I think!

{'raw': 'FGFFLS>APRS,TCPIP,W1CDN-1*:;FGFFLS2AA*170815z4753.10N\\09657.90Ww FLOOD }k0I8Pdd`P:88P{G2AAA', 'from': 'FGFFLS', 'to': 'APRS', 'path':…
W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-16 10:39:06 -05:00
Add background KISS connection, log frames to database

Drop this stuff into config.ini:

MYCALL = os.environ.get("MYCALL", "W1CDN")
KISS_HOST = os.environ.get("KISS_HOST", "192.168.0.30")
KISS_PORT = os.environ.get("KISS_PORT", "8001")
W1CDN opened issue W1CDN/aprs_tool#21 2023-04-16 10:15:01 -05:00
Basic transmit API endpoint
W1CDN commented on issue W1CDN/aprs_tool#5 2023-04-16 10:11:22 -05:00
Connect API with KISS or AGWPE

Progress on #20 means that one KISS connection is always active for receive. Need to think about how to best use the connection so we don't go over the maximum of three KISS clients (default…

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-16 09:55:03 -05:00
Add background KISS connection, log frames to database

I thought I had the db entry set up right, but running overnight didn't yield new entries...

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-15 14:22:34 -05:00
Add background KISS connection, log frames to database

The above issues fixed with with code changes, but things aren't working using waitress on the production machine. Flask dev server works fine.

Getting 502 Bad Gateway with waitress.

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-15 13:40:53 -05:00
Add background KISS connection, log frames to database
  • fix this issue
$ python kiss_and_db.py 
  File "kiss_and_db.py", line 93
    attrib_names = ', '.join(f'"{w}"' for w in a.keys())
    ```
    
On production ^, Python 3.7.3.

But…
W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-15 13:24:14 -05:00
Add background KISS connection, log frames to database

I think it was the DB Browser--I made a manual edit to the structure and didn't save it.

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-15 13:22:08 -05:00
Add background KISS connection, log frames to database

Hmmm... image

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-15 11:23:55 -05:00
Add background KISS connection, log frames to database

Copied new code over to kiss_and_db.py and it seems to run.

  • pull packets from db instead of files
W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-14 22:07:10 -05:00
Add background KISS connection, log frames to database

This is looking pretty good...

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-14 19:55:01 -05:00
Add background KISS connection, log frames to database

Added a more complete list of fields that may come out of aprslib.parse() to the database schema.

How to insert the results of that function into the database without having all the columns…

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-14 12:24:00 -05:00
Add background KISS connection, log frames to database

Subprocess was running all night and doesn't seem to have broken anything.

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-13 21:37:08 -05:00
Add background KISS connection, log frames to database

Now need to know all the possible fields that might come up, so they can be added to the db (or maybe write a function to add new fields on the fly?).

Are fields listed in the spec? I think…

W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-13 21:12:20 -05:00
Add background KISS connection, log frames to database

Just barely working now (packet into database), but I don't understand the structure of the APRSFrame object, so it's going in as a string right now.

> repl(frame)
APRSFrame(destination=Ad…
W1CDN commented on pull request W1CDN/aprs_tool#20 2023-04-13 20:46:10 -05:00
Add background KISS connection, log frames to database

I think I should be using https://github.com/python-aprs/aprs3.

For versions of the KISS transports which do NOT automatically encode/decode APRS data, see kiss3.