mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-27 15:26:33 -04:00
LimeSDR support (3)
This commit is contained in:
parent
e96a7294dd
commit
70971eb9ad
@ -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>
|
<h2>LimeSDR</h2>
|
||||||
|
|
||||||
|
Linux only.
|
||||||
|
|
||||||
⚠ This is a wotk in progress
|
⚠ This is a wotk in progress
|
||||||
|
|
||||||
You will need a minimal installation of LimeSuite:
|
You will need a minimal installation of LimeSuite:
|
||||||
@ -91,6 +93,10 @@ You will need a minimal installation of LimeSuite:
|
|||||||
- `make -j8`
|
- `make -j8`
|
||||||
- `make install`
|
- `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>
|
<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.
|
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.
|
||||||
|
@ -7,13 +7,9 @@ IF (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
|
|||||||
ENDIF (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
|
ENDIF (LIMESUITE_INCLUDE_DIR AND LIMESUITE_LIBRARY)
|
||||||
|
|
||||||
IF (LIMESUITE_FOUND)
|
IF (LIMESUITE_FOUND)
|
||||||
IF (NOT LimeSuite_FIND_QUIETLY)
|
MESSAGE (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}")
|
||||||
MESSAGE (STATUS "Found Lime Suite: ${LIMESUITE_INCLUDE_DIR}, ${LIMESUITE_LIBRARY}")
|
|
||||||
ENDIF (NOT LimeSuite_FIND_QUIETLY)
|
|
||||||
ELSE (LIMESUITE_FOUND)
|
ELSE (LIMESUITE_FOUND)
|
||||||
IF (LimeSuite_FIND_REQUIRED)
|
MESSAGE (STATUS "Could not find Lime Suite")
|
||||||
MESSAGE (FATAL_ERROR "Could not find Lime Suite")
|
|
||||||
ENDIF (LimeSuite_FIND_REQUIRED)
|
|
||||||
ENDIF (LIMESUITE_FOUND)
|
ENDIF (LIMESUITE_FOUND)
|
||||||
|
|
||||||
mark_as_advanced(LIMESUITE_INCLUDE_DIR LIMESUITE_LIBRARY)
|
mark_as_advanced(LIMESUITE_INCLUDE_DIR LIMESUITE_LIBRARY)
|
||||||
|
@ -13,11 +13,12 @@ if(LIBUSB_FOUND AND LIBHACKRF_FOUND)
|
|||||||
endif(LIBUSB_FOUND AND LIBHACKRF_FOUND)
|
endif(LIBUSB_FOUND AND LIBHACKRF_FOUND)
|
||||||
|
|
||||||
find_package(LimeSuite)
|
find_package(LimeSuite)
|
||||||
if(LIMESUITE_FOUND AND LIBHACKRF_FOUND)
|
if(LIBUSB_FOUND AND LIMESUITE_FOUND)
|
||||||
add_subdirectory(limesdr)
|
add_subdirectory(limesdr)
|
||||||
endif(LIMESUITE_FOUND AND LIBHACKRF_FOUND)
|
endif(LIBUSB_FOUND AND LIMESUITE_FOUND)
|
||||||
|
|
||||||
if (BUILD_DEBIAN)
|
if (BUILD_DEBIAN)
|
||||||
add_subdirectory(bladerf)
|
add_subdirectory(bladerf)
|
||||||
add_subdirectory(hackrf)
|
add_subdirectory(hackrf)
|
||||||
|
add_subdirectory(limesdr)
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
@ -23,6 +23,9 @@ include_directories(
|
|||||||
)
|
)
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
add_definitions(-DQT_SHARED)
|
||||||
|
|
||||||
add_library(limesdrdevice SHARED
|
add_library(limesdrdevice SHARED
|
||||||
${limesdrdevice_SOURCES}
|
${limesdrdevice_SOURCES}
|
||||||
)
|
)
|
||||||
|
@ -21,13 +21,13 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
|
|||||||
{
|
{
|
||||||
if (LMS_Open(&m_dev, deviceStr, 0))
|
if (LMS_Open(&m_dev, deviceStr, 0))
|
||||||
{
|
{
|
||||||
QDebug() << "DeviceLimeSDRParams::open: cannot open device " << deviceStr;
|
qDebug() << "DeviceLimeSDRParams::open: cannot open device " << deviceStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LMS_Init(m_dev) != 0)
|
if (LMS_Init(m_dev) != 0)
|
||||||
{
|
{
|
||||||
QDebug() << "DeviceLimeSDRParams::open: cannot init device " << deviceStr;
|
qDebug() << "DeviceLimeSDRParams::open: cannot init device " << deviceStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,59 +35,59 @@ bool DeviceLimeSDRParams::open(lms_info_str_t deviceStr)
|
|||||||
|
|
||||||
if ((n = LMS_GetNumChannels(m_dev, LMS_CH_RX)) < 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_nbRxChannels = n;
|
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)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_nbTxChannels = n;
|
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)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LMS_GetLPFBWRange(m_dev, LMS_CH_TX, &m_lpfRangeTx) != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LMS_GetLOFrequencyRange(m_dev, LMS_CH_RX, &m_lpfRangeRx) != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LMS_GetLOFrequencyRange(m_dev, LMS_CH_TX, &m_lpfRangeTx) != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LMS_GetSampleRateRange(m_dev, LMS_CH_RX, &m_srRangeRx) != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LMS_GetSampleRateRange(m_dev, LMS_CH_TX, &m_srRangeTx) != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user