Coder Social home page Coder Social logo

calibratesdr's People

Contributors

arnaudlb avatar hornig avatar jyrj avatar raynor-x 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

Watchers

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

calibratesdr's Issues

CalibrateSDR with HackRF

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?

Can not read more than 4 sec on Linux

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"

libusb Assertion Failed

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 $ 

Throwing AttributeError while running the cali.py in Linux based OS

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).

image

UPDATE: I have worked on the issue, and will update the Readme for troubleshooting guidance

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.