Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using sdr devices with higher sample rate #2

Open
jamesshao8 opened this issue Mar 23, 2018 · 9 comments
Open

using sdr devices with higher sample rate #2

jamesshao8 opened this issue Mar 23, 2018 · 9 comments

Comments

@jamesshao8
Copy link

Do you know how to use this code with higher end sdr devices?
Because rtlsdr has a limited bandwidth, some signal cannot be viewed inside 2.4MHz.
I wanted to try your program with LimeSDR. But the reshape part seems to causing problem.

LimeSDR can only be set with a sample_rate above 2.5MHz, I am currently using it with 4.8MHz.

@jamesshao8
Copy link
Author

I solved this problem by carefully producing the length of iq_samples before reshape, I kept the same as in predict_scan for rtlsdr. In order to do that, I used several stages of signal.decimate.

But now the dc offset of LimeSDR is still causing problem, which rtlsdr doesnt have. Now every time it scans, it would label the LO frequency as WFM signal.

@randaller
Copy link
Owner

Don't you have tried to read from LimeSDR using shifted DC offset tuning?

def read_samples(freq):
    f_offset = 250000  # shifted tune to avoid DC
    sdr.center_freq = freq - f_offset
    time.sleep(0.06)
    iq_samples = sdr.read_samples(sample_rate * 0.25)  # sample 1/4 sec
    fc1 = np.exp(-1.0j * 2.0 * np.pi * f_offset / sample_rate * np.arange(len(iq_samples)))  # shift down 250kHz
    iq_samples = iq_samples * fc1
    return iq_samples

@jamesshao8
Copy link
Author

Thank you! I will try that. And get back to you with my results.

@FFY00
Copy link

FFY00 commented Apr 24, 2019

@jamesshao8 can you share your patch?

@jamesshao8
Copy link
Author

@jamesshao8 can you share your patch?

Hi, you mean you need my modification of cnn-rtlsdr with the support of limesdr?

@FFY00
Copy link

FFY00 commented Apr 25, 2019

Yes 😁

@jamesshao8
Copy link
Author

@FFY00 Sorry for late response. I uploaded my code now. you can have a try. https://github.com/jamesshao8/cnn-limesdr

@szy96
Copy link

szy96 commented Jul 3, 2020

Yes 😁

Hi Here I use tensorflow 2.1.0
Last step is to copy 2 files from x64!!! osmocom rtl-sdr drivers: https://osmocom.org/attachments/download/2242/RelWithDebInfo.zip
Copy these [rtl-sdr-release/x64/]: rtlsdr.dll & libusb-1.0.dll into C:\Windows folder.
Reboot your system.
Now open your anaconda prompt again, change folder to C:\rtlsdr and run:
python predict_scan.py

error ModuleNotFoundError: No module named 'rtlsdr' .
Do you know how can I fix it?

@jamesshao8
Copy link
Author

I dont know. I am not a windows user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants