Software Defined Radio API - SDRplay

Transcription

Software Defined Radio APISDRplay Limited.Software Defined Radio APIApplicationsRevision HistoryRevisionRelease Date:Reason for Change:1.026 May 2013Pre-Release 0.0.1APC1.108 August 2013Add reset functionAPC1.231 July 2014Extended frequency rangeAPC1.327 March 2015Updated error codes & tidy upAPC1.713 August 2015Added new commands & update mir sdr SetDcMode toadd missing modesIMH1.822 December 2015DC/IQ compensation & new gain mapAPC1.8.115 January 2016Tidy up textAPC1.9411th July 2016Range of new functionsAPCSeptember2016Added new AGC DC offset schemesAPC2.0422nd November 2016Update for RSP2KA2.0530th November 2016Modified return from mir sdr GetDevicesKA2.061th December 2016Added mir sdr ReleaseDeviceIdx, modified gaincallback parametersKA2.072nd December 2016Modified SetGr functionsKA2.0815th December 2016Fixed issue in IQ compensationKA1.97R2.1318thSDRplay LimitedOriginator1

Software Defined Radio APIUser GuideKA2.0922nd December 2016Modification to AGC loop (no external API mods)2.1115th November 2017Added support for RSP1AAPC2.1320th June 2018Added support for RSPduo (single tuner operation)APCR2.13SDRplay Limited2

Software Defined Radio APIUser GuideContents12Introduction . 5API Data Types. 62.1Error Code Enumerated Type . 62.2Band Width Enumerated Type . 62.3IF Enumerated Type . 62.4Transfer Mode Enumerated Type . 62.5Reinit Enumerated Type . 72.6LO Mode Enumerated Type . 72.7Band Enumerated Type . 72.8Gain Reduction Update Mode Enumerated Type . 72.9RSP2 Band Enumerated Type . 82.10 RSP2 Antenna Select Enumerated Type . 82.11 AGC Control Enumerated Type . 82.12 Gain Message ID Enumerated Type . 82.13 Minimum IF Gain Reduction Enumerated Type . 82.14 RSPduo Tuner Select Enumerated Type . 92.15 Java Event Enumerated Type (Android only) . 92.16 Device Enumeration Structure . 92.17 Gain Values Structure . 93 API Functions . 103.1Supported Functions . 103.2Android Specific Functions . 113.3Deprecated Functions . 113.4Callback Function Prototypes . 113.5mir sdr StreamInit . 123.6mir sdr StreamUninit . 143.7mir sdr SetRf. 153.8mir sdr SetFs . 163.9mir sdr SetGr . 173.10 mir sdr SetGrParams. 183.11 mir sdr SetDcMode . 193.12 mir sdr SetDcTrackTime . 203.13 mir sdr SetSyncUpdateSampleNum . 213.14 mir sdr SetSyncUpdatePeriod . 223.15 mir sdr ApiVersion . 233.16 mir sdr ResetUpdateFlags . 243.17 mir sdr SetTransferMode. 253.18 mir sdr DownConvert . 263.19 mir sdr SetPpm . 273.20 mir sdr SetLoMode . 283.21 mir sdr SetGrAltMode . 293.22 mir sdr DCoffsetIQimbalanaceControl . 303.23 mir sdr DecimateControl . 313.24 mir sdr AgcControl . 323.25 mir sdr Reinit . 333.26 mir sdr DebugEnable . 353.27 mir sdr GetCurrentGain . 363.28 mir sdr GetDevices . 373.29 mir sdr SetDeviceIdx . 383.30 mir sdr ReleaseDeviceIdx . 393.31 mir sdr GetHwVersion . 403.32 mir sdr RSPII AntennaControl . 413.33 mir sdr RSPII ExternalReferenceControl. 42R2.13SDRplay Limited3

Software Defined Radio APIUser Guide3.34 mir sdr RSPII BiasTControl . 433.35 mir sdr RSPII RfNotchEnable . 443.36 mir sdr RSP SetGr. 453.37 mir sdr RSP SetGrLimits . 463.38 mir sdr AmPortSelect . 473.39 mir sdr rsp1a BiasT . 483.40 mir sdr rsp1a DabNotch . 493.41 mir sdr rsp1a BroadcastNotch . 503.42 mir sdr rspDuo TunerSel . 513.43 mir sdr rspDuo ExtRef . 523.44 mir sdr rspDuo BiasT . 533.45 mir sdr rspDuo Tuner1AmNotch . 543.46 mir sdr rspDuo BroadcastNotch . 553.47 mir sdr rspDuo DabNotch . 563.48 mir sdr GainChangeCallbackMessageReceived . 573.49 mir sdr SetJavaReqCallback . 583.50 mir sdr Init . 593.51 mir sdr Uninit . 603.52 mir sdr ReadPacket . 613.53 mir sdr GetGrByFreq . 623.54 mir sdr SetParam . 633.55 Stream callback . 643.56 Gain Change callback . 653.57 Java Event callback . 664 API Usage . 675 Gain Reduction Tables . 695.1mir sdr SetGr() . 695.2mir sdr SetGrAltMode() . 695.3mir sdr RSP SetGr() . 706 Frequency Allocation Tables . 71Legal Information . 72R2.13SDRplay Limited4

Software Defined Radio APIUser Guide1IntroductionThis document provides a description of the SDRplay Software Defined Radio API. This API provides acommon interface to the RSP1, RSP1A, RSP2 and RSPduo (single tuner mode only) from SDRplayLimited which make use of the Mirics USB bridge device (MSi2500) and the multi-standard tuner(MSi001).R2.13SDRplay Limited5

Software Defined Radio APIUser Guide2API Data TypesThe header file mir sdr.h provides the definitions of the external data types provided by this API.2.1Error Code Enumerated Typetypedef enum{mir sdr Successmir sdr Failmir sdr InvalidParammir sdr OutOfRangemir sdr GainUpdateErrormir sdr RfUpdateErrormir sdr FsUpdateErrormir sdr HwErrormir sdr AliasingErrormir sdr AlreadyInitialisedmir sdr NotInitialisedmir sdr NotEnabledmir sdr HwVerErrormir sdr OutOfMemErrormir sdr HwRemoved} mir sdr ErrT;2.20,200,300,600,1536,5000,6000,7000,8000IF Enumerated Typetypedef enum{Mir sdr IF Undefindedmir sdr IF Zeromir sdr IF 0 450mir sdr IF 1 620mir sdr IF 2 048} mir sdr If kHzT;2.40,1,2,3,4,5,6,7,8,9,10,11,12,13,14Band Width Enumerated Typetypedef enum{mir sdr BW Undefined mir sdr BW 0 200 mir sdr BW 0 300 mir sdr BW 0 600 mir sdr BW 1 536 mir sdr BW 5 000 mir sdr BW 6 000 mir sdr BW 7 000 mir sdr BW 8 000 } mir sdr Bw MHzT;2.3 -1,0,450,1620,2048Transfer Mode Enumerated Typetypedef enum{mir sdr ISOCH 0,mir sdr BULK

Software Defined Radio API User Guide 1 Introduction This document provides a description of the SDRplay Software Defined Radio API. This API provides a common interface to the RSP1, RSP1A, RSP2 and RSPduo (single tuner mode only) from SDRplay Limited which make use of the Mirics USB bridge device (MSi2500) and the multi-standard tuner (MSi001).