BladeRF module
This module is used to create a JSRadio type object for the BladeRF hardware connected to the USB port.
Warning
Two different implementations are available for the BladeRF boards !
Transmit or receive only :
Your application does not require the same board to transmit and receive simultaneously. In this case, you can use the .makeDevice factory.
Full Duplex :
You have some tasks processing the reception continuously and want to transmit with the same board. Then you must use the .makeFDuxplexDevice factory.
.makeDevice
Creates a new BladeRF receiver or transmitter (not simultaneous, otherwise use .makeFDuxplexDevice) .
The returned object is of type JSRadio, refer to the Using radio introduction for examples.
var radio = BladeRF.makeDevice( { 'serial': '41b1e86b40c64bcabe43696f8f1ea962', 'device_name' : 'board0'} );
- Note: this command works when we have only one bladeRF card connected:
var rx = BladeRF.makeDevice({"device_name" : "bladerf"});
.makeFDuxplexDevice
This command takes the same arguments than .makeDevice, but it allocates a series of internal threads to handle the simultaneous receive & transmit functions,
Warning:
- Allocation takes time, up to 5 seconds to initiate the SDR Board
- Currently you MUST use the same sampling rates for Transmit and Receive.
- This mode requires more CPU as more tasks are created to handle the tx & rx streams.
The first call to open receive or transmit sets the TX/RX sampling rate.
On transmit :
- A FIFO queue is handled to receive the data from the SDRVM. It means that when you "push TX IQ" for transmition (see .txData call ), the call may return immediately if the FIFO is not full;
- Several tasks do handle the upconvertion.
.list
List the connected BladeRF cards.
Returns an array of objects with:
serial : serial number,
device_name : returned name by libBladeRF,
usb_bus : USB bus identification
usb_addr : device number on USB bus.
var list = BladeRF.list();
print('We have ' + list.length + ' boards.');
var x = list[0] ;
var radio = BladeRF.makeDevice( x );
Last update: March 26, 2023