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

Migrate to support GNU Radio 3.9 #77

Closed
wants to merge 7 commits into from

Conversation

NZSmartie
Copy link

Migrates this Out of Tree module to support GNU Radio 3.9. Following GNU Radio 3.9 OOT Module Porting Guide
Based on @chrisjohgorman's initial work (really appreciated btw!)

I've tested this with a LimeSDR-mini with the source module, however I have not tested the sink, yet. As I don't have a project ready to go.

I think some more testing would be in order. I haven't properly tested the RFE block, but it seems to behave as intended.

Closes #75

@dennisog
Copy link

I attempted to run this with the sink and have two takeaways:

  1. This line contains a bug that prevents GRC from generating the Python code. It should be #endif instead of #end if.
  2. I fixed 1. and attempted to run a two-radio loopback (TX of radio 1 plugged into RX of radio 2), but it seems that the samples don't make it to the transmitter, i.e., the sink block is consuming, but the radio is not transmitting. So there might still be an issue with the sink.

@daniestevez
Copy link

I have tested this and found some more problems with the GRC YML files. I have fixed them in the gr39 branch of my fork.

I've tested that the LimeSDR Source works well, both in SISO and MIMO modes. I haven't tested the LimeSDR Sink, but the generated Python code looks reasonable.

@dennisog
Copy link

I have tested this and found some more problems with the GRC YML files. I have fixed them in the gr39 branch of my fork.

I've tested that the LimeSDR Source works well, both in SISO and MIMO modes. I haven't tested the LimeSDR Sink, but the generated Python code looks reasonable.

I just ran your gr39 branch with source and sink (haven't tried MIMO) and the sink works!

@df7cb
Copy link

df7cb commented Jan 23, 2022

To support GNUradio 3.10 in the gr-limesdr Debian package, I pulled the changes from https://github.com/daniestevez/gr-limesdr/tree/gr39. The module works fine for me, receiving and transmitting on QO-100. Please consider merging that.

One odd point in there is that it's rewinding the soname of the module to 1.0.0, I put an extra patch on top to restore the old 3.0.1:

Revert unwanted soname change from the ea4gpz-gr39 patch

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,10 +30,10 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
 list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
 
 # Set the version information here
-set(VERSION_MAJOR 1)
+set(VERSION_MAJOR 3)
 set(VERSION_API   0)
-set(VERSION_ABI   0)
-set(VERSION_PATCH git)
+set(VERSION_ABI   1)
+#set(VERSION_PATCH git)
 
 cmake_policy(SET CMP0011 NEW)
 

@df7cb
Copy link

df7cb commented Jan 23, 2022

Hmm. I just realized that this PR is based on the master branch which is supposed to target GNU Radio 3.7. Actual development happens in the gr-3.8 branch now. Unfortunately master and the gr-3.8 branch have diverged enough such that rebasing this PR to gr-3.8 will be nontrivial.

Any takers?

@chrisjohgorman
Copy link

chrisjohgorman commented Jan 24, 2022 via email

@9600 9600 requested a review from gracid January 24, 2022 10:03
@ncorgan ncorgan requested review from ncorgan and removed request for gracid April 29, 2023 21:25
@ncorgan ncorgan self-assigned this Apr 29, 2023
@ncorgan
Copy link
Member

ncorgan commented Apr 30, 2023

I built and ran this locally. So far, looks good.

As a pull request, I'm going to close this, as rather than merging this into master, this will be a new gr-3.9 branch. It will be off the latest commit in the pull request, so all your work will still be attributed.

@ncorgan ncorgan closed this May 1, 2023
find_package(pybind11 REQUIRED)
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c
"try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be something simpler like python3 -c "import numpy;print(numpy.get_include())"? There is no need to filter the errors as OUTPUT_VARIABLE does store the text from STDOUT. If an error would happen, the traceback would go to STDERR and PYTHON_NUMPY_INCLUDE_DIR would be empty.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining logic to assert whether inc_path/numpy/arrayobject.py can be done in CMake rather than Python

if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost required to compile limesdr")
endif()
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why these branches should be duplicated

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

Successfully merging this pull request may close these issues.

Support for GNURadio 3.9.x
7 participants