aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bladerf/bladerf_source_c.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-07-07bladeRF: allow setting reference frequencyJan Hrach1-0/+9
2022-06-10bladeRF: calculate number of samples based on stream countRobert Ghilduta1-1/+1
2022-06-10bladeRF: enable and disable each channelRobert Ghilduta1-5/+3
2020-11-01Replace BOOST_FOREACH with range-based for loopsClayton Smith1-2/+2
Range-based for loops are available since C++11. Using them reduces gr-osmosdr's dependence on Boost. Here I've done the replacement using a global search-and-replace. Signed-off-by: Eric Wild <ewild@sysmocom.de>
2018-08-15bladerf: update bladerf to catch up with libbladeRFRobert Ghilduta1-2/+2
2018-08-15bladeRF: add support for biastee on bladeRF microRey Tucker1-0/+25
2018-08-15bladerf: compatibility with older libbladeRFRey Tucker1-1/+2
Implement compatibility with older libbladeRF versions
2018-08-15bladerf: add support for MIMORey Tucker1-167/+381
Squashed commit of rtucker-bladerf-hierarchy branch: commit 35442da7d390919f6f9cbae3f69d6dc32ca595bb through commit 9026136cfdbc7116f55af18cb06d1731330fa13f
2018-08-15bladerf: use nchan option to enable multi-channelsRyan Tucker1-17/+23
By default, the bladeRF source and sink will expose 1 channel, unless nchan is set, in which case it will expose either that number of channels, or the number of channels supported by the device if lesser. If nchan > 1 (after validation), MIMO mode is enabled.
2018-08-15bladerf: formatting/consistency fixesRyan Tucker1-119/+144
2018-08-15bladerf: replace bladerf_module with bladerf_directionRyan Tucker1-10/+10
More closely matches the handling in the API
2018-08-15bladeRF: fix identification of channelsRyan Tucker1-14/+15
2018-08-15bladeRF: remove set_bb_gainRyan Tucker1-5/+0
This is not meaningful with bladeRF hardware
2018-08-15update copyright datesRey Tucker1-1/+1
2018-08-15WIP: more port workRyan Tucker1-2/+6
2018-08-15bladerf: initial support for new bladeRF hardwareRey Tucker1-155/+21
Relies on some new libbladeRF API calls. Has been tested with gqrx on new bladeRF hardware (as a source) but have not yet tested sink, or existing bladeRF hardware.
2017-02-27bladeRF: Use VOLK for type conversionSylvain Munaut1-15/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-02-28bladerf: implement options for clock configurationDimitri Stolnikov1-0/+15
Since firmware 2016.01-rc1 bladeRF has the ability to lock to an external reference as well as produce arbitrary frequency signal (25 MHz here) on its clock output. Use gr-osmosdr source with the following arguments to produce 25 MHz on the SMB connector: osmocom_fft -a bladerf,smb=25e6 smb=25e6 To lock the bladeRF itself to an external GPSDO reference, use additional arguments tamer=external for 10MHz or tamer=external_1pps for 1PPS GPSDO signals. osmocom_fft -a bladerf,smb=25e6,tamer=external tamer={internal,external_1pps,external} The described method requires https://github.com/Nuand/bladeRF/releases/ tag/2016.01-rc1 Carefully *read the instructions for external reference locking* (especially max allowed voltage levels) on Nuand's blog https:// www.nuand.com/blog/2016-01-rc1-release/
2015-07-17bladeRF: Added SOB/EOB stream tag handling support to bladerf_sinkJon Szymaniak1-1/+9
When running with metadata mode enabled, the bladerf_sink supports 'tx_sob' and 'tx_eob' stream tags. Anything not in the burst will be dropped, and a warning will be printed. Use of the bladeRF metadata can be enabled via a 'enable_metadata' device argument. If running full-duplex, this must be provided to both the source and the sink. This does not currently any additional features to the sink.
2015-01-10bladerf: include rxvga1 to the BB gain settingDimitri Stolnikov1-5/+19
Patch provided by Samu Laaja
2014-11-03bladeRF: Don't fail out until 3 consecutive errors have occurredJon Szymaniak1-1/+11
This change is intended to make the bladeRF source/sink implementations slightly more resilient to any transient issues in a flow graph. For poor choices of buffers/transfers or under high CPU load, an RX or TX operation might time out. Instead of immediately reporting WORK_DONE and bailing out, an error message is now printed and the device will attempt to continue transmitting/receiving samples. After 3 consecutive errors have occurred on an RX/TX operation, the device will report WORK_DONE; in this situation, something is likely very wrong.
2014-11-03bladeRF: Removed unused bladerf_metadata parameter from rx/tx callsJon Szymaniak1-2/+1
It is safe (and preferred) to pass NULL for the metadata paremeter when using a format that does utilize the metadata structure.
2014-03-10bladerf: Updated source/sink to use libbladeRF's sync interfaceBrian Padalino1-170/+36
2014-02-16bladeRF: RXVGA2 range is [0, 30]Jon Szymaniak1-1/+1
While the RXVGA2 gain can technically go up to 60 dB, the LMS6002D datasheet recommends it be clamped to 30dB. libbladeRF clamps to a max of 30dB, so there's no use in setting max to 60 dB here.
2014-01-18bladeRF: Modifying correction calls.Brian Padalino1-25/+2
Modifying correction function calls to match libbladeRF API.
2014-01-13bladerf: Removed sign extension and masking of samplesJon Szymaniak1-10/+17
This is no longer required as of FPGA v0.0.1, and has been removed to remove some unnecessary computation on samples.
2014-01-13bladerf: Updates for libbladeRF v0.11.0 API changesJon Szymaniak1-5/+11
2014-01-13bladerf: Use rational sample rate functionsJon Szymaniak1-34/+2
libbladeRF provides accessors for rational sample rates, which the integer sample rate functions use under the hood. Therefore, there's no need to check if the requested rate contains a fractional portion and switch between the two sets of functions.
2014-01-13bladerf: Added start()/stop() implementationsJon Szymaniak1-28/+46
2014-01-11bladerf: implement DC offset and IQ imbalance correctionDimitri Stolnikov1-9/+39
This patch has been provided by Brent J.
2013-12-28bladerf: prepare functions to control DC offset / IQ balance (WIP)Dimitri Stolnikov1-0/+39
2013-10-30bladerf: Moved initializations to bladerf_common.c, misc. cleanupJon Szymaniak1-108/+44
Common parameter handling has been moved into bladerf_common::init(). The buflen parameter is now in units of samples, not bytes. This deviates from the other gr-osmosdr items. However, with the requirement that buffers be in multiples of 1024 samples, this makes specifying this parameter a bit easier. The user shouldn't need to know we're operating on SC16Q12 values under the hood, and have to calculate accordingly. To avoid confusion when both a bladeRF source and sink are in a flow graph a [bladeRF source/sink] prefix has been added to output. Error number have been replaced with bladeRF string representations of these error values. Firmware flashing has been removed. The bladeRF-cli or bladeRF-flash tools are the preferred route for firmware upgrades.
2013-10-30bladerf: Moved no longer "common" items out of bladerf_commonJon Szymaniak1-0/+34
The gr_complex FIFO is no longer used on the TX side, so it doesn't really make sense to have it in bladerf_common. The associated items have been moved into bladerf_source, and some renaming has been done in bladerf_sink to tidy up. Pending further performance tests of the bladerf_source, the _fifo member (boost::circular_buffer) may need to be replaced.
2013-10-29bladerf: Added device caching, this enables full-duplex operation.Daniel Gröber1-30/+27
2013-10-04bladerf: use newstyle version gettersDimitri Stolnikov1-5/+5
2013-10-03bladerf: make source less picky wrt rf gainDimitri Stolnikov1-10/+7
2013-09-28bladerf: implement automatic bandwidth selectionDimitri Stolnikov1-0/+3
2013-09-28bladerf: migration to async api (WIP)Dimitri Stolnikov1-128/+144
receive works, transmit locks up in work() after few seconds
2013-08-29Support setting external sampling to bladerfFrederik M.J. Vestre1-0/+20
2013-08-27bladerf: follow recent API changesDimitri Stolnikov1-22/+22
tested against aea04c5f119288370166ece05166a8a4157da6fa
2013-07-26bladerf: migrate to new api to enable/disable TX/RX modulesDimitri Stolnikov1-3/+13
TX support has been verified with osmocom_siggen and fpga image from git f6c6a3abcb22d2794946e5adbc556805a73788a3
2013-07-21bladerf: add support for nuand LLC bladeRF (WIP)Dimitri Stolnikov1-0/+584
This is based on the original work (https://github.com/Nuand/gr-osmosdr) done by folks at nuand LLC for the gr3.6 branch of gr-osmosdr. The following modifications have been done in this commit: * port to gr-osmosdr master codebase (gr3.7) * moved shared properties to bladerf_common * added & verified IF filter bandwidth setters * set LMS6002D registers with values taken from FAQ 5.27 * print device information (serial/versions) on startup * added fpga= and fw= device arguments to program MCU/FPGA * added bladerf=# dev. arg. to select a specific bladeRF * grc gain field controls RF path VGA for RX/TX * grc BB gain field controls BB path VGA for RX/TX Usage example: osmocom_fft -a "bladerf,fpga=/tmp/hostedx115.rbf" The following RX named gain stages are available: LNA: 0 to 6 dB, in 3dB steps VGA1: 5 to 30 dB, in 1dB steps; nonlinear mapping done inside the lib VGA2: 0 to 60 dB, in 3dB steps; not recommended to be used above 30dB The following TX named gain stages are available: VGA1: -35 to -4 dB, in 1dB steps, BB side VGA2: 0 to 25 dB, in 1dB steps, RF side Thanks a lot to the team of nuand LLC for this major contribution.