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

Unknown update #5

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
49f2998
got tx working
Mar 10, 2022
4534ca1
modified rcv test
Mar 10, 2022
e571e12
changing Rx/Tx to different buffer scheme
Mar 11, 2022
bb64ade
got rx working with any even number of words
Mar 11, 2022
6ff66ba
making of peak scan
Apr 19, 2022
6ca5493
cleaned up peak scan
Apr 20, 2022
c32d461
making install shell
Apr 20, 2022
f750c7e
get working on other architectures than x86_64
Apr 20, 2022
e821c63
remove the epiq directories
Apr 20, 2022
e3b2921
needed the iio library in CMakeLists.txt
Apr 20, 2022
c415a3b
fix FindSidekiq.cmake to work on x86 and arm
Apr 25, 2022
b8f7eb0
fixing x86 and arm builds
Apr 25, 2022
f871e45
adding gps
May 19, 2022
0142103
added gps to peak_scan
May 20, 2022
6c62603
gps not required
May 23, 2022
08750a7
making peak_scan apps
May 24, 2022
fa62d6c
cleanup handling of skiq calls
May 24, 2022
dae8bd1
modify to use card number in both apps
Jun 3, 2022
e8d3d37
get SoapySidekiq working with GNURadio Soapy custom block
Jul 13, 2022
f48f665
fixing to work with any size buffer
Jul 13, 2022
442e916
update to get GNRRadio custom soapySDR blocks to work.
Jul 18, 2022
dc940c5
modify writeStream to support any packet size
Jul 18, 2022
ca7add4
cleaning up GNURadio soapy interface
Jul 25, 2022
e849ab3
cleaning up tx to go into master
Jul 25, 2022
e4dc619
more cleanup
Jul 25, 2022
598a684
clean up peak_scan
Jan 11, 2023
5966cea
cleaned up peak_scan for release
Jan 12, 2023
3bab1bc
fixing the installer for z3u
Jan 12, 2023
44e392a
make skiq_receive blocking by calling skiq_rx_transfer_timeout
Jan 12, 2023
da605ce
need to deal with skiq_receive status of -1
Jan 12, 2023
ee4a036
got CF32 mode working, and got sigdigger working with it
Jan 23, 2023
a76bede
cleanup trace on all functions
Jan 24, 2023
79b06fe
use clang format to get formatting to my normal
Jan 24, 2023
3aef56b
unknown changes
May 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf

#unique things to ignore
*.swp
.cache/*
build/*
*.json

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if (NOT Sidekiq_FOUND)
endif ()
message(STATUS "Sidekiq_INCLUDE_DIRS - ${Sidekiq_INCLUDE_DIRS}")
message(STATUS "Sidekiq_LIBRARIES - ${Sidekiq_LIBRARIES}")
message(STATUS "OTHER_LIBS - ${OTHER_LIBS}")

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${Sidekiq_INCLUDE_DIRS})
Expand Down Expand Up @@ -61,4 +62,4 @@ SOAPY_SDR_MODULE_UTIL(
/usr/lib/epiq/libusb-1.0.so
/usr/lib/epiq/libglib-2.0.so
-lrt
)
)
56 changes: 46 additions & 10 deletions FindSidekiq.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,58 @@ if(NOT Sidekiq_FOUND)
find_path(Sidekiq_INCLUDE_DIR
NAMES sidekiq_api.h
HINTS ${Sidekiq_PKG_INCLUDE_DIRS} $ENV{Sidekiq_DIR}/include
PATHS /usr/local/include /usr/include /opt/include /opt/local/include)
PATHS ~/sidekiq_sdk_current/sidekiq_core/inc/ /usr/local/include /usr/include /opt/include /opt/local/include)

execute_process (
COMMAND uname -m
OUTPUT_VARIABLE outVar
)

message(STATUS "type ${outVar}")

if(${outVar} MATCHES "x86_64")
set (libname "libsidekiq__x86_64.gcc.a")
set (otherlib "none")
else()
set(libname "libsidekiq__aarch64.gcc6.3.a")
set(otherlib "libiio.so")
endif()

message(STATUS "library is ${libname} ")
message(STATUS "otherlib is ${otherlib} ")

find_library(Sidekiq_LIBRARY
NAMES libsidekiq__x86_64.gcc.a
HINTS ${Sidekiq_PKG_LIBRARY_DIRS} $ENV{Sidekiq_DIR}/include
PATHS /usr/local/lib /usr/lib /opt/lib /opt/local/lib)
NAMES ${libname}
HINTS ${Sidekiq_PKG_LIBRARY_DIRS} $ENV{Sidekiq_DIR}/include
PATHS ~/sidekiq_sdk_current/lib/ /usr/local/lib /usr/lib /opt/lib /opt/local/lib)


set(Sidekiq_LIBRARIES ${Sidekiq_LIBRARY})
set(Sidekiq_INCLUDE_DIRS ${Sidekiq_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LibSidekiq_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Sidekiq DEFAULT_MSG
Sidekiq_LIBRARY Sidekiq_INCLUDE_DIR)
if(${otherlib} MATCHES "libiio.so")
find_library(OTHER_LIBS
NAMES ${otherlib}
HINTS ${Sidekiq_PKG_LIBRARY_DIRS} $ENV{Sidekiq_DIR}/include
PATHS /usr/lib/epiq/ /usr/local/lib /usr/lib /opt/lib /opt/local/lib)

set(OTHER_LIBS ${OTHER_LIBS})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LibSidekiq_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Sidekiq DEFAULT_MSG
Sidekiq_LIBRARY Sidekiq_INCLUDE_DIR OTHER_LIBS)

mark_as_advanced(Sidekiq_INCLUDE_DIR Sidekiq_LIBRARY OTHER_LIBS)
else()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LibSidekiq_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Sidekiq DEFAULT_MSG
Sidekiq_LIBRARY Sidekiq_INCLUDE_DIR )

mark_as_advanced(Sidekiq_INCLUDE_DIR Sidekiq_LIBRARY)
mark_as_advanced(Sidekiq_INCLUDE_DIR Sidekiq_LIBRARY )
endif()

endif(NOT Sidekiq_FOUND)
136 changes: 83 additions & 53 deletions Registation.cpp
Original file line number Diff line number Diff line change
@@ -1,72 +1,102 @@
// Copyright [2018] <Alexander Hurd>"

#include <unistd.h>
#include "SoapySidekiq.hpp"
#include <SoapySDR/Registry.hpp>
#include <iostream>
#include <string>
#include <unistd.h>

static std::vector<SoapySDR::Kwargs> findSidekiq(const SoapySDR::Kwargs &args) {
std::vector<SoapySDR::Kwargs> results;

uint8_t number_of_cards = 0;
uint8_t card_list[SKIQ_MAX_NUM_CARDS];
char *serial_str;
pid_t card_owner;
skiq_xport_type_t type = skiq_xport_type_auto;
static std::vector<SoapySDR::Kwargs> findSidekiq(const SoapySDR::Kwargs &args)
{
int status = 0;
std::vector<SoapySDR::Kwargs> results;

/* query the list of all Sidekiq cards on the PCIe interface */
if(skiq_get_cards(type, &number_of_cards, card_list) != 0){
SoapySDR_log(SOAPY_SDR_ERROR, "Failure: skiq_get_cards");
}
SoapySDR::setLogLevel(SOAPY_SDR_TRACE);
SoapySDR_logf(SOAPY_SDR_TRACE, "findSidekiq");

