LimeSDR support (3)

pull/27/head
f4exb 2017-04-11 22:26:42 +02:00
rodzic e96a7294dd
commit 70971eb9ad
5 zmienionych plików z 26 dodań i 20 usunięć

Wyświetl plik

@ -78,6 +78,8 @@ HackRF is better used with a sampling rate of 4.8 MS/s and above. The 2.4 and 3.
<h2>LimeSDR</h2>
Linux only.
&#9888; This is a wotk in progress
You will need a minimal installation of LimeSuite:
@ -91,6 +93,10 @@ You will need a minimal installation of LimeSuite:
- `make -j8`
- `make install`
Then add the following defines on `cmake` command line:
`-DLIMESUITE_INCLUDE_DIR=/opt/install/LimeSuite/include -DLIMESUITE_LIBRARY=/opt/install/LimeSuite/lib/libLimeSuite.so`
<h2>RTL-SDR</h2>
RTL-SDR based dongles are supported through the librtlsdr library that should be installed in your system for proper build of the software and operation support. Add `librtlsdr-dev` to the list of dependencies to install.

Wyświetl plik

@ -7,13 +7,9 @@ IF (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
ENDIF (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
IF (LIMESUITE_FOUND)
IF (NOT LimeSuite_FIND_QUIETLY)
MESSAGE (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}")
ENDIF (NOT LimeSuite_FIND_QUIETLY)
MESSAGE (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}")
ELSE (LIMESUITE_FOUND)
IF (LimeSuite_FIND_REQUIRED)
MESSAGE (FATAL_ERROR "Could not find Lime Suite")
ENDIF (LimeSuite_FIND_REQUIRED)
MESSAGE (STATUS "Could not find Lime Suite")
ENDIF (LIMESUITE_FOUND)
mark_as_advanced(LIMESUITE_INCLUDE_DIR LIMESUITE_LIBRARY)

Wyświetl plik

@ -13,11 +13,12 @@ if(LIBUSB_FOUND AND LIBHACKRF_FOUND)
endif(LIBUSB_FOUND AND LIBHACKRF_FOUND)
find_package(LimeSuite)
if(LIMESUITE_FOUND AND LIBHACKRF_FOUND)
if(LIBUSB_FOUND AND LIMESUITE_FOUND)
add_subdirectory(limesdr)
endif(LIMESUITE_FOUND AND LIBHACKRF_FOUND)
endif(LIBUSB_FOUND AND LIMESUITE_FOUND)
if (BUILD_DEBIAN)
add_subdirectory(bladerf)
add_subdirectory(hackrf)
add_subdirectory(limesdr)
endif (BUILD_DEBIAN)

Wyświetl plik

@ -23,6 +23,9 @@ include_directories(
)
endif (BUILD_DEBIAN)
add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_SHARED)
add_library(limesdrdevice SHARED
${limesdrdevice_SOURCES}
)

Wyświetl plik

@ -21,13 +21,13 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
{
if (LMS_Open(&m_dev, deviceStr, 0))
{
QDebug() << "DeviceLimeSDRParams::open: cannot open device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot open device " << deviceStr;
return false;
}
if (LMS_Init(m_dev) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot init device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot init device " << deviceStr;
return false;
}
@ -35,59 +35,59 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
if ((n = LMS_GetNumChannels(m_dev, LMS_CH_RX)) < 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the number of Rx channels for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the number of Rx channels for device " << deviceStr;
return false;
}
else
{
m_nbRxChannels = n;
QDebug() << "DeviceLimeSDRParams::open: " << n << " Rx channels for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: " << n << " Rx channels for device " << deviceStr;
}
if ((n = LMS_GetNumChannels(m_dev, LMS_CH_TX)) < 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the number of Tx channels for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the number of Tx channels for device " << deviceStr;
return false;
}
else
{
m_nbTxChannels = n;
QDebug() << "DeviceLimeSDRParams::open: " << n << " Tx channels for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: " << n << " Tx channels for device " << deviceStr;
}
if (LMS_GetLPFBWRange(m_dev, LMS_CH_RX, &m_lpfRangeRx) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the Rx LPF range for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the Rx LPF range for device " << deviceStr;
return false;
}
if (LMS_GetLPFBWRange(m_dev, LMS_CH_TX, &m_lpfRangeTx) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the Tx LPF range for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the Tx LPF range for device " << deviceStr;
return false;
}
if (LMS_GetLOFrequencyRange(m_dev, LMS_CH_RX, &m_lpfRangeRx) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the Rx LO range for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the Rx LO range for device " << deviceStr;
return false;
}
if (LMS_GetLOFrequencyRange(m_dev, LMS_CH_TX, &m_lpfRangeTx) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the Tx LO range for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the Tx LO range for device " << deviceStr;
return false;
}
if (LMS_GetSampleRateRange(m_dev, LMS_CH_RX, &m_srRangeRx) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the Rx sample rate range for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the Rx sample rate range for device " << deviceStr;
return false;
}
if (LMS_GetSampleRateRange(m_dev, LMS_CH_TX, &m_srRangeTx) != 0)
{
QDebug() << "DeviceLimeSDRParams::open: cannot get the Tx sample rate range for device " << deviceStr;
qDebug() << "DeviceLimeSDRParams::open: cannot get the Tx sample rate range for device " << deviceStr;
return false;
}