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

More detailed instructions? #12

Closed
OZ1SEJ opened this issue Apr 5, 2015 · 38 comments
Closed

More detailed instructions? #12

OZ1SEJ opened this issue Apr 5, 2015 · 38 comments

Comments

@OZ1SEJ
Copy link

OZ1SEJ commented Apr 5, 2015

I've followed the instructions for the RaspberryPi, and everything worked fine until the "make" command, which obviously needs some parameter. Also, it says I should run the "program" with sudo, but it doesn't say which program. It also says I should edit the file config.txt, but there is no such file. Is there a manual somewhere?

@genewitch
Copy link

I think that, perhaps, more detailed instructions about how to build/compile from source are available on the world wide web internet google device

@genewitch
Copy link

specifically what OS you are running + build + gcc. you need a bunch of extra "packages' to build an application from source, all of these are readily available.

I charge a lot of money to answer these questions on the phone; too.

@szpajder
Copy link

szpajder commented Apr 5, 2015

On Sun, Apr 5, 2015 at 9:18 AM, Steen Eiler Jørgensen <
notifications@github.com> wrote:

I've followed the instructions for the RaspberryPi, and everything worked
fine until the "make" command, which obviously needs some parameter.

It doesn't. Just type "make" without parameters.

Also, it says I should run the "program" with sudo, but it doesn't say
which program.

sudo ./rtl_airband (of course you need to build it with "make" command
first).

It also says I should edit the file config.txt, but there is no such file.

There is a config.txt.example file. Rename it to config.txt and edit it to
suit your needs. The format is described in the README file.

Tomasz Lemiech

@OZ1SEJ
Copy link
Author

OZ1SEJ commented Apr 5, 2015

I think I know how to build/compile from source, but I don't know which file to compile!

@OZ1SEJ
Copy link
Author

OZ1SEJ commented Apr 5, 2015

Okay, I think maybe I've located the issue. The readme file says

I assume you already have RTLSDR library installed: http://www.hamradioscience.com/raspberry-pi-as-remote-server-for-rtl2832u-sdr/

Done.

sudo apt-get install libmp3lame-dev libvorbis-dev libshout-dev libfftw3-dev

Done.

sudo rpi-update && sudo reboot

Done.

cd into the project folder (where makefile is located)

What's this? I have a folder called rtl-sdr, but typing make in this dir gives me an error. Or what is the "project folder"?

@szpajder
Copy link

szpajder commented Apr 5, 2015

On Sun, Apr 5, 2015 at 6:07 PM, Steen Eiler Jørgensen <
notifications@github.com> wrote:

cd into the project folder (where makefile is located)

What's this? I have a folder called rtl-sdr, but typing make in this dir
gives me an error. Or what is the "project folder"?

Have you cloned the RTLSDR_Airband repository (
https://github.com/microtony/RTLSDR-Airband.git)?

git clone will create the directory named RTLSDR_Airband. You cd to it and
then make.

Tomasz Lemiech

@OZ1SEJ
Copy link
Author

OZ1SEJ commented Apr 5, 2015

Aha! Thank you! So I guess what's missing from the instructions is

git clone https://github.com/microtony/RTLSDR-Airband

before the "command into project directory" line. Now I have the project, but when I issue the command "make", I get this message:

as -o rtl_airband_asm.o rtl_airband_asm.s
g++ -O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -march=armv6zk -mfpu=vfp -lrt -lm -lvorbisenc -lmp3lame -lshout -lpthread -lrtlsdr -o rtl_airband rtl_airband.cpp hello_fft/mailbox.c hello_fft/gpu_fft.c hello_fft/gpu_fft_twiddles.c hello_fft/gpu_fft_shaders.c rtl_airband_asm.s
rtl_airband.cpp: In function ‘void* rtlsdr_exec(void*)’:
rtl_airband.cpp:178:9: error: return-statement with no value, in function returning ‘void*’ [-fpermissive]
makefile:21: recipe for target 'rtl_airband' failed
make: *** [rtl_airband] Error 1

Is this normal?

@szpajder
Copy link

szpajder commented Apr 5, 2015

On Sun, Apr 5, 2015 at 6:45 PM, Steen Eiler Jørgensen <
notifications@github.com> wrote:

  • rtl_airband.cpp:178:9: error: return-statement with no value, in
    function returning ‘void_’ [-fpermissive]
    makefile:21: recipe for target 'rtl_airband' failed
    make: *_* [rtl_airband] Error 1

Is this normal?

You may want to clone https://github.com/szpajder/RTLSDR-Airband instead,
which has this and several other issues fixed.

Tomasz Lemiech

@OZ1SEJ
Copy link
Author

OZ1SEJ commented Apr 5, 2015

I cloned your repository instead, and now I get

as -o rtl_airband_asm.o rtl_airband_asm.s
g++ -O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -march=armv6zk -mfpu=vfp -lrt -lm -lvorbisenc -lmp3lame -lshout -lpthread -lrtlsdr -o rtl_airband rtl_airband.cpp hello_fft/mailbox.c hello_fft/gpu_fft.c hello_fft/gpu_fft_twiddles.c hello_fft/gpu_fft_shaders.c rtl_airband_asm.s
/tmp/ccvvzXaP.o: I funktionen "gpu_fft_prepare(int, int, int, int, GPU_FFT**)":
gpu_fft.c:(.text+0xa0): undefined reference to `gpu_fft_alloc(int, unsigned int, GPU_FFT_PTR*)'
gpu_fft.c:(.text+0xc4): undefined reference to `gpu_fft_ptr_inc(GPU_FFT_PTR*, int)'
gpu_fft.c:(.text+0x10c): undefined reference to `gpu_fft_ptr_inc(GPU_FFT_PTR*, int)'
gpu_fft.c:(.text+0x138): undefined reference to `gpu_fft_ptr_inc(GPU_FFT_PTR*, int)'
gpu_fft.c:(.text+0x15c): undefined reference to `gpu_fft_ptr_inc(GPU_FFT_PTR*, int)'
gpu_fft.c:(.text+0x1f4): undefined reference to `gpu_fft_ptr_inc(GPU_FFT_PTR*, int)'
/tmp/ccvvzXaP.o: I funktionen "gpu_fft_execute(GPU_FFT*)":
gpu_fft.c:(.text+0x2c4): undefined reference to `gpu_fft_base_exec(GPU_FFT_BASE*, int)'
/tmp/ccvvzXaP.o: I funktionen "gpu_fft_release(GPU_FFT*)":
gpu_fft.c:(.text+0x2c8): undefined reference to `gpu_fft_base_release(GPU_FFT_BASE*)'
collect2: ld returned 1 exit status
makefile:21: recipe for target 'rtl_airband' failed
make: *** [rtl_airband] Error 1

It's a standard RaspberryPi model B.

@szpajder
Copy link

szpajder commented Apr 5, 2015

On Sun, Apr 5, 2015 at 7:59 PM, Steen Eiler Jørgensen <
notifications@github.com> wrote:

I cloned your repository instead, and now I get

as -o rtl_airband_asm.o rtl_airband_asm.s

(...)

gpu_fft.c:(.text+0x2c8): undefined reference to
gpu_fft_base_release(GPU_FFT_BASE_)'_

Have you replaced the hello_fft subdirectory?

Don't do this. hello_fft is already included in my repo and it should work
right away.

Tomasz Lemiech

@OZ1SEJ
Copy link
Author

OZ1SEJ commented Apr 7, 2015

Ah. Great - thanks! It seems to work now! Now I only need to figure out how to set up Icecast or Shoutcast... ;-)

@sa7adv
Copy link

sa7adv commented Apr 13, 2015

Hmm do i need to do the command sudo mknod char_dev c 100 0
before make ?
I cloned your repro Tomasz (git clone https://github.com/szpajder/RTLSDR-Airband)
then cd RTLSDR-Airband .. here i did make and it did not report any failure ..
(did not use sudo mknod char_dev c 100 0) .. ??

Now i also have to figure out to set up icecast and rest of the program .. :-)

//SA7ADV

@szpajder
Copy link

On Mon, Apr 13, 2015 at 3:29 PM, sa7adv notifications@github.com wrote:

Hmm do i need to do the command sudo mknod char_dev c 100 0
before make ?
I cloned your repro Tomasz (git clone
https://github.com/szpajder/RTLSDR-Airband)
then cd RTLSDR-Airband .. here i did make and it did not report any
failure ..
(did not use sudo mknod char_dev c 100 0) .. ??

char_dev is needed to run the program, not to build it.

Tomasz Lemiech

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Can you please give us an example of the config.txt? I am stuck trying to figure out how to edit it. Thanks.

@szpajder
Copy link

szpajder commented Jun 27, 2015 via email

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Here's what I have:
<127.0.0.1>
<8000>


<122000000>
<9000>

<119400000> <119400.mp3>
<120800000> <120800.mp3>
<121700000> <121700.mp3>
<124800000> <124800.mp3>

I get this error:
Reading config.
Device count is less than 1?

What's wrong? I have edited the template.txt file based on the contents it had.

@microtony
Copy link
Owner

You can try this configuration. However this won't work as the dongle won't have enough bandwidth to receive the channels. The channels must be within 2.56MHz

1                   
0   4   280 122000000   9000    
127.0.0.1   8000    119400.mp3  119400000   source  password
127.0.0.1   8000    120800.mp3  120800000   source  password
127.0.0.1   8000    121700.mp3  121700000   source  password
127.0.0.1   8000    124800.mp3  124800000   source  password

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Ok. It works now. Thanks, Tomasz!

Another question: is there a way to make the program run in the background whenever I power my Raspberry PI 2 with Raspbian OS?

@microtony
Copy link
Owner

You can add the command to /etc/rc.local (above exit 0)
/etc/rc.local is the script which runs on boot

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Would the command look like ./rtl_airband_neon ? Sorry for the silly question but I am new to Linux stuff.

@microtony
Copy link
Owner

Use the full path like /home/abc/rtl_airband_neon

If you are not sure what the full path is you can use pwd in the same directory that rtl_airband_neon is in to find out the path.

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Done. Rebooting now to see how it works. ))))