for (int i = 0; i < number_of_cards; i++) {
SoapySDR::Kwargs devInfo;
bool deviceAvailable = false;
uint8_t number_of_cards = 0;
uint8_t card_list[SKIQ_MAX_NUM_CARDS];
char * serial_str;
pid_t card_owner;
skiq_xport_type_t type = skiq_xport_type_auto;

/* determine the serial number based on the card number */
if(skiq_read_serial_string(i, &serial_str) != 0){
SoapySDR_log(SOAPY_SDR_ERROR, "Failure: skiq_read_serial_string");
/* query the list of all Sidekiq cards on the PCIe interface */
status = skiq_get_cards(type, &number_of_cards, card_list);
if (status != 0)
{
SoapySDR_logf(SOAPY_SDR_ERROR, "Failure: skiq_get_cards, status %d",
status);
}

/* get card availability */
skiq_is_card_avail(i, &card_owner);
deviceAvailable = (card_owner == getpid()); // owner must be this process(pid)
if (!deviceAvailable) {
SoapySDR_logf(SOAPY_SDR_WARNING, "Unable to access card #%d, owner pid (%d)", i, card_owner);
}
for (int i = 0; i < number_of_cards; i++)
{
SoapySDR::Kwargs devInfo;
bool deviceAvailable = false;

std::string deviceLabel = "Epiq Solutions - Sidekiq :: " + std::string(serial_str);
/* determine the serial number based on the card number */
status = skiq_read_serial_string(card_list[i], &serial_str);
if (status != 0)
{
SoapySDR_logf(SOAPY_SDR_ERROR,
"Failure: skiq_read_serial_string, status %d",
status);
}

devInfo["card"] = std::to_string(i);
devInfo["label"] = deviceLabel;
devInfo["available"] = deviceAvailable ? "Yes" : "No";
devInfo["product"] = "Sidekiq";
devInfo["serial"] = std::string(serial_str);
devInfo["manufacturer"] = "Epiq Solutions";
SoapySidekiq::sidekiq_devices.push_back(devInfo);
}
/* get card availability */
skiq_is_card_avail(card_list[i], &card_owner);
deviceAvailable =
(card_owner == getpid()); // owner must be this process(pid)
if (!deviceAvailable)
{
SoapySDR_logf(SOAPY_SDR_WARNING,
"Unable to access card #%d, owner pid (%d)", card_list[i],
card_owner);
}

std::string deviceLabel =
"Epiq Solutions - Sidekiq :: " + std::string(serial_str);

devInfo["card"] = std::to_string(card_list[i]);
devInfo["label"] = deviceLabel;
devInfo["available"] = deviceAvailable ? "Yes" : "No";
devInfo["product"] = "Sidekiq";
devInfo["serial"] = std::string(serial_str);
devInfo["manufacturer"] = "Epiq Solutions";
SoapySidekiq::sidekiq_devices.push_back(devInfo);
}

// filtering
for (int i = 0; i < number_of_cards; i++) {
SoapySDR::Kwargs devInfo = SoapySidekiq::sidekiq_devices[i];
if (args.count("card") != 0) {
if (args.at("card") != devInfo.at("card")) {
continue;
}
SoapySDR_logf(SOAPY_SDR_DEBUG, "Found device by card %s", devInfo.at("card").c_str());
} else if (args.count("serial") != 0) {
if (devInfo.at("serial") != args.at("serial")) {
continue;
}
SoapySDR_logf(SOAPY_SDR_DEBUG, "Found device by serial %s", args.at("serial").c_str());
// filtering
for (int i = 0; i < number_of_cards; i++)
{
SoapySDR::Kwargs devInfo = SoapySidekiq::sidekiq_devices[i];
if (args.count("card") != 0)
{
if (args.at("card") != devInfo.at("card"))
{
continue;
}
SoapySDR_logf(SOAPY_SDR_DEBUG, "Found device by card %s",
devInfo.at("card").c_str());
}
else if (args.count("serial") != 0)
{
if (devInfo.at("serial") != args.at("serial"))
{
continue;
}
SoapySDR_logf(SOAPY_SDR_DEBUG, "Found device by serial %s",
args.at("serial").c_str());
}
results.push_back(SoapySidekiq::sidekiq_devices[i]);
}
results.push_back(SoapySidekiq::sidekiq_devices[i]);
}

return results;
return results;
}

static SoapySDR::Device *makeSidekiq(const SoapySDR::Kwargs &args) {
return new SoapySidekiq(args);
static SoapySDR::Device *makeSidekiq(const SoapySDR::Kwargs &args)
{
return new SoapySidekiq(args);
}

static SoapySDR::Registry registerSidekiq("sidekiq", &findSidekiq, &makeSidekiq, SOAPY_SDR_ABI_VERSION);
static SoapySDR::Registry registerSidekiq("sidekiq", &findSidekiq, &makeSidekiq,
SOAPY_SDR_ABI_VERSION);
Loading