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

Compiling Error #2

Closed
jsa91 opened this issue Jan 31, 2019 · 5 comments
Closed

Compiling Error #2

jsa91 opened this issue Jan 31, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@jsa91
Copy link

jsa91 commented Jan 31, 2019

This happens while running "make".

pi@raspberrypi:~/rtl_map/build $ cmake ../ -- Checking FFTW3... -- FFTW3 found! -- Checking RTL_SDR... -- RTL_SDR found! -- Configuring done -- Generating done -- Build files have been written to: /home/pi/rtl_map/build

pi@raspberrypi:~/rtl_map/build $ make [ 50%] Building C object CMakeFiles/rtl_map.dir/rtl_map.c.o /home/pi/rtl_map/rtl_map.c:53:15: error: initializer element is not constant _samp_rate = n_read * 4000, /*!< [ARG] Sample rate (optional) */ ^~~~~~ CMakeFiles/rtl_map.dir/build.make:62: recipe for target 'CMakeFiles/rtl_map.dir/rtl_map.c.o' failed make[2]: *** [CMakeFiles/rtl_map.dir/rtl_map.c.o] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/rtl_map.dir/all' failed make[1]: *** [CMakeFiles/rtl_map.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Linux raspberrypi 4.14.90-v7+ #1183

@orhun
Copy link
Owner

orhun commented Feb 1, 2019

Thanks for the submission.
Tried to fix at 7fd5aa4
Can you try to build it again?

@orhun orhun added the bug Something isn't working label Feb 1, 2019
@jsa91
Copy link
Author

jsa91 commented Feb 1, 2019

Yep, that solved it.

Next issue though:

pi@raspberrypi:~ $ rtl_map -f 88000000 -g 30
[23:27:41] INFO Starting rtl_map ~
[23:27:41] INFO Found 1 device(s):
[23:27:41] INFO #0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
[23:27:42] INFO Using device: #0
[23:27:42] INFO Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
[23:27:42] INFO Gain set to 2.7
[23:27:42] INFO Center frequency set to 88000000 Hz.
[23:27:42] INFO Sampling at 2048000 S/s
[23:27:42] INFO Creating FFT graph from samples using gnuplot...
[23:27:42] INFO Done, exiting...
Warning: empty x range [-1.04858e+06:-1.04858e+06], adjusting to [-1.05906e+06:-1.03809e+06]

gnuplot> plot '-' smooth frequency with linespoints lt -1 notitle
                                                                 ^
         line 513: all points y value undefined!

What I'm I doing wrong ?

@orhun
Copy link
Owner

orhun commented Feb 1, 2019

@jsa91
I'm still trying to solve this bug. According to my research, rtl_map works fine when I plug the rtlsdr in to USB 3.0. Can you try it?
Setting output to '-' might help.
Another temporary solution is executing the rtl_test command before the rtl_map.

Still trying to figure out why this happens...
If you find anything useful about this issue, please post.

@orhun
Copy link
Owner

orhun commented Feb 1, 2019

While I was searching this issue, I realized that it might be about libusb or pipe-libusb sync. I got the same error and I ran the same command one more time. Here's the output:

[04:31:24] INFO Gain set to 1.4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
[04:31:24] INFO Center frequency set to 90000000 Hz.
[04:31:24] INFO Sampling at 2048000 S/s
rtlsdr_write_reg failed with -4
rtlsdr_write_reg failed with -4
Allocating 15 zero-copy buffers
Failed to submit transfer 0
Please increase your allowed usbfs buffer size with the following command:
echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb

After this, it worked fine.
So still researching if the hardware or the software causes this.

@orhun
Copy link
Owner

orhun commented Feb 2, 2019

a7764da might solve the issue.
Can you try it and post results?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants