cjcliffe / CubicSDR

Cross-Platform Software-Defined Radio Application
http://www.cubicsdr.com
GNU General Public License v2.0
2.06k stars 254 forks source link

Raspberry Pi 2/3 #242

Closed Peter-H-G closed 7 years ago

Peter-H-G commented 8 years ago

Trying to install on Pi2 _ Debian At liquid_dsp after sudo make install the libliquid.so and libliquid.a are not found.

cjcliffe commented 8 years ago

@Peter-H-G if 'sudo make install' succeeded for liquid-dsp then you may just need to run 'sudo ldconfig' or reboot to recognize the new library. Let me know if that helps and I'll update the instructions accordingly. Not completely sure if it will actually run on Pi2 yet; others have attempted but ran out of swap -- so I'd suggest making sure you have a swap file enabled :)

cjcliffe commented 8 years ago

Pi2 has arrived here today; should be able to make some progress on wiki instructions soon.

Peter-H-G commented 8 years ago

Dear Charles, this is good news. What I try to install is: https//github.com/cjcliffe/CubicSDR/wiki/Build-Linux following the paper I get problems in "Build and Install liquid-dsp" not finding libliquid.so and libliquid.o in attachment is the copy of my inputs.

cjcliffe commented 8 years ago

Hi Peter, just note when you reply to the GitHub e-mails they post to public GitHub automatically; I've edited your previous comment online.

Please re-send the attachments and question to cj@cubicproductions.com I can try to help you with the details there. I'll post additional information about compiling liquid-dsp (which I managed to do last night) on this GitHub issue shortly.

cjcliffe commented 8 years ago

At the moment it looks like this is going to require an OpenGL ES update and possibly a custom GL canvas initialization. It almost-sorta-works with 'glshim' project but the windowed displays each just flash briefly full-screen and some required commands aren't implemented.

cjcliffe commented 8 years ago

Going to make OpenGL ES / 3.x a priority after 0.2.0 release; I think the next major performance boost will be the result of moving the CPU graphics work to GPU shader programs as well (which will definitely help the Pi).

cjcliffe commented 8 years ago

It appears that wxWidgets 3.1.0 now includes OpenGL ES (and OpenGL 3.x+ for desktop) support for wxGLCanvas -- I'm going to experiment with enabling OpenGL ES support for Pi and see what happens :)

vsboost commented 8 years ago

Good luck, ill be sure to test it on my Rpi3

Peter-H-G commented 8 years ago

Thank you for that info. In the meantime there is a very simple thing, based on a Phillips - TunerFM 1216 making FM and TV and is is piloted by an Arduino. Outputs are Fieldstrength, and audio. But there is still the idea to make it with the RPi2.

Am 22.03.2016 um 00:02 schrieb Charles J. Cliffe:

It appears that wxWidgets 3.1.0 now includes OpenGL ES (and OpenGL 3.x+ for desktop) support for wxGLCanvas -- I'm going to experiment with enabling OpenGL ES support for Pi and see what happens :)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/cjcliffe/CubicSDR/issues/242#issuecomment-199526128

PHG 67370 Dingsheim / Alsace

ghost commented 8 years ago

I was brave enough to compile wxWidgets and CubicSDR onmy Raspberry Pi B+ only to find out that the B+ is not fast enough to run CubicSDR in any reasonable way. Compiling CubicSDR and wxWidgets took over 4 hours each. ;-)

On Tue, Mar 22, 2016 at 10:45 AM, Peter-H-G notifications@github.com wrote:

Thank you for that info. In the meantime there is a very simple thing, based on a Phillips - TunerFM 1216 making FM and TV and is is piloted by an Arduino. Outputs are Fieldstrength, and audio. But there is still the idea to make it with the RPi2.

Am 22.03.2016 um 00:02 schrieb Charles J. Cliffe:

It appears that wxWidgets 3.1.0 now includes OpenGL ES (and OpenGL 3.x+ for desktop) support for wxGLCanvas -- I'm going to experiment with enabling OpenGL ES support for Pi and see what happens :)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/cjcliffe/CubicSDR/issues/242#issuecomment-199526128

PHG 67370 Dingsheim / Alsace

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/cjcliffe/CubicSDR/issues/242#issuecomment-199722277

Peter-H-G commented 8 years ago

OK the RPi2 is twice faster, but as you tried it out, this is not the good solution. Thank to heaven I had both ways in my mind. I use the "counter-reaction" which regulates the IF-frequency - amplification in the Tuner FM1216 as an indicator for field-strength. An it works at least now for FM; my little thing has just 254gram and "eats" 220mA on 5V. Since even professional drones are now limited to 2,5 kg plus 400 g payload in France. And I think they are right if you think to the last encounter of a LH-Airbus A380 near LA in a height of 1500m. Thank you for cooperation.

