Add background KISS connection, log frames to database #20
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "add-kiss"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #5.
https://stackoverflow.com/a/7224186
I think I should be using https://github.com/python-aprs/aprs3.
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.
Switching to aprslib, which parses more easily?
https://aprs-python.readthedocs.io/en/stable/examples.html
Next up,
tcp_kiss_send_recv.py
tokiss_and_db.py
.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 so, see here: https://aprs-python.readthedocs.io/en/stable/parse_formats.html
Subprocess was running all night and doesn't seem to have broken anything.
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 represented each time?
Seems like we need to keep around a list of columns, drop it into the statement, but also add null dict items to the dict that comes out of
aprslib.parse()
.https://stackoverflow.com/a/16698310
https://stackoverflow.com/a/69460935
This is looking pretty good...
Copied new code over to
kiss_and_db.py
and it seems to run.Hmmm...
I think it was the DB Browser--I made a manual edit to the structure and didn't save it.
On production ^, Python 3.7.3.
But it works on dev machine, Python 3.9.2.
Currently will not run correctly at https://digi.w1cdn.net.
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.Subprocess call to
kiss_and_db.py
does not seem to be the cause.I thought I had the db entry set up right, but running overnight didn't yield new entries...
screen -r
back in tells me why:Drop this stuff into
config.ini
:I'll be debugging packets forever, I think!