Trouble running demo software?

Discuss KerberosSDR - 4x Coherent RTL-SDR
Post Reply
samsonpwnz
Posts: 2
Joined: Fri Mar 22, 2019 3:07 pm

Trouble running demo software?

Post by samsonpwnz » Fri Mar 22, 2019 3:09 pm

I tried running kerberossdr demo software on a Pi3b+ with the provided image, but it really seemed to bog down the poor pi, and only took a few minutes before the whole applicated froze up. Then I installed Ubuntu 18.04 on a much more capable notebook and while I get a much better update rate, after a few minutes it locks the application up. Any suggestions?

rtlsdrblog
Site Admin
Posts: 2383
Joined: Mon Nov 19, 2012 11:54 pm

Re: Trouble running demo software?

Post by rtlsdrblog » Fri Mar 22, 2019 6:32 pm

The Pi3 is a bit slow, but I've never seen it freeze up. Did only the software freeze, or the whole system?

Make sure you turn off the spectrum and sync graphs when you're done with them. Plotting those graphs can be quite CPU intensive.

samsonpwnz
Posts: 2
Joined: Fri Mar 22, 2019 3:07 pm

Re: Trouble running demo software?

Post by samsonpwnz » Fri Mar 22, 2019 9:50 pm

Only the software seems to freeze. I do disable graphs when not needed, but during DOA is when it seems to lock up on me.

digistrat
Posts: 2
Joined: Fri Mar 22, 2019 9:50 pm

Re: Trouble running demo software?

Post by digistrat » Fri Mar 22, 2019 9:59 pm

I am getting errors when running setup_init.sh on x86 with 18.04.

No errors on any prior steps and all rcvrs test good.

Any suggestions?

Thanks

gcc -Wall -O3 -march=native rtl_daq.c -lpthread -lrtlsdr -o rtl_daq
rtl_daq.c: In function ‘main’:
rtl_daq.c:331:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
^~
rtl_daq.c: In function ‘fifo_read_tf’:
rtl_daq.c:108:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&signal, sizeof(signal), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:127:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&center_freq_read, sizeof(uint32_t), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:128:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&sample_rate_read, sizeof(uint32_t), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:129:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:131:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_2, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:132:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_3, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:133:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_4, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cczSrBmp.o: In function `read_thread_entry':
rtl_daq.c:(.text+0x341): undefined reference to `rtlsdr_set_dithering'
/tmp/cczSrBmp.o: In function `main':
rtl_daq.c:(.text.startup+0x3ed): undefined reference to `rtlsdr_set_gpio'
rtl_daq.c:(.text.startup+0x408): undefined reference to `rtlsdr_set_gpio'
collect2: error: ld returned 1 exit status
Makefile:20: recipe for target 'rtl_daq' failed
make: *** [rtl_daq] Error 1

rtlsdrblog
Site Admin
Posts: 2383
Joined: Mon Nov 19, 2012 11:54 pm

Re: Trouble running demo software?

Post by rtlsdrblog » Sat Mar 23, 2019 8:22 am

digistrat wrote:
Fri Mar 22, 2019 9:59 pm
I am getting errors when running setup_init.sh on x86 with 18.04.

No errors on any prior steps and all rcvrs test good.

Any suggestions?

Thanks

gcc -Wall -O3 -march=native rtl_daq.c -lpthread -lrtlsdr -o rtl_daq
rtl_daq.c: In function ‘main’:
rtl_daq.c:331:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
^~
rtl_daq.c: In function ‘fifo_read_tf’:
rtl_daq.c:108:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&signal, sizeof(signal), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:127:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&center_freq_read, sizeof(uint32_t), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:128:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&sample_rate_read, sizeof(uint32_t), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:129:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:131:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_2, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:132:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_3, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:133:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_4, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cczSrBmp.o: In function `read_thread_entry':
rtl_daq.c:(.text+0x341): undefined reference to `rtlsdr_set_dithering'
/tmp/cczSrBmp.o: In function `main':
rtl_daq.c:(.text.startup+0x3ed): undefined reference to `rtlsdr_set_gpio'
rtl_daq.c:(.text.startup+0x408): undefined reference to `rtlsdr_set_gpio'
collect2: error: ld returned 1 exit status
Makefile:20: recipe for target 'rtl_daq' failed
make: *** [rtl_daq] Error 1
That means that you haven't installed the KerberosSDR RTL-SDR drivers. See the "Install RTL-SDR-Kerberos Drivers" step on the guide.

If you did install them, then you may not have started from a clean install and it's probably conflicting with some older drivers. I'd suggest running an apt-get remove rtl-sdr and seeing if that helps.

digistrat
Posts: 2
Joined: Fri Mar 22, 2019 9:50 pm

Re: Trouble running demo software?

Post by digistrat » Sat Mar 23, 2019 1:54 pm

Tried to remove and re-install drivers as you suggested but getting exact same errors


rtlsdrblog wrote:
Sat Mar 23, 2019 8:22 am
digistrat wrote:
Fri Mar 22, 2019 9:59 pm
I am getting errors when running setup_init.sh on x86 with 18.04.

No errors on any prior steps and all rcvrs test good.

