Git Product home page Git Product logo

pymultimonaprs's Introduction

pymultimonaprs

RF2APRS-IG Gateway supporting this backends:

  • Pulseaudio
  • ALSA
  • RTL-SDR

Installation

  • Install multimonNG
  • Install rtl-sdr (for RTL-SDR backend)
  • Run python2 setup.py install

Configuration

Edit /etc/pymultimonaprs.json:

Backend

Set the source to rtl, alsa, or pulse to select the backend

Status

Set the status text, or set a status file - the content of this file will be read at runtime and sent as status. This way you can eg. monitor your battery status using APRS-IG. Set both text and file to false to disable status beacon.

Position Ambiguity

To hide your exact position you can set the ambiguity value to a value from 0 to 4.

  • 0 will not hide anything
  • 1 will decrease precision to 1/10 of a min
  • 2 will decrease precision to 1 min
  • 3 will decrease precision to 10 min
  • 4 will decrease precision to 1°

Weather

You can set weather to a json-file. eg: "weather": "/path/to/weather.json",
If you don't want do send weather date, just leave it on false.
This will be read in like the status-file and can look like that:

{
	"timestamp": 1366148418,
	"wind": {
		"speed": 10,
		"direction": 240,
		"gust": 200
	},
	"temperature": 18.5,
	"rain": {
		"rainlast1h": 10,
		"rainlast24h": 20,
		"rainmidnight": 15
	},
	"humidity": 20,
	"pressure": 1013.25
}

Legend

  • timestamp is seconds since epoch - must be included
  • wind
    • speed is in km/h
    • direction is in deg
    • gust is in km/h
  • temperature is in °C
  • rain
    • rainlast1h is in mm
    • rainlast24h is in mm
    • rainmidnight is in mm
  • humidity is in %
  • pressure is in hPa

The timestamp must be included - everything else is optional.

Symbol

The correct symbol is already selected. If you still want to change it, you can find the symbol table here.

IPv4 / IPv6

To select a protocol you can set preferred_protocol to ipv4, ipv6 or any.
You use a raw IPv6 address as a gateway like this: "[2000::1234]:14580".

Running

  • Run systemctl start pymultimonaprs or just pymultimonaprs -v for testing

pymultimonaprs's People

Contributors

asdil12 avatar billdotjr avatar dl1mx avatar mach327 avatar martinherren avatar mkubon avatar octopuskat avatar qbit avatar sharjeelaziz 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymultimonaprs's Issues

Negative value in PPM results in wrong command line

Hi,

Frank (DG3KCE) found an error, if he want to enter a negative value for the PPM. I think that is because of the space between the -p and the value.

Example (-29): rtl_fm -f 144800000 -f 145825000 -s 22050 -p -29 -g 0 -l 10 - -E none -d

It will start 2 decodings instead of one and the PPM will result in a separate option.
Can you please change the source, where the space after ther -p option is removed?

Best regards, Marco

format error in beacon.py

Hi,
There is a problem in beacon.py if the degrees part is zero. For example: 10.008 degrees east will result in "0100.48E" in the beacon text, but there is one 0 missing. Correct is "01000.48E".

Regards,
Marco
DL1MX

Objects

There should be an option to broadcast Objects periodically in addition to the actual IGate beacon!

Wrong project name

I see that you dubbed your project as "HF 2 APRS-IS".
However, since there is no 1200 baud APRS on the HF bands, I think you meant "RF 2 APRS-IS".

Reject TCPIP Traffic

Hello.

I have noticed a small issue. Someone in radio range of me is sending IGATE->RF, and pymultimonaprs subsuiquently re-pushes these packets back to TCPIP.

Is there a way to reject packets with "TCPIP", "NOGATE", or "RFONLY" in the path?

George M1GEO

Change Status at runtime

Read the status from a text-file, which can be configured.

This way, eg. the current battery-status can be reported.

Filter command sent to the APRS-IS server

Not sure how much this matters but the filter command sent to the APRS-IS is hard coded in the gate.py file and should probably be more generic or user defined.

Existing (Line 60):

self.log.info("login %s (PyMultimonAPRS %s)" % (self.callsign, version))
self.socket.send("user %s pass %s vers PyMultimonAPRS %s filter r/38/-171/1\r\n" %
(self.callsign, self.passcode, version))

Modified Example (Line 60): "Changed r/38/-171/1 to m/80"

self.log.info("login %s (PyMultimonAPRS %s)" % (self.callsign, version))
self.socket.send("user %s pass %s vers PyMultimonAPRS %s filter m/80\r\n" %
(self.callsign, self.passcode, version))