Am 22.03.2016 um 13:28 schrieb Toontje:

I was brave enough to compile wxWidgets and CubicSDR onmy Raspberry Pi B+ only to find out that the B+ is not fast enough to run CubicSDR in any reasonable way. Compiling CubicSDR and wxWidgets took over 4 hours each. ;-)

On Tue, Mar 22, 2016 at 10:45 AM, Peter-H-G notifications@github.com wrote:

Thank you for that info. In the meantime there is a very simple thing, based on a Phillips - TunerFM 1216 making FM and TV and is is piloted by an Arduino. Outputs are Fieldstrength, and audio. But there is still the idea to make it with the RPi2.

Am 22.03.2016 um 00:02 schrieb Charles J. Cliffe:

It appears that wxWidgets 3.1.0 now includes OpenGL ES (and OpenGL 3.x+ for desktop) support for wxGLCanvas -- I'm going to experiment with enabling OpenGL ES support for Pi and see what happens :)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

https://github.com/cjcliffe/CubicSDR/issues/242#issuecomment-199526128

PHG 67370 Dingsheim / Alsace

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/cjcliffe/CubicSDR/issues/242#issuecomment-199722277

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/cjcliffe/CubicSDR/issues/242#issuecomment-199787198

PHG 67370 Dingsheim / Alsace

cjcliffe commented 8 years ago

Trying to get things going on the RPi2 right now; so far no luck just flipping on the ES2 flag but OpenGL support looks to be usable up to OpenGL ES 2.x / OpenGL 4.5 in wxWidgets 3.1.0 so I'm hopeful still.

On the RPi2 you can at least add -j3 to the 'make' commands to use a couple additional cores to reduce compile times -- there's some nasty GCC warnings from the CubicVR2 includes that are clogging the terminal that I'm trying to resolve as well which should help.

cjcliffe commented 8 years ago

Haven't tried this on Pi2 yet but it may be working on the latest Raspbian update (On Pi3 at least) according to this:

https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=150754

From the post:

==============================================
# Building CubicSDR for Linux
# This script will successfully build CubicSDR under Debian Jessie on the Raspberry Pi3.
# Adapted from https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
# Larry Dighera June 7, 2016
# LDighera@att.net

apt-get install git build-essential automake cmake
apt-get install libpulse-dev libgtk-3-dev
apt-get install freeglut3 freeglut3-dev
mkdir cubicsdr && cd cubicsdr
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j4
make install
ldconfig
SoapySDRUtil --info #test SoapySDR install
cd ..
git clone https://github.com/jgaeddert/liquid-dsp
cd liquid-dsp
./bootstrap.sh
./configure --enable-fftoverride 
make -j4
make install
ldconfig
cd ..
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2
tar -xvjf wxWidgets-3.1.0.tar.bz2  
cd wxWidgets-3.1.0/
mkdir -p ~/Develop/wxWidgets-staticlib
./autogen.sh 
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo ~/Develop/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
make -j4 && make install
cd ..
apt-get install libhamlib2 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc python-libhamlib2
git clone https://github.com/cjcliffe/CubicSDR.git
cd CubicSDR
mkdir build && cd build
../ -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
make
cd x86/
./CubicSDR
make install
cd ..
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
ldconfig
# should now show RTL-SDR device if connected
SoapySDRUtil --probe     

# Add CubicSDR to the X11 menu with the Menu Editor: cubicsdr/CubicSDR/build/x86/CubicSDR
LDighera commented 8 years ago

I was surprised to find that CubicSDR would run on the Raspberry Pi3. Although a bit slow, and tending to overheat the Pi, it looks to be usable. It was necessary to reduce the Sample Rate to prevent buffer overflow.

The present issue is getting CubicSDR audio out. It appears to possibly be the result of the current (4.4.11-v7+) Debian Jessie release default configuration of PulseAudio. This is apparently currently under active development from the information here: https://www.raspberrypi.org/blog/another-update-raspbian/ . Killing and restarting the PulseAudio daemon successfully produced CubicSDR Audio: /bin/sh /usr/bin/start-pulseaudio-x11 .

tgeorgiop commented 8 years ago

Any news about this?

LDighera commented 8 years ago

Perhaps the information at this page will help: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=150754&p=1017039#p1017039

cjcliffe commented 8 years ago

@freebil the solution is currently as @LDighera has suggested at https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=150754 -- until I do some updates to the OpenGL graphics code (which wxWidgets is GL canvas slowly catching up to) and some additional optimizations it's not going to be as performant as it could be.

This issue will stay open and I'll eventually post some things to test on Pi here when relevant optimizations are implemented.