Any suggestions?

Thanks

gcc -Wall -O3 -march=native rtl_daq.c -lpthread -lrtlsdr -o rtl_daq
rtl_daq.c: In function ‘main’:
rtl_daq.c:331:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
^~
rtl_daq.c: In function ‘fifo_read_tf’:
rtl_daq.c:108:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&signal, sizeof(signal), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:127:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&center_freq_read, sizeof(uint32_t), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:128:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&sample_rate_read, sizeof(uint32_t), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:129:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:131:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_2, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:132:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_3, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:133:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&gain_read_4, sizeof(int), 1, fd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cczSrBmp.o: In function `read_thread_entry':
rtl_daq.c:(.text+0x341): undefined reference to `rtlsdr_set_dithering'
/tmp/cczSrBmp.o: In function `main':
rtl_daq.c:(.text.startup+0x3ed): undefined reference to `rtlsdr_set_gpio'
rtl_daq.c:(.text.startup+0x408): undefined reference to `rtlsdr_set_gpio'
collect2: error: ld returned 1 exit status
Makefile:20: recipe for target 'rtl_daq' failed
make: *** [rtl_daq] Error 1
That means that you haven't installed the KerberosSDR RTL-SDR drivers. See the "Install RTL-SDR-Kerberos Drivers" step on the guide.

If you did install them, then you may not have started from a clean install and it's probably conflicting with some older drivers. I'd suggest running an apt-get remove rtl-sdr and seeing if that helps.

rtlsdrblog
Site Admin
Posts: 2383
Joined: Mon Nov 19, 2012 11:54 pm

Re: Trouble running demo software?

Post by rtlsdrblog » Sat Mar 23, 2019 9:23 pm

Maybe you also installed librtlsdr-dev via apt-get? Try removing that too.

If that doesn't work i'd suggest searching your system for old librtlsdr files, and deleting them all first.

There is a driver conflict somewhere on your system, so finding and deleting those old installs should help.

vesev595258
Posts: 1
Joined: Tue Apr 23, 2019 2:21 am

Re: Trouble running demo software?

Post by vesev595258 » Wed May 08, 2019 3:36 am

I've completed installation of the dependencies and rtl-sdr-kerberos drivers, and successfully executed the rtl_test...

However after pulling from git and compiling (With errors, see below), the GUI doesn't load...

Believe this is similiar to the issue noted in this thread.

I never installed the rtlsdr drivers via apt-get (This is a clean 18.04 install specifically for kerberossdr) but manually deleted and reinstalled/compiled them from github anyways.

lsb_release and rtl_test results:

Code: Select all

[email protected]:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic
[email protected]:~$ rtl_test -d 0
Found 4 device(s):
  0:  Generic, RTL2832U, SN: 77771111153705700
  1:  Generic, RTL2832U, SN: 77771111153705700
  2:  Generic, RTL2832U, SN: 77771111153705700
  3:  Generic, RTL2832U, SN: 77771111153705700

Using device 0: Generic RTL2832U
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 
[R82XX] PLL not locked!
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...
c^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 0
[... omitted device 1 and 2 ...]
[email protected]:~$ rtl_test -d 3
Found 4 device(s):
  0:  Generic, RTL2832U, SN: 777711111xxxx700
  1:  Generic, RTL2832U, SN: 777711111xxxxx700
  2:  Generic, RTL2832U, SN: 777711111xxxxx700
  3:  Generic, RTL2832U, SN: 777711111xxxx700

Using device 3: Generic RTL2832U
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 
[R82XX] PLL not locked!
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...
^CSignal caught, exiting!

User cancel, exiting...
Samples per million lost (minimum): 0
Compilation and execution:

Code: Select all

[email protected]:~$ git clone https://github.com/rtlsdrblog/kerberossdr
Cloning into 'kerberossdr'...
remote: Enumerating objects: 260, done.
remote: Counting objects: 100% (260/260), done.
remote: Compressing objects: 100% (163/163), done.
remote: Total 260 (delta 150), reused 200 (delta 90), pack-reused 0
Receiving objects: 100% (260/260), 307.02 KiB | 2.10 MiB/s, done.
Resolving deltas: 100% (150/150), done.
[email protected]:~$ cd kerberossdr
[email protected]:~/kerberossdr$ sh setup_init.sh
Compile C files
gcc -Wall -O3 -march=native rtl_daq.c -lpthread -lrtlsdr -o rtl_daq
rtl_daq.c: In function ‘main’:
rtl_daq.c:321:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
     int rc;
         ^~
rtl_daq.c: In function ‘fifo_read_tf’:
rtl_daq.c:109:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
         fread(&signal, sizeof(signal), 1, fd);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:128:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(&center_freq_read, sizeof(uint32_t), 1, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:129:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(&sample_rate_read, sizeof(uint32_t), 1, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:130:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(&gain_read, sizeof(int), 1, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:132:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(&gain_read_2, sizeof(int), 1, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:133:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(&gain_read_3, sizeof(int), 1, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl_daq.c:134:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(&gain_read_4, sizeof(int), 1, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -Wall -O3 -march=native sync.c -lpthread -o sync
sync.c: In function ‘fifo_read_tf’:
sync.c:62:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
         fread(&signal, sizeof(signal), 1, fd);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sync.c:78:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
             fread(delays, sizeof(*delays), 4, fd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -Wall -O3 -march=native gate.c -lpthread -o gate
gate.c: In function ‘fifo_read_tf’:
gate.c:49:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
         fread(&trigger_read, sizeof(trigger_read), 1, fd);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -Wall -O3 -march=native sim.c -o sim
[ INFO ] Set file executation rights
[sudo] password for radio: 
Sorry, try again.
[sudo] password for radio: 
mkdir: cannot create directory ‘/ram’: File exists
ln: failed to create symbolic link '_webDisplay/pr.jpg': File exists
ln: failed to create symbolic link '_webDisplay/DOA_value.html': File exists
ln: failed to create symbolic link '_webDisplay/spectrum.jpg': File exists
ln: failed to create symbolic link '_webDisplay/sync.jpg': File exists
ln: failed to create symbolic link '_webDisplay/doa.jpg': File exists
ln: failed to create symbolic link '_webDisplay/pr.jpg': File exists
[email protected]:~/kerberossdr$ ./run.sh
3
Starting KerberosSDR
kill: (2458): No such process
rm: cannot remove '_receiver/C/gate_control_fifo': No such file or directory
rm: cannot remove '_receiver/C/sync_control_fifo': No such file or directory
rm: cannot remove '_receiver/C/rec_control_fifo': No such file or directory
[email protected]:~/kerberossdr$ 
ps -aux output:

Code: Select all

[email protected]:~/kerberossdr$ ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.2  0.1 225396  9360 ?        Ss   19:08   0:02 /sbin/init splash
root         2  0.0  0.0      0     0 ?        S    19:08   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        I<   19:08   0:00 [rcu_gp]
[... unrelated processes ommitted ...]
radio     2337  0.0  0.0  29816  5216 pts/0    Ss   19:12   0:00 bash
root      2482  0.0  0.0  72716  4260 pts/0    S    19:13   0:00 sudo chrt -r 50 ionice -c 1 -n 0 ./_receiver/C/rtl_daq 256 1
root      2483  0.0  0.0  72716  4260 pts/0    S    19:13   0:00 sudo chrt -r 50 ./_receiver/C/sync 256 1
root      2484  0.0  0.0  72716  4212 pts/0    S    19:13   0:00 sudo chrt -r 50 ./_receiver/C/gate 256 1
root      2487  2.7  0.0 113212  3736 pts/0    Sl   19:13   0:21 ./_receiver/C/sync 256 1
root      2488  1.2  0.0 112176  2368 pts/0    Sl   19:13   0:10 ./_receiver/C/gate 256 1
root      2490  5.0  0.4 455172 34976 pts/0    Sl   19:13   0:40 ./_receiver/C/rtl_daq 256 1
[...]
[email protected]:~/kerberossdr$ 

rtlsdrblog
Site Admin
Posts: 2383
Joined: Mon Nov 19, 2012 11:54 pm

Re: Trouble running demo software?

Post by rtlsdrblog » Wed May 08, 2019 5:43 am

Can you try and edit the run.sh file and remove the >&/dev/null in the Python execution part? That will show any errors on the console when you run the program.

Looks like all the C code programs are running, but the Python code isn't opening for you. Maybe just a missing dependency. The warnings you got during compiling are not errors, and are normal.

e.g.

OLD

Code: Select all

sudo chrt -r 50 ionice -c 1 -n 0 ./_receiver/C/rtl_daq $BUFF_SIZE 2>/dev/null 1| sudo chrt -r 50 ./_receiver/C/sync $BUFF_SIZE 2>/dev/null 1| sudo chrt -r 50 ./_receiver/C/gate $BUFF_SIZE 2>/dev/null 1|sudo nice -n -20 sudo -u $curr_user python3 -O _GUI/hydra_main_window.py [b][i]&>/dev/null[/i][/b] $BUFF_SIZE $IPADDR&
NEW

Code: Select all

sudo chrt -r 50 ionice -c 1 -n 0 ./_receiver/C/rtl_daq $BUFF_SIZE 2>/dev/null 1| sudo chrt -r 50 ./_receiver/C/sync $BUFF_SIZE 2>/dev/null 1| sudo chrt -r 50 ./_receiver/C/gate $BUFF_SIZE 2>/dev/null 1|sudo nice -n -20 sudo -u $curr_user python3 -O _GUI/hydra_main_window.py $BUFF_SIZE $IPADDR&

jackloh
Posts: 2
Joined: Sun May 05, 2019 2:39 pm

Re: Trouble running demo software?

Post by jackloh » Tue Oct 01, 2019 1:58 pm

Hi, I am facing the same problem. I cannot run the MMI after ./run.sh

With your new code, I saw the error message:

ImportError: No module named 'matplotlib'

I also remember i did encounter error when trying to install matplotlib using "pip3 install matplotlib". Error message: Command "python aetup.py egg_info" failed with error code 1 in /tmp/pip-build-_dn9itpc/matplotlib

Please advice. Thanks!

Post Reply