snstac / aprscot Goto Github PK
View Code? Open in Web Editor NEWaprscot - APRS to Cursor On Target Gateway.
Home Page: https://github.com/ampledata/aprscot
License: Other
aprscot - APRS to Cursor On Target Gateway.
Home Page: https://github.com/ampledata/aprscot
License: Other
ubuntu@ubuntu:~$ aprscot -c xxx-10 -U tcp:1.2.3.4:8088 -f 'm/200'
2021-05-14 17:52:53,641 pytak INFO - Using APRS Host: rotate.aprs.net:14580
2021-05-14 17:52:53,642 pytak INFO - Running EventTransmitter
2021-05-14 17:52:53,643 pytak INFO - Running APRSWorker
2021-05-14 17:52:53,647 pytak INFO - Running EventReceiver
2021-05-14 17:52:55,266 pytak INFO - Using APRS Filter: 'm/200'
Task completed: <Task finished name='Task-3' coro=<APRSWorker.run() done, defined at /usr/local/lib/python3.8/dist-packages/aprscot-4.0.0-py3.8.egg/aprscot/classes.py:71> exception=ParseError('invalid format')>
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<APRSWorker.run() done, defined at /usr/local/lib/python3.8/dist-packages/aprscot-4.0.0-py3.8.egg/aprscot/classes.py:71> exception=ParseError('invalid format')>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/aprscot-4.0.0-py3.8.egg/aprscot/classes.py", line 91, in run
await self.handle_message(frame)
File "/usr/local/lib/python3.8/dist-packages/aprscot-4.0.0-py3.8.egg/aprscot/classes.py", line 56, in handle_message
aprs_frame = aprslib.parsing.parse(message)
File "/usr/local/lib/python3.8/dist-packages/aprslib-0.6.47-py3.8.egg/aprslib/parsing/_init_.py", line 114, in parse
_try_toparse_body(packet_type, body, parsed)
File "/usr/local/lib/python3.8/dist-packages/aprslib-0.6.47-py3.8.egg/aprslib/parsing/_init_.py", line 204, in _try_toparse_body
body, result = parse_position(packet_type, body)
File "/usr/local/lib/python3.8/dist-packages/aprslib-0.6.47-py3.8.egg/aprslib/parsing/position.py", line 59, in parse_position
raise ParseError("invalid format")
aprslib.exceptions.ParseError: invalid format
Any way we can get some more of the configuration options moved to the ini?
We are missing really basic configuration options like connection methods built into PyTak such as TLS, and the ability to change call signs/ APRIS hosts that tare all hard-coded into the library itself.
It's kind of a deal breaker for the library right now for me.
When start the aprscot with config containing COT URL = TCP *******, cannot start again with COT URL = UDP
i have 2 different configs one for TCP and second for UDP and start server with one of them depend on the need.
pytak is not installed on my system - cannot be installed it returns some errors which i cannot fix
when i run aprscor -c conf.ini return: and exit
the error:
2023-01-04 11:16:46,531 pytak INFO - COT Dest: udp://239.2.3.1:6969
2023-01-04 11:16:46,531 aprscot - Run: <class 'pytak.classes.CLITool'>
2023-01-04 11:16:46,533 aprscot - Run: <class 'pytak.classes.TXWorker'>
2023-01-04 11:16:46,534 aprscot - Running <class 'aprscot.classes.APRSWorker'>
2023-01-04 11:16:46,534 aprscot - Using APRS-IS server: noam..aprs2.net:14580
2023-01-04 11:16:46,536 aprscot - Run: <class 'pytak.classes.RXWorker'>
2023-01-04 11:16:46,541 aprscot - Complete: <Task finished name='Task-3' coro=<APRSWorker.run() done, defined at /home/ubuntu/.local/lib/python3.8/site-packages/aprscot/classes.py:73> exception=UnicodeError("encoding with 'idna' codec failed (UnicodeError: label empty or too long)")>
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-3' coro=<APRSWorker.run() done, defined at /home/ubuntu/.local/lib/python3.8/site-packages/aprscot/classes.py:73> exception=UnicodeError("encoding with 'idna' codec failed (UnicodeError: label empty or too long)")>
Traceback (most recent call last):
File "/usr/lib/python3.8/encodings/idna.py", line 163, in encode
raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/aprscot/classes.py", line 83, in run
reader, writer = await asyncio.open_connection(aprs_host, int(aprs_port))
File "/usr/lib/python3.8/asyncio/streams.py", line 52, in open_connection
transport, _ = await loop.create_connection(
File "/usr/lib/python3.8/asyncio/base_events.py", line 986, in create_connection
infos = await self._ensure_resolved(
File "/usr/lib/python3.8/asyncio/base_events.py", line 1365, in _ensure_resolved
return await loop.getaddrinfo(host, port, family=family, type=type,
File "/usr/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo
return await self.run_in_executor(
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
with DEBUG =1 aprscot it seams to work properly even pull the packets to the network
Traceback (most recent call last):
File "/usr/local/bin/aprscot", line 11, in <module>
load_entry_point('aprscot', 'console_scripts', 'aprscot')()
File "/home/admin/src/aprscot/aprscot/commands.py", line 102, in cli
loop.run_until_complete(main(opts))
File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/home/admin/src/aprscot/aprscot/commands.py", line 33, in main
loop = asyncio.get_running_loop()
AttributeError: module 'asyncio' has no attribute 'get_running_loop'
It is possible to use an Xastir instance as a server instead of connecting to aprs.net over the internet.
It may be possible to pass variables in the config.ini file to specify the host and port in the modified lines below:
To do this:
Run Xastir, with the "Enable Server Ports" function enabled under the Interface menu.
Setup your interfaces in Xastir to use local RF - there are many ways to do this, Direwolf and an audio feed from a transceiver or SDR for example.
modify constants.py, changing the following lines:
#DEFAULT_APRSIS_PORT: int = 14580
#DEFAULT_APRSIS_HOST: str = "rotate.aprs.net"
DEFAULT_APRSIS_PORT: int = 2023
DEFAULT_APRSIS_HOST: str = "localhost"
The above assumes that aprscot is running on the same machine as Xastir.
aprscot will now connect to the local Xastir instance instead of aprs.net servers.
Using fresh Ubuntu 20.04 image along with the Debian/Ubuntu packages or the PIP install or even building from source with fresh images each time getting the following when trying to run the software:
aprscot -c ./aprs.ini
Traceback (most recent call last):
File "/usr/bin/aprscot", line 11, in
load_entry_point('aprscot==5.0.5', 'console_scripts', 'aprscot')()
File "/usr/lib/python3/dist-packages/aprscot/commands.py", line 74, in cli
asyncio.run(main(config), debug=config["aprscot"].getboolean("DEBUG"))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3/dist-packages/aprscot/commands.py", line 39, in main
reader, writer = await pytak.protocol_factory(cot_url)
File "/usr/lib/python3/dist-packages/pytak/client_functions.py", line 53, in protocol_factory
reader, writer = await asyncio.open_connection(host, port)
File "/usr/lib/python3.8/asyncio/streams.py", line 52, in open_connection
transport, _ = await loop.create_connection(
File "/usr/lib/python3.8/asyncio/base_events.py", line 986, in create_connection
infos = await self._ensure_resolved(
File "/usr/lib/python3.8/asyncio/base_events.py", line 1365, in _ensure_resolved
return await loop.getaddrinfo(host, port, family=family, type=type,
File "/usr/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo
return await self.run_in_executor(
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.