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

(Suggestion) Add AntSDR support #5

Open
alphafox02 opened this issue Jan 20, 2024 · 13 comments
Open

(Suggestion) Add AntSDR support #5

alphafox02 opened this issue Jan 20, 2024 · 13 comments

Comments

@alphafox02
Copy link

alphafox02 commented Jan 20, 2024

The AntSDR e200 is very similar to the b210. If perhaps you can make a branch/docker with this modified uhd I can test w/ my AntSDR e200. It is reachable on a network connection so that may be a consideration for how the docker is configured.

https://github.com/MicroPhase/antsdr_uhd

I’ve not looked closely at your recent updates, so this is just a suggestion that may or may not work. Looking forward to testing outside with my sdrplay Duo asap.

@30hours
Copy link
Owner

30hours commented Jan 21, 2024

It appears the AntSDR E200 works directly with the UHD drivers provided by Ettus (as commands like uhd_find_devices work). In that case, this SDR should work directly too! In the config/ folder use the config-usrp.yml file, and playing around with the device parameters should get it working. If not please post error messages and I can put fixes in. Our dollar is terrible at the moment so I'll try and see if I can borrow one.

@alphafox02
Copy link
Author

The AntSDR only works with UHD if the modified MicroPhase branch is used as linked above. If that’s not needed within the docker, great, because the modified UHD is already in DragonOS natively and I can go test it myself now.

@alphafox02
Copy link
Author

alphafox02 commented Jan 21, 2024

I took a peek at the docker file

libuhd-dev=4.6.0.0-0ubuntu1~jammy1 
uhd-host=4.6.0.0-0ubuntu1~jammy1 

It would not work as is, would need modified to build the uhd linked above. Preferably a branch off main. I’ll mess around with it when I get a chance.

@30hours
Copy link
Owner

30hours commented Jan 22, 2024

Looks like you’ll have to build the modified UHD from source then since there’s no package equivalent. This will add ~30 mins to the build time, but I can put a Dockerfile together to build for the AntSDR - stay tuned.

@30hours
Copy link
Owner

30hours commented Jan 27, 2024

Building the modified UHD from source takes around 30 mins, but let me know how it goes.
https://github.com/30hours/blah2/tree/antsdr_e200
Updated Dockerfile to build from source, added a new config file and run off the new config in docker-compose.yml.

@alphafox02
Copy link
Author

It might be that it's just late, so I'll take another look in the morning. It seems the docker on the antsdr branch is still showing
git clone https://github.com/EttusResearch/uhd /opt/uhd \ on line 34.

@30hours
Copy link
Owner

30hours commented Jan 27, 2024

Nah you're right - completely messed up my one job. Let me just change the repo and rebuild.

@30hours
Copy link
Owner

30hours commented Jan 27, 2024

Getting a weird versioning error when building with CMake - the AntSDR code doesn't seem to like the following line:
find_package(UHD "4.1.0.0" CONFIG REQUIRED)

Tried removing the version, unless it's named something else in CMake? I'll have another stab tomorrow, but pushing changes in.

#28 0.375 -- The C compiler identification is GNU 11.4.0 #28 0.436 -- The CXX compiler identification is GNU 11.4.0 #28 0.444 -- Detecting C compiler ABI info #28 0.521 -- Detecting C compiler ABI info - done #28 0.530 -- Check for working C compiler: /usr/bin/cc - skipped #28 0.530 -- Detecting C compile features #28 0.531 -- Detecting C compile features - done #28 0.534 -- Detecting CXX compiler ABI info #28 0.620 -- Detecting CXX compiler ABI info - done #28 0.631 -- Check for working CXX compiler: /usr/bin/c++ - skipped #28 0.631 -- Detecting CXX compile features #28 0.631 -- Detecting CXX compile features - done #28 0.640 -- Looking for pthread.h #28 0.732 -- Looking for pthread.h - found #28 0.733 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD #28 0.841 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success #28 0.842 -- Found Threads: TRUE #28 0.880 -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") #28 0.881 -- Found httplib: /blah2/lib/vcpkg_installed/x64-linux/include/httplib.h (found version "0.12.2") #28 0.889 CMake Error (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message): #28 0.889 The package name passed to find_package_handle_standard_args(PkgConfig) #28 0.889 does not match the name of the calling package (UHD). This can lead to #28 0.889 problems in calling code that expectsfind_packageresult variables #28 0.889 (e.g.,_FOUND) to follow a certain pattern. #28 0.889 Call Stack (most recent call first): #28 0.889 /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) #28 0.889 /opt/uhd/lib/cmake/uhd/UHDConfig.cmake:42 (include) #28 0.889 /opt/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package) #28 0.889 CMakeLists.txt:19 (find_package) #28 0.889 This error is for project developers. Use -Wno-error=dev to suppress it. #28 0.889 #28 0.889 -- Configuring incomplete, errors occurred! #28 0.889 See also "/blah2/build/prod-release/CMakeFiles/CMakeOutput.log". #28 ERROR: process "/bin/sh -c mkdir -p build && cd build && cmake -S . --preset prod-release -DCMAKE_PREFIX_PATH=/blah2/lib/vcpkg_installed/x64-linux/share .. && cd prod-release && make" did not complete successfully: exit code: 1

30hours added a commit that referenced this issue Jan 27, 2024
@alphafox02
Copy link
Author

I'll have to jump to a different system. My one 22.04 Host while trying to build main or the ant branch is giving me issues at the moment.

 > [blah2 blah2_env 6/8] RUN cd /blah2/lib && vcpkg integrate install   && vcpkg install --clean-after-build:                        
0.281 Applied user-wide integration for this vcpkg root.                                                                             
0.281 CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake"                                
1.784 /opt/vcpkg/.vcpkg-root: error: Failed to take the filesystem lock                                                              
1.784     Device or resource busy
------
failed to solve: process "/bin/sh -c cd /blah2/lib && vcpkg integrate install   && vcpkg install --clean-after-build" did not complete successfully: exit code: 1

30hours added a commit that referenced this issue Jan 28, 2024
@30hours
Copy link
Owner

30hours commented Jan 28, 2024

I can suppress the error and get the find_package(UHD ..) line to complete, but now I'm getting errors from including #include <uhd/usrp/multi_usrp.hpp> - may be more difficult without delving into the AntSDR changes in more detail.

Not sure about the lock file issue, my host is 22.04 as well. Try sudo docker system prune -a to clear all cache?

@alphafox02
Copy link
Author

I read this,
microsoft/vcpkg#12286
Was lazy and just did a reboot, that fixed it, building your latest main before trying AntSDR now.

@alphafox02
Copy link
Author

Off topic, but it appears this 3.12 API is far more stable. I managed one time so far to get the blah2 container to start, but the Duo was not usable. Stopped the container and ran SoapySDRUtil --find which just kind of hung (not a surprise to me). So I ran sudo systemctl restart sdrplay.service which also just looked to be hanging, but i waited maybe a minute and it eventually completed. I think in the past I've had to kill the service manually and then restart to get SDRPlay equipment back and usable.

After the restart I've started and stopped the container like 5 times, even pulled out the usb connector and plugged back in. I've not been able to get the SDRplay service to hang again.

@30hours
Copy link
Owner

30hours commented Jan 28, 2024

That's great to hear - during development I often had to restart the SDRplay service and wait the ~2 minutes for it to restart. Tried it just then and you're right, seems to be instantly restarting which is great.

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

2 participants