edersonrmachado / gr-adsbTransmit

GNURadio Block to be used in dummy airplane ADS-B packet transmission
2 stars 0 forks source link

Error #1

Open mauriwillig opened 3 years ago

mauriwillig commented 3 years ago

Hi! When I'm installing your library on DragonOS with GNU Radio 3.8.1.0 installed, I get this error:

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.35") found components: filesystem system -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for module 'cppunit' -- Found cppunit, version 1.15.1 -- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen dot CMake Error at CMakeLists.txt:144 (find_package): Could not find a configuration file for package "Gnuradio" that is compatible with requested version "3.7.2".

The following configuration files were considered but not accepted:

/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake, version: 3.8.1.0
/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake, version: 3.8.1.0

-- Configuring incomplete, errors occurred! See also "/home/mauricio/gr-adsbTransmit/build/CMakeFiles/CMakeOutput.log".

This ADS-B modulator is only compatible GNU Radio 3.7.2?

edersonrmachado commented 3 years ago

Hi @mauriwillig. Yes. It was developed a long time ago, just for testing purposes with gnuradio 3.7. Unfortunately I don't have time now to add a new git branch for Gnuradio 3.8. You can try to replace some files manually and after reinstall it. For this, replace CMakeLists.txt, which is in /gr-adsbTransmit folder for this file: CMakeLists.txt, and replace the CMakeLists.txt file, which is in /gr-adsbTransmit/grc for this file: CMakeLists.txt. After that, you can reinstall following the steps below:

mkdir build
cd build/
cmake ../  # or cmake -DCMAKE_INSTALL_PREFIX=<path_to_install> ../
make
sudo make install
sudo ldconfig

If the block installation is successfully completed, you can try to download the example file:

adsbExample38.grc

Let me know if it works.... I have not the Gnuradio 3.8 installed so I cant test it now.

edersonrmachado commented 3 years ago

Alternatively, if you want to transmit ADS-B data with an SDR, you can use binary files (with ADS-B binary packet information). I have written, (but not published yet), a python file that encode ADS-B in a binary file for a variable number of airplanes. The "dummy" airplanes data are generate in a circular region around a lat,lon point. This is the flowgraph implemented for an USRP 2932 (if you are using another SDR you can try to change the USRP by your SDR transmit block).

Screenshot from 2021-05-05 04-36-07

Result using @mhostetter gr-adsb receiver 30binContainersUSRPtxrx30db

mauriwillig commented 3 years ago

Hi @mauriwillig. Yes. It was developed a long time ago, just for testing purposes with gnuradio 3.7. Unfortunately I don't have time now to add a new git branch for Gnuradio 3.8. You can try to replace some files manually and after reinstall it. For this, replace CMakeLists.txt, which is in /gr-adsbTransmit folder for this file: CMakeLists.txt, and replace the CMakeLists.txt file, which is in /gr-adsbTransmit/grc for this file: CMakeLists.txt. After that, you can reinstall following the steps below:

mkdir build
cd build/
cmake ../  # or cmake -DCMAKE_INSTALL_PREFIX=<path_to_install> ../
make
sudo make install
sudo ldconfig

If the block installation is successfully completed, you can try to download the example file:

adsbExample38.grc

Let me know if it works.... I have not the Gnuradio 3.8 installed so I cant test it now.

Hi, thanks for your reply. I replaced those files in those specific folders. Now I'm getting this error:

-- Using install prefix: /usr/local -- Building for version: f1166806 / 1.0.0git -- -- Checking for module SWIG -- Found SWIG version 4.0.1. -- Found SWIG: /usr/bin/swig4.0
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.5", minimum required is "2") -- Configuring incomplete, errors occurred! See also "/home/mauricio/gr-adsbTransmit/build/CMakeFiles/CMakeOutput.log". See also "/home/mauricio/gr-adsbTransmit/build/CMakeFiles/CMakeError.log".

If I check "CMakeError.log":

Run Build Command(s):/usr/bin/make cmTC_035b9/fast && /usr/bin/make -f CMakeFiles/cmTC_035b9.dir/build.make CMakeFiles/cmTC_035b9.dir/build make[1]: Entering directory '/home/mauricio/gr-adsbTransmit/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_035b9.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -std=gnu11 -o CMakeFiles/cmTC_035b9.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c Linking C executable cmTC_035b9 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_035b9.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_035b9.dir/CheckFunctionExists.c.o -o cmTC_035b9 -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status make[1]: [CMakeFiles/cmTC_035b9.dir/build.make:87: cmTC_035b9] Error 1 make[1]: Leaving directory '/home/mauricio/gr-adsbTransmit/build/CMakeFiles/CMakeTmp' make: [Makefile:121: cmTC_035b9/fast] Error 2

edersonrmachado commented 3 years ago

This error, indicated by lpthreads -1, may have occurred in a previous installation step during the cmake command, as indicated in here https://stackoverflow.com/questions/27272525/what-does-collect2-error-ld-returned-1-exit-status-mean
Before those messages in CMakeError.log is there another error indication, such as the message?

CheckSymbolExists.c :(. Text + 0x1b): undefined reference to `pthread_create '

Sorry, without gnuradio 3.8 it will be difficult to reproduce here same behavior.

mauriwillig commented 3 years ago

Alternatively, if you want to transmit ADS-B data with an SDR, you can use binary files (with ADS-B binary packet information). I have written, (but not published yet), a python file that encode ADS-B in a binary file for a variable number of airplanes. The "dummy" airplanes data are generate in a circular region around a lat,lon point. This is the flowgraph implemented for an USRP 2932 (if you are using another SDR you can try to change the USRP by your SDR transmit block).

Screenshot from 2021-05-05 04-36-07

Result using @mhostetter gr-adsb receiver 30binContainersUSRPtxrx30db

Hi, sorry for the delay. I'm going to give it a try with this flowgraph to test my setup. Could you send me the binary file (30.bin) that you are using?

Thanks for the reply

edersonrmachado commented 3 years ago

Hi! I've uploaded the files to the examples folder. You can download the zip file files.zip