One more question: what's the location/path of the mountpoint files? I need to configure the icecast server to stream them but I am not exactly sure how to get that done.

Thanks again! You are very helpful!

@microtony
Copy link
Owner

There is no file. As long as you configured the icecast server properly (i think you only need to change the default password), once you start the rtlsdr_airband program the mountpoints will be created automatically and start streaming.

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Ok. I will need to check my settings then on the icecast since I am not seeing any streams yet on it.

@szpajder
Copy link

You might as well do the following (assuming that your source directory is
/usr/src/RTLSDR-Airband):

sudo cat > /usr/local/bin/start_rtl_airband
#!/bin/bash
( cd /usr/src/RTLSDR-Airband && ./rtl_airband_neon --quiet

2>&1 | logger -t rtl_airband -p local3.info ) &

(press enter, press Ctrl+D)

sudo chmod 755 /usr/local/bin/start_rtl_airband

Then edit the file /etc/rc.local (e.g "sudo nano /etc/rc.local") and add
the following line before "exit 0":

/usr/local/bin/start_rtl_airband &

Diagnostic messages will be logged to /var/log/messages .

If you are feeling adventureous, you may try the unstable branch of my fork
(https://github.com/szpajder/RTLSDR-Airband/tree/unstable), which has
several new features, eg. it runs as a daemon by default, it logs messages
via syslog and it has some example startup scripts for installation in
/etc/init.d/ . You will have to convert your config file to the new format
though. Refer to README.md for details.

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

Strange: I have added the following line to the rc.local but to no avail:
/home/pi/RTLSDR-Airband/rtl_airband_neon

When I run top command I don't see the application running in the list of what's there now.
Any idea what I might have missed?

@szpajder
Copy link

szpajder commented Jun 27, 2015 via email

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

OK. Will use the script you have pasted above. That sounds good.

@KZ1R
Copy link

KZ1R commented Jun 27, 2015

I have made the script and added it to the rc.local as per your instructions. Still can't see the rtl_airband_neon in the list of processes. Any idea on what to check? Thanks.

@szpajder
Copy link

Have you changed the path from /usr/src/RTLSDR-Airband to
/home/pi/RTLSDR-Airband ?

Have you tried to launch the script by hand from command prompt? Does it
work that way?

Tomasz Lemiech

@KZ1R
Copy link

KZ1R commented Jun 28, 2015

Tomasz,

here's what I get when I try to launch the script manually:

/bin/bash: ( cd /home/pi/RTLSDR-Airband && ./rtl_airband_neon --quiet 2>&1 | logger -t rtl_airband -p local3.info ) &: No such file or directory

I have checked the path - it's correct.

@KZ1R
Copy link

KZ1R commented Jun 28, 2015

OK. I have found the problem - in your script the last character was & instead of ).

The only strange thing now is why I don't see the rtl_airband_neon in the list of processes when running the 'top' command from shell?

@KZ1R
Copy link

KZ1R commented Jun 29, 2015

Tomasz,

any idea what that is - no rtl_airband_neon in the list of current processes?

@szpajder
Copy link

If you copied the content of the script directly from the GitHub message, you might have ended up merging it into one line. #!/bin/bash should be in the first line, the rest should be in the second one.

@KZ1R
Copy link

KZ1R commented Jun 30, 2015

Thanks. That solved the issue. Now I have the rtl_airband_neon in the list of running processes. However I still cannot get the audio into the icecast server. If you use icecast, can you give me a copy of your mpd.conf file?

@microtony
Copy link
Owner

You should try the program and test the audio first before making it run on boot.

If you run the program in terminal you should be able to see the channel levels (just like in README). That would be much easier to debug. At least you won't have to reboot every time after changing the config.

@szpajder
Copy link

Why mpd.conf?

Most of us use Icecast software from http://icecast.org. Configuration goes into /etc/icecast.xml (or /etc/icecast/icecast.xml), which is documented here: http://icecast.org/docs/icecast-2.4.1/config-file.html .

Most of the settings can be kept at their defaults. You should definitely change passwords in authentication section (source-password is the one you put in rtl_airband's config.txt). You may also change the port number in listen-socket section if you don't like the default 8000 for any reason. If you want more than two simultaneous sources, then increase sources in limits section. Switching burst-on-connect to 0 is not necessary but should decrease the delay of low-bitrate streams.

@KZ1R
Copy link

KZ1R commented Jun 30, 2015

@microtony

Tony, thanks. I have done that and could see levels. Everything is fine. Now I need to solve the remaining issues with the icecast server which refuses to run here:

Latest errors:
Starting Music Player Daemon: mpdJun 30 17:32 : server_socket: bind to '[::1]:6600' failed: Failed to create socket: Address family not supported by protocol (continuing anyway, because binding to '127.0.0.1:6600' succeeded)
Jun 30 17:32 : fatal_error: MPD died from signal 11

@OZ1SEJ OZ1SEJ closed this as completed Nov 29, 2016
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

6 participants