aerospaceresearch / calibratesdr Goto Github PK
View Code? Open in Web Editor NEWwhat is my SDR frequency?
License: MIT License
what is my SDR frequency?
License: MIT License
I'm trying to resolve an intermitted issue with my HackRF device so I thought about trying to find the crystal accuracy and if my cheap chinese 0.1ppm external crystal might have drifted.
To record data from the HackRF I'm using:
hackrf_transfer -r test.iq -f 220352000 -s 2048000
call hackrf_set_sample_rate(2048000 Hz/2.048 MHz)
call hackrf_set_hw_sync_mode(0)
call hackrf_set_freq(220352000 Hz/220.352 MHz)
I let it run for about 30 seconds.
Then I run CalibrateSDR:
python3 cali.py -f test.iq -rs 2048000 -v
{'f': 'test.iq', 'm': 'dab', 's': 'rtlsdr', 'c': 'all', 'rs': 2048000, 'rg': 20, 'rd': 0, 'nsec': 10, 'graph': False, 'verbose': True}
let's find your SDR's oscillator precision
loading file...
starting mode: dab
your sdr's precision is None ppm
However I'm getting a response of "None". What could be the issue?
Debian Linux, python 3.9.1, rtl sdr dongle by rtl-sdr blog, V3
$ python3 cali.py -v
{'f': None, 'm': 'dab', 's': 'rtlsdr', 'c': 'all', 'rs': 2048000, 'rg': 20, 'rd': 0, 'nsec': 10, 'graph': False, 'verbose': True}
let's find your SDR's oscillator precision
scanning...
starting mode: dab
Detached kernel driver
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Scanning all channels
Scanning…: 0%| | 0/35 [00:00<?, ?it/s]Reattached kernel driver
Scanning…: 0%| | 0/35 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/lumag/Projects/Ham/CalibrateSDR/cali.py", line 199, in <module>
main(vars(args))
File "/home/lumag/Projects/Ham/CalibrateSDR/cali.py", line 74, in main
cali.utils.scan_one_dab_channel(dabchannels, channel, sdr, rs, ns, rg, filename, samplerate,
File "/home/lumag/Projects/Ham/CalibrateSDR/calibratesdr/utils.py", line 101, in scan_one_dab_channel
record_with_rtlsdr(sdr, rs, cf, ns, rg, filename)
File "/home/lumag/Projects/Ham/CalibrateSDR/calibratesdr/utils.py", line 88, in record_with_rtlsdr
samples = sdr.read_bytes(ns * 2)
File "/home/lumag/.local/lib/python3.9/site-packages/rtlsdr/rtlsdr.py", line 456, in read_bytes
raise LibUSBError(result, 'Could not read %d bytes' % (num_bytes))
rtlsdr.rtlsdr.LibUSBError: <LIBUSB_ERROR_NO_MEM (-11): Insufficient memory> "Could not read 40960000 bytes"
Unfortunately there is zero documentation on any command line parameters.
I have two dongles, how to use this program?
Hi,
I downloaded the script to a Raspberry PI and if i run rtl_test
works fine but if i run the script i got:
pi@raspberrypi:~/CalibrateSDR $ python3 ./cali.py
{'f': None, 'm': 'dab', 's': 'rtlsdr', 'c': 'all', 'rs': 2048000, 'rg': 20, 'rd': 0, 'nsec': 10, 'graph': False, 'verbose': False}
let's find your SDR's oscillator precision
scanning...
starting mode: dab
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Scanning all channels
Scanning…: 0%| | 0/41 [00:00<?, ?it/s]Allocating 15 zero-copy buffers
python3: ../../libusb/os/threads_posix.h:46: usbi_mutex_lock: Assertion `pthread_mutex_lock(mutex) == 0' failed.
Aborted
pi@raspberrypi:~/CalibrateSDR $
Getting AttributeError: python: undefined symbol: rtlsdr_get_device_count
while running cali.py, (even after installing using setup.py). Tried on different Python versions (3.6, 3.8 and 3.9), still it persists.
This seems to be an issue pertaining with Linux-based OS only. Working in WIndows will not throw the issue. Below attached is the command-line picture.
You can simply reproduce the issue just using import rtlsdr
statements (even though it has been installed).
UPDATE: I have worked on the issue, and will update the Readme for troubleshooting guidance
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.