Reference:
http://www.aprs-is.net/javAPRSFilter.aspx

Multiple gateway servers?

Is it possible to specify multiple gateway servers?

I'd like to specify a particular IP for which server to connect to. The issue I am having, depending when I start pymultimonaprs it will connect to one of the servers at random but the latency varies from 10ms to 150ms depending which server it picks.

I'd like to be able to specify "try and connect to IP-A, IP-B, noam.aprs2.net," so it so that it will still fall back to a working server if the first ones fail, but will attempt to use a particular server first.

pymultimonaprs corrupts packet data by trimming whitespace

pymultimonaprs removes any leading or trailing whitespace in a packet (space, tab characters). This is packet data corruption; packets should be forwarded unmodified (up to the first CR or LF character).

payload = payload.strip()

line = line.strip()

A valid packet may have whitespace in the beginning or end. Specifically, an APRS packet may well have a space character in the end that conveys information: the Yaesu VX-8 is identified by a space in the end of the packet! See mic-e type codes, http://www.aprs.org/aprs12/mic-e-types.txt

By trimming whitespace a modified duplicate copy is created. The APRS-IS will then have two versions of the same original packet: one which has the spaces, and one which doesn't. Please see hint 1:

https://github.com/hessu/aprsc/blob/master/doc/IGATE-HINTS.md

pkg_resources not found

Hi!

in the pymultimonaprs git-package is the pkg_resources missing - line 6 in setup.py points to this resources - python gives with

python setup.py install

the output:

Traceback (most recent call last):
File "setup.py", line 6, in
import pkg_resources
ImportError: No module named pkg_resources

Also it seems pymultimonaprs is not running caused of this. I allready installed it months ago on other systems with older versions (no remote access at the moment posible) and it worked well,

br and 73,
oe1wuw

Traffic being sent but not picked up by APRS-IS

Hi
I been running pymultimonaprs for a couple of months now. its running on a Raspberry Pi with a Nooelec R820T based DVB-T - All of a sudden while I was away its sopped sending traffic.

running it with the -v option and using my handheld to generate to traffic on 144.800 - I can get infomation being sent out :

