Giter VIP home page Giter VIP logo

pypacket's People

Contributors

borsuk85 avatar cceremuga avatar n8henrie avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pypacket's Issues

Fields missing when APRS packet is a message

Hi! Encountered a potential bug.

Running v5.0.

A friend sent a message over APRS earlier on today. On the GUI the only fields that are populated are From and To.

| From      | To        | Lat      | Long     | Comment                     | Text                        |
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+
| MM6ONE-9  | APY100    |          |          |                             |                             |
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+

+ Packet ---+-----------+----------+----------+-----------------------------+-----------------------------+
| From      | To        | Lat      | Long     | Comment                     | Text                        |
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+
| MM6ONE-9  | APY100    |          |          |                             |                             |
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+

When checking the application logs, the message can be viewed from there.

[2020-06-01 12:52:25,520] [INFO] MM6ONE-9>APY100,WIDE1-1,WIDE2-1::MM6TWO-10:hi u up for qso 2morro 1215 on 433.525?{05
[2020-06-01 12:53:01,829] [INFO] MM6ONE-9>APY100,WIDE1-1,WIDE2-1::MM6TWO-10:hi u up for qso 2morro 1215 on 433.525?{05

I'm able to replicate the issue sending a message directed to the call sign also.

+ Packet ---+-----------+----------+----------+-----------------------------+-----------------------------+                           
| From      | To        | Lat      | Long     | Comment                     | Text                        |                           
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+                           
| MM6TWO-7  | APK003    |          |          |                             |                             |                           
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+                           

+ Packet ---+-----------+----------+----------+-----------------------------+-----------------------------+                           
| From      | To        | Lat      | Long     | Comment                     | Text                        |                           
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+                           
| MM6TWO-7  | APK003    |          |          |                             |                             |                           
+-----------+-----------+----------+----------+-----------------------------+-----------------------------+  
[2020-06-01 14:11:47,030] [INFO] MM6TWO-7>APK003,WIDE1-1,WIDE2-2::MM6ONE-9 :rgr_that!{0
[2020-06-01 14:12:47,513] [INFO] MM6TWO-7>APK003,WIDE1-1,WIDE2-2::MM6ONE-9 :rgr_that!{0

It looks like "From" is being picked up from the packet correctly, but the to-call version is set as "To" and the rest is missing from the readable output.

If you need anything else, let me know!

Edit: I realise that messages may not fit within the design/purpose of the application.

class ListenerBase(metaclass=abc.ABCMeta): - SyntaxError: invalid syntax

Traceback (most recent call last):
  File "main.py", line 29, in <module>
    pypacket_receiver.start()
  File "/root/pypacket/pypacket/base/receiver.py", line 40, in start
    listener = self.config.listener()
  File "/root/pypacket/pypacket/base/configuration.py", line 33, in listener
    module = importlib.import_module(self.data['listener']['module'])
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/root/pypacket/pypacket/base/rtl_listener.py", line 2, in <module>
    from pypacket.base.listener import ListenerBase
  File "/root/pypacket/pypacket/base/listener.py", line 3
    class ListenerBase(metaclass=abc.ABCMeta):

Do you know the problem?

aprs messages with unicode in them triggers crash

Describe the bug
aprs messages with unicode in them triggers crash

To Reproduce
Steps to reproduce the behavior:

  1. run ./main.py
  2. wait until some funnyman messages "๐Ÿคช" over packet

see this python trace dump:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/home/chip/pypacket/pypacket/base/receiver.py", line 136, in __decoder_worker
    self.__process_decoded_packet(cleaned_packet)
  File "/home/chip/pypacket/pypacket/base/receiver.py", line 102, in __process_decoded_packet
    processor.handle(decoded_packet)
  File "/home/chip/pypacket/pypacket/implementations/cli_processor.py", line 32, in handle
    self.log_handler.log_packet(packet, print_friendly_packet)
  File "/home/chip/pypacket/pypacket/util/logger.py", line 58, in log_packet
    self.__log_any(Colors.RESET, '', friendly_message)
  File "/home/chip/pypacket/pypacket/util/logger.py", line 69, in __log_any
    print(color + prefix + Colors.RESET + log_message)
UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f92a' in position 444: ordinal not in range(128)


Expected behavior
one more log line.

Screenshots
see pasted python trace

System info (please complete the following information):

  • OS: [pocketchip running debian-ish ~2016]
  • Python Version 3.9 built from source
  • PyPacket Version: HEAD from feb 2021

Filter support

Currently, PyPacket is sent packets from the APRS-IS connection as it is not filtered down to rx only, so APRS-IS thinks it is also able to tx packets. Add support for filtering this out.

SSID is not stripped from username

Describe the bug
A clear and concise description of what the bug is.

With the current implementation, if a user's SSID is included in the username, it is also included in the attempted login to AIS.

Unfortunately, I am unable to successfully transmit a packet, using aprslib directly, if I try to log in with an SSID attacked to my username.

To Reproduce
Steps to reproduce the behavior:

import aprslib
IS = aprslib.IS("KI5AYO-0", passwd=12345)
IS.connect()
IS.sendall("KI5AYO-0>APDW15[REDACTED]\r\n")

If I replace IS = aprslib.IS("KI5AYO-0", passwd=12345) with IS = aprslib.IS("KI5AYO", passwd=12345), it works fine.

Expected behavior
A clear and concise description of what you expected to happen.

The login should be processed without the SSID, but subsequent calls to aprslib's .sendall should include the SSID.

System info (please complete the following information):

  • OS: MacOS Catalina, Raspbian Buster
  • Python Version 3.8.5
  • PyPacket Version 5.0

PR incoming

Setup

I haven't had any luck configuring PYPACKET_USERNAME or PYPACKET_PASSWORD. Also I can't find in the readme where to configure lat/long, beacon text, etc.

Would it be possible to get instructions on how to do this for the uninitiated like me?

Great piece of light weight software, it decodes well! 73, Matt.

Altitude not include in log output

I'm interested in using pypacket to track a high-altitude balloon project I'm working on. The default log output doesn't include altitude, which would be really helpful to let me know when I need to go find my balloon!

I've included a minor change in a PR with a working example (altitude is in meters).

Ctrl-C causes 100% CPU load

Exiting with Ctrl-C causes pypacket to exit, but one of the instances of rtl_fm remains running and goes to 100% available cpu load. It is unaffected by kill, killall or trying to kill from htop. This occurs on both RPi B+ and RPi3 B. On the RPi3 B, only one core is loaded up per instance of rtl_fm, but subsequent interruption of pypacket cause more invincible instances of rtl_fm. A reboot is the only thing that seems to clear it up.

RPi B+ running Buster lite
RPi3 B running Jesse
python 3.6.3 on both

multimon-ng used as demodulator, corrupts packet data - this igate must not be used on APRS-IS

class MultimonDecoder(Decoder):

Hi,

multimon-ng AX.25 packet radio decoder output is not binary clean. It is designed for decoding packets for human-readable use, and it strips/modifies out some bytes (non-printable packets which do appear in some packet formats) and does not handle multi-line packets well. Using it on an iGate will cause modified duplicate packets to be generated on the APRS-IS, when other iGates forward an intact packet and this igate forwards a corrupted packet.

A far better strategy for creating an iGate with an RTL-SDR is doing FM demodulation with rtl_fm, and passing the audio stream to Direwolf which can either be configured to act as a standalone iGate, or used as a KISS TNC for another iGate software (I use it with aprx). This provides a proper, safe APRS implementation, which treats the packets the same way as other iGates on the network, without data corruption.

Please see https://github.com/hessu/aprsc/blob/main/doc/IGATE-HINTS.md for details.

Option to include coordinates in logs

At the moment logging is configured to write asctime, levelname and message.

Would it be possible to add in an option in the configuration file to enable additional parameters to be logged, such as the LAT/LONG that's displayed on the CLI friendly log?

This isn't anything of great benefit right now, but would be a nice to have to potentially visualise in another tool, with the free tier of aprs.fi only allowing you to view received beacons over the last 24 hours.

Setting to select which RTL-SDR to use

I have multiple RTL-SDRs attached to a single RPi which are being used for separate things. Please can you include a setting for the RTL-SDR serial number to be used.

APRS-IS Auth info in config

Would be good to have an override for the environment variables in the config file since the environment variable approach was a means for me to keep my details out of source control.

Long/Lat and comment for APRS-IS?

I have read the readme.MD four times, still not 100% sure that I havnt missed how to configure my long/lat and comment string so that my APRS-rx igate shows up on the maps such as aprs.fi.

Have I missed the parameters or is it still to be implemented?

// SM4XDJ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.