madengr / ham2mon Goto Github PK
View Code? Open in Web Editor NEWGNU Radio based SDR scanner for narrow band FM demodulation
License: GNU General Public License v3.0
GNU Radio based SDR scanner for narrow band FM demodulation
License: GNU General Public License v3.0
Isn´t the intended behavior to print the possible arguments / help when starting ham2mon.py without arguments?
I get this:
linux; GNU C++ version 5.3.1 20160413; Boost_105800; UHD_003.009.004-release
Traceback (most recent call last):
File "./ham2mon.py", line 137, in <module>
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./ham2mon.py", line 59, in main
priority_file_name, play, audio_bps)
File "/home/esn/src/ham2mon/apps/scanner.py", line 77, in __init__
audio_bps)
File "/home/esn/src/ham2mon/apps/receiver.py", line 442, in __init__
fft_length)
File "/usr/lib/python2.7/dist-packages/gnuradio/blocks/blocks_swig1.py", line 431, in make
return _blocks_swig1.stream_to_vector_make(itemsize, nitems_per_block)
RuntimeError: gr::io_signature(3)
I use a HackRF and after figuring out what arguments I should use everything works fine. I use GNU Radio version 3.7.9 and Python is 2.7.11+.
I might come up with some code changes to fix this it is is the intended behavior and the issue can be confirmed from more users.
I receive the following error message when I try to run ham2mon.py in python2.7 with gnuradio 3.7.5:
cubbedge@linux-wxfr:/ham2mon/ham2mon-60f9358ca526fc8542f3c2fe5ca61dcacb340c44/apps> ./ham2mon.py -a "rtl" -n 4 -f 145E6 -r 2E6 -g 20 -s -40 -v 0 -t 30 -w/ham2mon/ham2mon-60f9358ca526fc8542f3c2fe5ca61dcacb340c44/apps>
Traceback (most recent call last):
File "./ham2mon.py", line 130, in
curses.wrapper(main)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./ham2mon.py", line 54, in main
freq_correction, record, lockout_file_name)
File "/home/cubbedge/ham2mon/ham2mon-60f9358ca526fc8542f3c2fe5ca61dcacb340c44/apps/scanner.py", line 68, in init
hw_args, freq_correction, record)
File "/home/cubbedge/ham2mon/ham2mon-60f9358ca526fc8542f3c2fe5ca61dcacb340c44/apps/receiver.py", line 460, in init
integrate_ff = blocks.integrate_ff(100, fft_length)
File "/usr/lib64/python2.7/site-packages/gnuradio/blocks/blocks_swig3.py", line 592, in make
return _blocks_swig3.integrate_ff_make(_args, *_kwargs)
TypeError: integrate_ff_make() takes at most 1 argument (2 given)
Reattached kernel driver
cubbedge@linux-wxfr:
Any ideas?
Skip Cubbedge
Gnuradio 3.8 now uses Python 3. Also, gr-osmosdr won't build with Python 3. Ham2mon does not currently support Pyhon 3.
I am not in touch with the timeline for gr-osmosdr to python3. I don't see anything that indicates this is in the works even. Anyone here know what plan is on this? I see references to Soapy which seems to have same intent as gr-osmosdr. I can ask this question elsewhere but starting here to get the input of ham2mon users.
When I invoke the application I see flashes of errors that clear away quickly before they can be read and I see text staircasing. In an attempt to calm the output I piped the output into strings so the VT terminal commands won't work. Below is a snippet of the errors I could catch.
# pushd ~/git/ham2mon/apps/ && ./ham2mon.py -w -r 1500000 -d 0 -f 462562500 -a rtl 2>&1 | strings | tee /tmp/output.txt
~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~
linux; GNU C++ version 6.2.0 20161010; Boost_106100; UHD_003.009.005-0-unknown
[?1049h
[1;24r
[?7h
[?1l
>Traceback (most recent call last):
File "./ham2mon.py", line 147, in <module>
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 49, in wrapper
curses.nocbreak()
_curses.error: nocbreak() returned ERR
root@tonka:~/git/ham2mon/apps# pushd ~/git/ham2mon/apps/ && ./ham2mon.py -a "rtl" -n 4 -f 145E6 -r 2E6 -g 20 -s -40 -v 0 -t 30 -w
~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~/git/ham2mon/apps ~
linux; GNU C++ version 6.2.0 20161010; Boost_106100; UHD_003.009.005-0-unknown
RuntimeError: SDR hardware not detected or insufficient USB permissions. Try running as root.
# uname -a
Linux tonka 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux
# dpkg --list |grep -i rtl
ii librtlsdr0:armhf 0.5.3-11+rpt1 armhf Software defined radio receiver for Realtek RTL2832U (library)
ii rtl-sdr 0.5.3-11+rpt1 armhf Software defined radio receiver for Realtek RTL2832U (tools)
ii soapysdr0.5-2-module-rtlsdr:armhf 0.2.2-2 armhf RTL-SDR device support for SoapySDR
# dpkg --list |grep -i radio
ii gnuradio 3.7.10.1-2 armhf GNU Radio Software Radio Toolkit
ii gnuradio-dev 3.7.10.1-2 armhf GNU Software Defined Radio toolkit development
ii gr-air-modes 0.0.2.c29eb60-1 armhf Gnuradio Mode-S/ADS-B radio
ii gr-fcdproplus 3.7.25.4b6464b-2 armhf Funcube Dongle Pro Plus controller for GNU Radio
ii gr-fosphor 3.7.0.2.7b6b996-1 armhf gnuradio fosphor block (GPU spectrum display)
ii gr-iqbal 0.37.2-7 armhf GNU Radio Blind IQ imbalance estimator and correction
# lsusb
Bus 001 Device 004: ID 0bda:2832 Realtek Semiconductor Corp. RTL2832U DVB-T
Bus 001 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 006: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Sound from the speakers is good but what is written to disk with -w plays back garbled. This happens on two different computers. Output of aplay:
Playing WAVE '465.020_1464177108.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
I was going to dig deeper into the code but maybe someone has run across this.
Thanks,
John
Hi folks,
I'm trying use this script on RP3, but i had received the message:
./ham2mon.py -a "rtl" -n 4 -f 145E6 -r 2E6 -g 20 -s -40 -v 0 -t 30 -w
linux; GNU C++ version 4.9.1; Boost_105500; UHD_003.007.003-0-unknown
Traceback (most recent call last):
File "./ham2mon.py", line 147, in
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./ham2mon.py", line 59, in main
priority_file_name, play, audio_bps)
File "/home/pi/Desktop/ham2mon/ham2mon/apps/scanner.py", line 79, in init
audio_bps)
File "/home/pi/Desktop/ham2mon/ham2mon/apps/receiver.py", line 461, in init
integrate_ff = blocks.integrate_ff(100, fft_length)
File "/usr/lib/python2.7/dist-packages/gnuradio/blocks/blocks_swig3.py", line 592, in make
return _blocks_swig3.integrate_ff_make(*args, **kwargs)
TypeError: integrate_ff_make() takes at most 1 argument (2 given)
Any ideas?
For my application I have added an option to limit the length of a demodulation to N seconds. I need this because I mostly run ham2mon headless and use a Web based interface to listen to audio files created by ham2mon. In this case I do not want open ended audio files or even very long ones.
Let me know if this feature would be of benefit to others and I can submit a pull request. It may only be me that has a use for it.
Hey, I didn't find any answers for this, so I thought I'd ask. I'm on openSUSE 42.1. gnuradio is version 3.7.8-3.11. I have a generic RTL2832U. gqrx works, so I know the RTL is accessible via gnuradio.
Running this:
./ham2mon.py -a "rtl" -n 4 -f 145E6 -r 2E6 -g 20 -s -40 -v 0 -t 30 -w
And I get this:
Traceback (most recent call last):
File "./ham2mon.py", line 136, in
curses.wrapper(main)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./ham2mon.py", line 58, in main
priority_file_name, play)
File "/home/taborj/ham2mon/apps/scanner.py", line 73, in init
hw_args, freq_correction, record, play)
File "/home/taborj/ham2mon/apps/receiver.py", line 435, in init
fft_length)
File "/usr/lib64/python2.7/site-packages/gnuradio/blocks/blocks_swig1.py", line 389, in make
return _blocks_swig1.stream_to_vector_make(_args, *_kwargs)
RuntimeError: gr::io_signature(3)
Any thoughts?
Hi,
after clone GIT to my MAC and fire up "./ham2mon.py -a "uhd" -n 8 -f 146E6 -r 4E6 -g 30 -s -60 -v 0 -t 10 -w" i got this error:
mac:apps Andre$ ./ham2mon.py -a "hackrf" -n 8 -f 146E6 -r 4E6 -g 30 -s -60 -v 0 -t 10 -w
Mac OS; Clang version 6.1.0 (clang-602.0.53); Boost_105800; UHD_003.008.005-MacPorts-Release
Traceback (most recent call last):
File "./ham2mon.py", line 126, in
curses.wrapper(main)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./ham2mon.py", line 51, in main
lockout_file_name)
File "/Users/Andre/ham2mon/apps/scanner.py", line 65, in init
record)
File "/Users/Andre/ham2mon/apps/receiver.py", line 258, in init
fft_length)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/blocks/blocks_swig1.py", line 426, in make
return _blocks_swig1.stream_to_vector_make(itemsize, nitems_per_block)
RuntimeError: gr::io_signature(3)
mac:apps Andre$
Any Idea whats wrong?
thanks and regards André
I mostly listen to NBFM with ham2mon. For things like transmission in my local area it works great. However, I also use it at automobile races that have heavy radio traffic with varying degrees of signal strength.
What I see in this case is there are times where not only is the expected signal received but "duplicates" across other frequencies. These duplicates tend to lower quality and can be mixed with signals on those other frequencies.
This may be a question of adjusting the gain based on my location. However, I am using ham2mon in a mobile way (on a golf cart over 640 acres of area).
Currently I am using an RTL based receiver and played around with hardware AGC. This didn't appear to help.
Are there any options to address this? It seems like this is a fundamental issue so I must be missing something basic.
Thanks,
Jon
I can use airspy_rx to stream data from Airspy 3MSPS (lowest supported rate). Also streams fine at 6MSPS. With ham2mon gnuradio indicates there are overruns. There is lag in UI and audio files sound like they are sped up. Can anything be done with the gnuradio flowgraph in ham2mon help improve performance? Yes, this is pretty vague so if more info is needed let me know.
This is probably not a ham2mon question but here it goes...
I want start ham2mon and pass argument to rtl driver to have it use AGC. I have tried things like this and it is not clear to me that it is set: -a "rtl=0,gain_mode=Automatic"
I haven't dug too deep into to code but expect ham2mon just passes this like other settings that I know work.
Any input would be appreciated!
Thanks,
John
./ham2mon.py -a "rtl" -n 4 -f 145E6 -r 2E6 -g 20 -s -40 -v 0 -t 30 -wlinux; GNU C++ version 4.6.3; Boost_104900; UHD_003.004.002-0-unknown
Traceback (most recent call last):
File "./ham2mon.py", line 131, in
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./ham2mon.py", line 55, in main
freq_correction, record, lockout_file_name, play)
File "/home/pi/ham2mon/apps/scanner.py", line 69, in init
hw_args, freq_correction, record, play)
File "/home/pi/ham2mon/apps/receiver.py", line 450, in init
integrate_ff = blocks.integrate_ff(100, fft_length)
File "/usr/local/lib/python2.7/dist-packages/gnuradio/blocks/blocks_swig3.py", line 287, in make
return _blocks_swig3.integrate_ff_make(_args, *_kwargs)
TypeError: integrate_ff_make() takes at most 1 argument (2 given)
pi@raspberrypi ~/ham2mon/apps $
please help i got this error when try to run python ham2mon.py
python ham2mon.py -a "rtl"
linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown
Traceback (most recent call last):
File "ham2mon.py", line 147, in
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "ham2mon.py", line 96, in main
rxwin.draw_rx()
File "/home/mwk/Desktop/ham2mon-master/apps/cursesgui.py", line 380, in draw_rx
self.win.addnstr(10, 1, text, 15)
_curses.error: addnstr() returned ERR
I am working with an Airspy Mini and getting an understanding of gain controls that are available. From my review of gnuradio source it looks like the gain controls a particular brand of SDR has varies. From what i have seen ham2mon doesn't currently take this into account. So in case of Airspy the BB gain control in ham2mon doesn't do anything which makes sense as it has a Mix gain setting instead. The other 2 gain controls seem to do right thing (not 100% sure yet).
Here is a point in gnuradio where difference is:
https://github.com/osmocom/gr-osmosdr/blob/4d83c6067f059b0c5015c3f59f8117bbd361e877/lib/airspy/airspy_source_c.cc#L446
https://github.com/osmocom/gr-osmosdr/blob/4d83c6067f059b0c5015c3f59f8117bbd361e877/lib/hackrf/hackrf_source_c.cc#L563
If the above seems off let me know.
Question: To support Airspy do we add another gain (Mix) to ham2mon? Should the design be changed to support something more dynamic?
John
Running on Antergos Linux i get this error on the latest from git, i do have an older version from mid 2016 which still seems to work ok.
[lee@Plasma apps]$ python2 ham2mon.py -a "airspy" -n 7 -f 156935000 -r 2500000 -g 12 -s -75 -t 10 -w -p priority-marine.txt -m
linux; GNU C++ version 7.1.1 20170516; Boost_106400; UHD_003.010.001.001-0-unknown
Traceback (most recent call last):
File "ham2mon.py", line 147, in <module>
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "ham2mon.py", line 96, in main
rxwin.draw_rx()
File "/run/media/storageEXT4/compiles/ham2mon/apps/cursesgui.py", line 379, in draw_rx
self.win.addnstr(10, 1, text, 15)
_curses.error: addnstr() returned ERR
IMSI-catcher# python scan-and-livemon
Locating potential GSM base station frequencies (this can take a few minutes).
Traceback (most recent call last):
File "scan-and-livemon", line 102, in
main()
File "scan-and-livemon", line 78, in main
list = find_gsm_bases()
File "scan-and-livemon", line 30, in find_gsm_bases
scanner = imp.load_source('scanner', grgsm_scanner_path)
File "/usr/bin/grgsm_scanner", line 36, in
import osmosdr
File "/usr/lib/python2.7/dist-packages/osmosdr/init.py", line 26, in
from osmosdr_swig import *
File "/usr/lib/python2.7/dist-packages/osmosdr/osmosdr_swig.py", line 17, in
_osmosdr_swig = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/osmosdr/osmosdr_swig.py", line 16, in swig_import_helper
return importlib.import_module('_osmosdr_swig')
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named _osmosdr_swig
RTL-SDR on R-Pi3. No issues running, but per title the playback files are choppy. After some troubleshooting, seems something in the GR chain is off when sample rate is something other than 1Mhz. Playback is normal at this sample rate.
Choppy audio: ./ham2mon.py -a "rtl" -n3 -f 1465E5 -r 2000000 -g 20 -s -40 -v 20 -t 20 -w
Normal audio: ./ham2mon.py -a "rtl" -n3 -f 1465E5 -r 1000000 -g 20 -s -40 -v 20 -t 20 -w
I'm looking into it now, but didn't know if I was missing something obvious.
Get the following dump when trying to run the program:
linux; GNU C++ version 4.9.1; Boost_105500; UHD_003.007.003-0-unknown
Traceback (most recent call last):
File "./ham2mon.py", line 137, in
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "./ham2mon.py", line 59, in main
priority_file_name, play, audio_bps)
File "/opt/ham2mon/apps/scanner.py", line 77, in init
audio_bps)
File "/opt/ham2mon/apps/receiver.py", line 457, in init
integrate_ff = blocks.integrate_ff(100, fft_length)
File "/usr/lib/python2.7/dist-packages/gnuradio/blocks/blocks_swig3.py", line 592, in make
return _blocks_swig3.integrate_ff_make(_args, *_kwargs)
TypeError: integrate_ff_make() takes at most 1 argument (2 given)
Hi, can you provide instructions to get this running on a pi?
I am attempting to use an Airspy Mini with sample rate of 3 MS/s (it supports that and 6 MS/s). I am starting ham2mon like this:
ham2mon.py -a "airspy" -r 3E6 -w -m -b 16
However, the gui shows 10 MS/s and not 3. I haven't gotten into the code yet and want to make sure I am not missing something basic.
Hi,
I got this error, not sure how to solve things.
Traceback (most recent call last):
File "./ham2mon.py", line 9, in
import scanner as scnr
File "/home/abels/SDR/ham2mon/apps/scanner.py", line 9, in
import receiver as recvr
File "/home/abels/SDR/ham2mon/apps/receiver.py", line 10, in
import osmosdr
ImportError: No module named osmosdr
Did install http://sdr.osmocom.org/trac/wiki/GrOsmoSDR for so far.
Installed gnuradio and dev files under ubuntu willy.
Maybe it has to do with:
-- # Gnuradio disabled components
-- ######################################################
-- * Python support
-- * Osmocom IQ Imbalance Correction
-- * sysmocom OsmoSDR
used: sudo cmake ../ -DENABLE_OSMOSDR=ON -DENABLE_PYTHON=ON
this gave some erros.
What libs and or packages do i exactly need on my system ?
Regards.
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.