[2015-06-11 18:18:07] DEBUG: sending: MB7VD-0>APRS,TCPIP_:=5320.45N/00115.60W&testing and config stage 2
[2015-06-11 18:18:07] DEBUG: sending: MB7VD-0>APRS,TCPIP_:>Running on Raspberry Pi
[2015-06-11 18:20:48] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.65W[/A=000514 http://www.amateurham.co
[2015-06-11 18:22:57] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.65W[/A=000534 http://www.amateurham.co
[2015-06-11 18:23:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:=5320.45N/00115.60W&testing and config stage 2
[2015-06-11 18:23:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:>Running on Raspberry Pi
[2015-06-11 18:25:10] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.66W[/A=000487 http://www.amateurham.co
[2015-06-11 18:28:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:=5320.45N/00115.60W&testing and config stage 2
[2015-06-11 18:28:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:>Running on Raspberry Pi
[2015-06-11 18:28:20] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.65W[/A=000504 http://www.amateurham.co
[2015-06-11 18:30:23] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.65W[/A=000503 http://www.amateurham.co
[2015-06-11 18:33:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:=5320.45N/00115.60W&testing and config stage 2
[2015-06-11 18:33:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:>Running on Raspberry Pi
[2015-06-11 18:34:28] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.65W[/A=000482 http://www.amateurham.co
[2015-06-11 18:34:28] WARNING: Connection issue: '[Errno 32] Broken pipe'
[2015-06-11 18:34:30] INFO: connecting... 185.43.207.219:14580
[2015-06-11 18:34:30] INFO: connected
[2015-06-11 18:34:30] INFO: # aprsc 2.0.14-gbec1899
[2015-06-11 18:34:30] INFO: login MB7VD-0 (PyMultimonAPRS 1.0.0)
[2015-06-11 18:34:30] INFO: # logresp MB7VD-0 verified, server T2HUN
[2015-06-11 18:36:32] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.66W[/A=000499 http://www.amateurham.co
[2015-06-11 18:38:08] DEBUG: sending: MB7VD-0>APRS,TCPIP_:=5320.45N/00115.60W&testing and config stage 2
[2015-06-11 18:38:08] WARNING: Connection issue: '[Errno 32] Broken pipe'
[2015-06-11 18:38:09] INFO: connecting... 185.43.207.219:14580
[2015-06-11 18:38:09] INFO: connected
[2015-06-11 18:38:09] INFO: # aprsc 2.0.14-gbec1899
[2015-06-11 18:38:09] INFO: login MB7VD-0 (PyMultimonAPRS 1.0.0)
[2015-06-11 18:38:09] INFO: # logresp MB7VD-0 verified, server T2HUN
[2015-06-11 18:38:09] DEBUG: sending: MB7VD-0>APRS,TCPIP_:>Running on Raspberry Pi
[2015-06-11 18:38:40] DEBUG: sending: M0PJA-7>APDR13,WIDE1,qAR,MB7VD-0:=5320.46N/00115.67W[/A=000467 http://www.amateurham.co

After a while I starting to see a broken pipe error

root@AprsIgate:# uname -a
Linux AprsIgate.pjarcher.plus.com 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux
root@AprsIgate:
# uname -r
3.18.11+
root@AprsIgate:~# cat /etc/issue
Raspbian GNU/Linux 7 \n \l

Please can you offer me some debugging advise ?

Multiple instances of PyMultimonaprs?

Is it possible to run multiple instances of PyMultimonaprs? I would like to capture 9600 baud 435Mhz data from FalconSat3 and gate that to the APRS-IS

pymultimonaprs corrupts packets by re-encoding

pymultimonaprs makes the assumption that all packets could be decoded or encoded as ISO-8859-1 printable strings, and decodes and subsequently re-encodes them as such. In reality a lot of packets contain binary byte sequences which cannot be correctly decoded or encoded as such. Many packets also contain substrings (such as APRS text message content) which are UTF-8 encoded, but other encodings are also widely used.

Encoding and re-encoding will often fail and cause packet data corruption, and modified duplicated packets as other igates will pass these packets without corrupting them. APRS packets in transit on the network must be processed as binary byte arrays, not strings of some specific encoding.

tnc2_frame = tnc2_frame.decode('ISO-8859-1')

tnc2 = tnc2.encode('ISO-8859-1')

See this implementation hint for more info:

https://github.com/hessu/aprsc/blob/master/doc/IGATE-HINTS.md#packets-getting-modified-due-to-character-encoding-issues

Unable to apply position ambiguity.

Position ambiguity in APRS is done by replacing latitude digits with spaces. However, the spaces are being stripped away from the config.

From the protocol reference http://www.aprs.org/doc/APRS101.PDF
Digits in the latitude may be progressively replaced by a _ (space) character as the amount of imprecision increases.

The level of ambiguity specified in the latitude will automatically apply to the longitude as well — it is not necessary to include any space characters in the longitude.
For example, the coordinates: 4903.__N/07201.75W-

This problem can solved in two ways: allow the config to also accept spaces for latitude, or make an extra config where you put in how many digits should be scrubbed.

Issue with subprocess when starting on Ubuntu 14.04.3 LTS

Hello all.

When trying to start on my desktop PC, following a successful "python setup.py build" and "python setup.py install".

When starting, I get the following:

george@zobel:$ sudo pymultimonaprs -v
[2016-01-05 01:34:36] INFO: Starting pymultimonaprs
[2016-01-05 01:34:36] INFO: connecting... 178.62.6.243:14580
[2016-01-05 01:34:36] INFO: connected
[2016-01-05 01:34:36] INFO: # aprsc 2.0.18-ge7666c5
[2016-01-05 01:34:36] INFO: login M1GEO (PyMultimonAPRS 1.2.0)
[2016-01-05 01:34:36] INFO: # logresp M1GEO verified, server T2LONDON
Traceback (most recent call last):
File "/usr/local/bin/pymultimonaprs", line 96, in
mm = Multimon(mmcb,config)
File "/usr/local/lib/python2.7/dist-packages/pymultimonaprs/multimon.py", line 14, in init
self._start()
File "/usr/local/lib/python2.7/dist-packages/pymultimonaprs/multimon.py", line 48, in _start
stdout=subprocess.PIPE, stderr=open('/dev/null')
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
george@zobel:
$

******* THE SOLUTION *******

Inside the multimon.py file, add "shell=True" as an argument to each call to subprocess.Popen. Seel new _start(self): below

def _start(self):
if self.config['source'] == 'pulse':
proc_mm = subprocess.Popen(
['multimon-ng', '-a', 'AFSK1200', '-A'],
stdout=subprocess.PIPE, stderr=open('/dev/null'),
shell=True
)
else:
if self.config['source'] == 'rtl':
proc_src = subprocess.Popen(
['rtl_fm', '-f', str(int(self.config['rtl']['freq'] * 1e6)), '-s', '22050',
'-p%s' % str(self.config['rtl']['ppm']), '-g', str(self.config['rtl']['gain']),
'-E', 'offset' if self.config['rtl'].get('offset_tuning', False) else 'none',
'-d', str(self.config['rtl'].get('device_index', 0)), '-'],
stdout=subprocess.PIPE, stderr=open('/dev/null'),
shell=True
)
elif self.config['source'] == 'alsa':
proc_src = subprocess.Popen(
['arecord', '-D', self.config['alsa']['device'],
'-r', '22050', '-f', 'S16_LE', '-t', 'raw', '-c', '1', '-'],
stdout=subprocess.PIPE, stderr=open('/dev/null'),
shell=True
)
proc_mm = subprocess.Popen(
['multimon-ng', '-a', 'AFSK1200', '-A', '-t', 'raw', '-'],
stdin=proc_src.stdout,
stdout=subprocess.PIPE, stderr=open('/dev/null'),
shell=True
)
self.subprocs['src'] = proc_src
self.subprocs['mm'] = proc_mm

Hope that helps?

George
M1GEO.com

Offset tuning

Hi,

I had problems with elonics tuner. The rtl_fm works great with -E offset enabled. I setup the iGate, but it was deaf to all DX signals. Only 5W from same QTH was decoded properly. Then I changed the multimon.py the "dirty way". I changed the line

-'-p', str(self.config['rtl']['ppm']), '$']), '-g', str(self.config['rtl']['gain']), '-'],
+'-p', str(self.config['rtl']['ppm']), '$']), '-g', str(self.config['rtl']['gain']), '-E offset -'],

and now it works.

I would be nice if the offset tuning could be enabled via pymultimonaprs.json

Regards,
Marko

Can't change symbol table to "\"

I'm having issues changing my symbol table to "" (backslash) instead of the default "/" (slash). When I change it in pymultimonaprs.json, and run "sudo pymultimonaprs", it gives me an error: "ValueError Invalid control character at: line 20 column 16 (char 342)". I would like to change my symbol to the "Gate" symbol instead of the default "Gate-HF" symbol, since I'm operating a VHF iGate, not HF. I'm running it on a Raspberry Pi 2 Model B, with Raspbian Wheezy. Let me know if you need more info. Thanks for the great software! -Chris KJ6WEG

Problems with Python3

Hello
i cant downlaod Pyton2 anymore and have only installed Phyton3. With Phyton3 i get many Errors when i want to install Setup.py
Maybe you can make a new Version for newer Linux with only Pyhton3 installed ?

Tnx
Marco

Feature request: Decode DPRS packages

Hello,
since I own a Icom Dstar handset that is not capable to send APRS packets, I was hoping to set up a simple APRS/DPRS gateway on my Raspberry PI. However, the only software I know which is able to decode both APRS and DPRS data is APRX [1]. Unfortunately, APRX is huge, with a vast amount of features and pretty hard to configure, and, furthermore, appears to be not actively developed anymore. I never got it work though, neither with my SDR (not even sure if SDRs are supported in APRX) nor with direwolf (which itself is, again, somewhat hard to configure). Since the DPRS specs are published [2] and already implemented elsewhere (e.g. APRX), it would be amazing to add DPRS to pymultimonaprs. And, yes, of course I'm aware that DPRS position beacons shouldn't be transmitted on the APRS beacon frequency. I do however think that there are several use cases where it would make sense to be able to decode both the APRS and the DPRS position beacons on the same frequency and with one device.
Maybe it is possible to somehow incorporate the DPRS-part from APRX[3] into pymultimon and thus make it truely "multimonitor"? :-)
Thank you in advance!
Chris

[1]http://thelifeofkenneth.com/aprx/ and https://github.com/PhirePhly/aprx
[2]http://www.aprs-is.net/downloads/DStar/D-PRS.pdf
[3]https://github.com/PhirePhly/aprx/blob/master/dprsgw.c

Problem starting pymultimonaprs on openSUSE 13.1

Hello,

I've installed pymultimonaprs, and I am trying to start it without rtl-sdr. I chose "beacon" for "source". When I call pymultimon -v, I get the following error:
Traceback (most recent call last):
File "/usr/bin/pymultimonaprs", line 83, in
mm = Multimon(mmcb,config)
File "/usr/lib/python2.7/site-packages/pymultimonaprs/multimon.py", line 14, in init
self._start()
File "/usr/lib/python2.7/site-packages/pymultimonaprs/multimon.py", line 45, in _start
stdin=proc_src.stdout,
UnboundLocalError: local variable 'proc_src' referenced before assignment

Before that, I get message that connection was successful. Am I doing something wrong?

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.