- Notifications
You must be signed in to change notification settings - Fork1
Julia package to monitor various Software Defined Radios in a common API
License
JuliaTelecom/AbstractSDRs.jl
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This package proposes a single API to monitor different kind of Software Defined Radio. We define several SDR backends that can be piloted by the same API. With AbstractSDRs, the following SDRs can be used
- All Universal Software Radio PeripheralUSRP, based onUHDBindings package
- RTL SDR dongle, with inclusion ofRTLSDR package
- Any device connected to a remote PC with a network connection (for instance, Exxx USRP device) on which a Julia session works and run AbstractSDRs package.
- The ADALM Pluto SDR, throughAdalmPluto
- A pure simulation package (RadioSims.jl) useful for testing without radio or do re-doing offline dataflow processing populated by a given buffer
AbstractSDRs provides an unified API to open, transmit and received samples and close the SDRs.
For instance, in order to get 4096 samples at 868MHz with a instantaneous bandwidth of 16MHz, with a 30dB Rx Gain, assuming that a USRP is connected, the following Julia code will do the trick and returns a vector with type Complex{Cfloat} with 4096 samples.
function main()# ---------------------------------------------------- # --- Physical layer and RF parameters # ---------------------------------------------------- carrierFreq= 868e6;# --- The carrier frequency samplingRate= 16e6; # --- Targeted bandwdith rxGain= 30.0; # --- Rx gain nbSamples= 4096; # --- Desired number of samples# ---------------------------------------------------- # --- Getting all system with function calls # ---------------------------------------------------- # --- Creating the radio ressource # The first parameter is to tune the Rx boardradio= openSDR(:uhd,carrierFreq,samplingRate,rxGain);# --- Display the current radio configurationprint(radio);# --- Getting a buffer from the radio sig= recv(radio,nbSamples);# --- Release the radio ressourcesclose(radio); # --- Output to signal return sig;endNote that the SDR discrimination is done through the "UHDRx" parameter when opening the device, which states here that the UHD driver should be used, and that the radio will receive samples.To get the same functionnality with a Adalm Pluto dongle, the same code can be used, changing onlyradio= openSDR(:uhd,carrierFreq,samplingRate,rxGain); byradio= openSDR(:pluto,carrierFreq,samplingRate,rxGain);
The package can be installed with the Julia package manager.From the Julia REPL, type] to enter the Pkg REPL mode and run:
pkg> add AbstractSDRsOr, equivalently, via thePkg API:
julia>import Pkg; Pkg.add("AbstractSDRs")
If you useAbstractSDRs.jl we encourage you to cite this work that you can findon HAL:
@InProceedings{Lavaud2021, author = {Lavaud, C and \textbf{Gerzaguet, R} and Gautier, M and Berder, O.}, title = {{AbstractSDRs: Bring down the two-language barrier with Julia Language for efficient SDR prototyping}}, booktitle = {IEEE Embedded Systems Letters (ESL)}, year = {2021}, doi = {10.1109/LES.2021.3054174},}AbstractSDRs wraps and implements different SDR backends that can be used when opening a radio device. The current list of supported SDR backends can be obtained viagetSupportedSDRs.When instantiate a radio device (withopenSDR), the first argument is the radio backend and parameters associated to a specific backend can be used with keywords.Some specific functions can also be exported based in the selected backend. The list is given in the sub-backend part
AbstractSDRs can be used with Universal Radio Peripheral (USRP) with the use ofUHDBindings.jl package. The backend is identified by the symbol:uhd. This backend supports ths following keywords
args=""to specify any UHD argument in initialisation. Please refer to the UHD doc. For instance, FPGA bitstream path can be specified withargs="fgpa=path/to/image.bit". The IP address of the USRP can be added withargs="addr=192.168.10.xx".
AbstractSDRs package also exports the following specific functions
- NONE.
This backend is useful when one wants to test a processing chain without having a radio as it simulates the behaviour of a SDR (configuration and buffer management). It is also useful when you have some acquisition in a given file (or buffer) as we can give the radio device a buffer which is then used to provide samples (asrecv gives chunk of this buffer based on the desired size in a circular manner).
This backend supports ths following keywords
packetSizeto specify the size of each packet given by the radio. By default the value is 1024 complex samplesbufferto give to the radio a buffer to be used when emulating the reception. The following rules occur- If
packetSizeis not given, the provided buffer will bebuffereach time therecvcommand is used - If
packetSizeis higher than the size of the proposed buffer, the buffer will be circulary copied to provivepacketSizecomplex samples - If
packetSizeis lower than the size of the proposed buffer,recvwill returnspacketSizesamples frombufferand the buffer will be browsed cicularly - If no buffer is given,
packetSizerandom data will be generated at the init of the radio and proposed each timerecvis calledAbstractSDRs package also exports the following specific functions related to RadioSims
- If
updatePacketSizeto update the size of the radio packet.updateBufferto update the radio buffer
This backend can be used with ADALM Pluto SDR device.
- STABLE —documentation of the most recently tagged version.
- 0.5.1 : Correct potential bug in data overflow for bladeRF backend
About
Julia package to monitor various Software Defined Radios in a common API
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
