Signal Hound BB60C Programmer's Reference Manual

Application programming interface
Hide thumbs Also See for BB60C:

Advertisement

Quick Links

BB60A and BB60C Application
Programming Interface (API)
Programmers Reference Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BB60C and is the answer not in the manual?

Questions and answers

Summary of Contents for Signal Hound BB60C

  • Page 1 BB60A and BB60C Application Programming Interface (API) Programmers Reference Manual...
  • Page 2 BB60A and BB60C Application Programming Interface (API) Programmers Reference Manual  2015, Signal Hound, Inc. 35707 NE 86th Ave La Center, WA 98629 USA Phone 360.263.5006 • Fax 360.263.5007 Version 3.0 6/24/2015 Requirements, Operation, Function Definitions, Examples Signal Hound | Overview...
  • Page 3: Table Of Contents

    ............................14 bbConfigureCenterSpan ............................15 bbConfigureLevel ..............................16 bbConfigureGain ..............................16 bbConfigureSweepCoupling ..........................17 bbConfigureWindow .............................. 19 bbConfigureProcUnits ............................19 bbConfigureIO ................................ 20 bbConfigureDemod ..............................21 bbConfigureIQ ................................ 22 bbConfigureRealTime ............................23 bbInitiate ................................24 Overview | Signal Hound...
  • Page 4 Code Examples ............................... 41 Common ................................41 Sweep Mode ..............................42 Real-Time Mode ............................... 42 I/Q Streaming Example ............................ 43 Using a GPS Receiver to Time-Stamp Data ......................44 Code Example ..............................45 Bandwidth Tables..............................46 Signal Hound | Overview...
  • Page 5: Overview

    The manual is a reference for the Signal Hound BB60C/A application programming interface (API). The API provides a set of C routines used to control the Signal Hound BB60A and BB60C. The API is C ABI compatible, so it can be called from a number of other languages and environments such as Java, C#, Python, C++, Matlab, and Labview.
  • Page 6: What's New In Version 3.0

    What’s New in Version 3.0 Version 3.0 coincides with the release of the Spike , Signal Hounds latest spectrum analyzer software. With this release comes the ability to open specific BB60C devices. BB60A devices lack the firmware to perform this task. See bbGetSerialNumberList bbOpenDeviceBySerialNumber for more information.
  • Page 7: Theory Of Operation

    SCPIs IviSpecAn Class Specification where possible. It is not necessary to be familiar with this specification but those who are should feel comfortable with our API immediately. Let’s look at each step in detail of a typical program interfacing a Signal Hound spectrum analyzer. Opening a Device Before attempting to open a device programmatically, it must be physically connected to a USB 3.0 port...
  • Page 8: Retrieve Data From The Device

    Calibration is an important part of the device’s operation. The device is temperature sensitive and it is important a device is re-calibrated when significant temperature shifts occur (+/- 2 °C). Signal Hound spectrum analyzers are streaming devices and as such cannot automatically calibrate itself without interrupting operation/communication (which may be undesirable).
  • Page 9: Modes Of Operation

    Each mode will also provide data formatted to match the mode selected. In the next sections you will see how to interact with each mode. For a more in-depth examination of each mode of operation (read: theory) refer to the Signal Hound BB60C/A user manual.
  • Page 10: Real-Time Analysis

    The API provides the functionality of an online real-time spectrum analyzer for the full instantaneous bandwidth of the device (20MHz for the BB60A, 27MHz for the BB60C). Through the use of FFTs at an overlapping rate of 50%, the spectrum results have no blind time (100% probability of intercept) for events as short as 50ns.
  • Page 11: Gain And Attenuation In The Streaming Mode

    (or TG) sweeps. Scalar Network Analysis can be realized by following these steps 1. Ensure a Signal Hound BB60C spectrum analyzer and tracking generator is connected to your PC. 2. Open the spectrum analyzer through normal means.
  • Page 12: Sweeping Versus Streaming

    The API is capable of managing multiple devices within one process. In each process the API manages a list of open devices to prevent a process from opening a device more than once. You may open multiple devices by specifying the serial number or allowing the API to discover them automatically. Signal Hound | Sweeping versus Streaming...
  • Page 13: Api Functions

    No error, function returned successfully. bbNullPtrErr One required pointer parameter to this function is null. bbOpenDeviceBySerialNumber Open one Signal Hound device bbStatus bbOpenDeviceBySerialNumber(int *device, int serialNumber); Parameters device Pointer to an integer. If successful, the integer pointed to by device will contain a valid device number which can be used to identify a device for successive API function calls.
  • Page 14: Bbopendevice

    The function attempts to open the device with serial number specified by the serialNumber parameter. Only BB60C devices can be opened by specifying the serial number. If the serial number specified is zero, the first BB60A found will be opened. If a device cannot be found matching the provided serial number, the function will return unsuccessful.
  • Page 15: Bbclosedevice

    USB 3.0 connection. bbUncalibratedDevice This message is returned as a warning and notes the device has not been calibrated. If you see this warning, contact Signal Hound. bbCloseDevice Close one Signal Hound broadband device bbStatus bbCloseDevice(int device);...
  • Page 16: Bbconfigurecenterspan

    The device handle provided points to a device that is not open. bbInvalidSpanErr The span provided is less than the minimum acceptable span. bbFrequencyRangeErr The calculated start or stop frequencies fall outside of the operational frequency range of the specified device. Signal Hound | API Functions...
  • Page 17: Bbconfigurelevel

    Parameters device Handle to the device being configured. gain A gain setting. Description To return the device to automatically choose the best gain setting, call this function with a gain of BB_AUTO_GAIN API Functions | Signal Hound...
  • Page 18: Bbconfiguresweepcoupling

    16ms-100ms [0.016 – 0.1] for optimal use. In zero span mode this is the length of the returned sweep as a measure of time. Sweep times for zero span must range between 10us and 100ms. Values outside this range are clamped. Signal Hound | API Functions...
  • Page 19 BB_SPUR_REJECT. If you have a signal between 300 MHz and 3 GHz, need the lowest possible phase noise, and do not need any image rejection, BB_BYPASS_RF can be used to rewire the front end for lowest phase noise. API Functions | Signal Hound...
  • Page 20: Bbconfigurewindow

    The possible values are , and BB_LOG BB_VOLTAGE BB_POWER BB_BYPASS Description The units provided determines what unit type video processing occurs in. The chart below shows which unit types are used for each units selection. Signal Hound | API Functions...
  • Page 21: Bbconfigureio

    AC coupled. Specifying ‘0’ on port 2 emits a DC coupled logic low. For external 10 MHz timebases, best phase noise is achieved by using a low jitter 3.3V CMOS input. Configure combinations Port 1 IO For port 1 only a coupled value must be ‘OR’ed API Functions | Signal Hound...
  • Page 22: Bbconfiguredemod

    Configure audio demodulation operation bbStatus bbConfigureDemod(int device, int modulationType, double freq, float IFBW, float audioLowPassFreq, float audioHighPassFreq, float FMDeemphasis); Parameters device Handle to the device being configured. modulationType Specifies the demodulation scheme, possible values are Signal Hound | API Functions...
  • Page 23: Bbconfigureiq

    Parameters device Handle to the device being configured. downsampleFactor Specify a decimation rate for the 40MS/s I/Q digital stream. bandwidth Specify a bandpass filter width on the I/Q digital stream. API Functions | Signal Hound...
  • Page 24: Bbconfigurerealtime

    Specifies the rate at which frames are generated in real-time mode, in frames per second. Possible values range from [4 – 30], where four means a frame is generated every 250ms and 30 means a frame is generated every ~33 ms. Signal Hound | API Functions...
  • Page 25: Bbinitiate

    Return Values bbNoError Device successfully configured bbDeviceNotOpenErr The device handle provided does not point to an open device. bbInvalidParameterErr The value for mode did not match any known value. API Functions | Signal Hound...
  • Page 26: Bbfetchtrace

    Successful. pSweepDataMin/Max are populated with amplitude values. bbNullPtrErr If either min or max are null, bbNullPtrErr is returned immediately. bbDeviceNotOpenErr device is not a handle to an open device. bbDeviceNotConfiguredErr Returned if the device is idle or in BB_RAW_PIPE mode. Signal Hound | API Functions...
  • Page 27: Bbfetchrealtimeframe

    One or more of the supplied pointers are NULL. bbDeviceNotConfiguredErr The device specified is not currently configured for real-time mode. bbDeviceConnectionErr Device connection issues were present in the acquisition of this sweep. Error Handling : Device Connection Errors. API Functions | Signal Hound...
  • Page 28: Bbfetchaudio

    The device is not initiated and running the audio demodulation mode. bbNullPtrErr audio pointer is NULL bbDeviceConnectionErr Device connection issues were present in the acquisition of audio. See Error Handling : Device Connection Errors. bbFetchRaw Retrieve raw data from a streaming device Signal Hound | API Functions...
  • Page 29 Note: The ports on a broadband device need to be configured to receive external triggers to take advantage of the trigger array. Appendix: Code Examples: I/Q Streaming Example. Return Values bbNoError The device successfully began streaming. bbDeviceNotOpenErr device is not a handle to an open device. API Functions | Signal Hound...
  • Page 30: Bbquerytraceinfo

    This function should be called to determine sweep characteristics after a device has been configured and initiated. For zero-span mode, startFreq and binSize will refer to the time domain values. In zero- span mode startFreq will always be zero, and binSize will be equal to sweepTime/traceSize. Signal Hound | API Functions...
  • Page 31: Bbqueryrealtimeinfo

    *seconds, unsigned int *nanoseconds); Parameters device Handle of an initialized device. seconds Seconds since midnight (00:00:00), January 1, 1970, coordinated universal time(UTC). nanoseconds nanoseconds between seconds and seconds + 1 API Functions | Signal Hound...
  • Page 32: Bbquerystreaminfo

    Return Values bbNoError Function returned successfully. bbDeviceNotOpenErr device is not a handle to an open device. bbDeviceNotConfiguredErr The device specified is not currently streaming. bbAbort Stop the current mode of operation bbStatus bbAbort(int device); Parameters Signal Hound | API Functions...
  • Page 33: Bbpreset

    A longer sleep time may be preferred or multiple attempts to open the device until it returns bbNoError bool PresetRoutine() { bbPreset( myID ); bbCloseDevice( myID ); Sleep(3000); // Windows sleep function API Functions | Signal Hound...
  • Page 34: Bbselfcal

    After calling this function, the device returns to the default state. Currently the API does not retain state prior to the calling of . Fully reconfiguring the device will be necessary. bbSelfCal() Return Values bbNoError The device was recalibrated successfully. Signal Hound | API Functions...
  • Page 35: Bbsynccputogps

    Possible values for type are , and BB_DEVICE_NONE BB_DEVICE_BB60A BB_DEVICE_BB60C . These values can be found in the bb_api header file. BB_DEVICE_BB124 API Functions | Signal Hound...
  • Page 36: Bbgetserialnumber

    Description Use this function to determine which version of firmware is associated with the specified device. Return Values bbNoError Function returned successfully. bbDeviceNotOpenErr The device specified is not open. Signal Hound | API Functions...
  • Page 37: Bbgetdevicediagnostics

    Pairs and open BB60C spectrum analyzer with a Signal Hound tracking generator bbStatus bbAttachTg(int device); Parameters device Device handle. Description This function is a helper function to determine if a Signal Hound tracking generator has been previously paired with the specified device. Return Values API Functions | Signal Hound...
  • Page 38: Bbistgattached

    Description This function is a helper function to determine if a Signal Hound tracking generator has been previously paired with the specified device. Return Values bbNoError The function returned successfully.
  • Page 39: Bbstoretgthru

    Return Values bbNoError The function returned successfully. bbDeviceNotOpenErr The device specified is not open. bbInvalidParameterErr The flag parameter does not match any accepted value. bbDeviceNotConfiguredErr The device is not configured for tracking generator sweeps. API Functions | Signal Hound...
  • Page 40: Bbsettg

    The double variable that frequency points to will contain the last set frequency of the TG output in Hz. amplitude The double variable that amplitude points to will contain the last set amplitude of the TG output in dBm. Description Signal Hound | API Functions...
  • Page 41: Bbgetapiversion

    A bbStatus value returned from an API call. Description Produce an ascii string representation of a given status code. Useful for debugging. Return Values const char* A pointer to a non-modifiable null terminated string. The memory should not be freed/deallocated. API Functions | Signal Hound...
  • Page 42: Error Handling

    All API functions return a status code responsible for reporting errors, warnings or success. It can be helpful to write a macro or function for checking these status codes. #define CHECK_BB_STATUS(status) if(status != bbNoError) { mylogErrorRoutine(bbGetErrorString(status)); \ doErrorHandlingRoutine(); Signal Hound | Error Handling...
  • Page 43: Sweep Mode

    BB60 device and retrieve the sweep size and frame size of a real- time session. One full sweep/frame is retrieved before closing the device. handle; // Attempt to open a connected device if(bbOpenDevice(&handle) != bbNoError) { myErrorRoutine("Device didn't open"); Appendix | Signal Hound...
  • Page 44: I/Q Streaming Example

    // Allocate an array large enough for the I/Q stream configured buffer_len; bbQueryStreamInfo(handle, &buffer_len, 0, 0); float *iq_buffer; // Allocate an array for ‘buffer_len’ alternating I/Q complex values iq_buffer float[buffer_len * 2]; // Retrieve I/Q data packet Signal Hound | Appendix...
  • Page 45: Using A Gps Receiver To Time-Stamp Data

    2) The NMEA data must be provided via RS232 (Serial COM port) only once during application startup, releasing the NMEA data stream for other applications such as a “Drive Test Solution” to map out signal strengths. Order of Operations: 1) Ensure correct operation of your GPS receiver. Appendix | Signal Hound...
  • Page 46: Code Example

    // Note: BB_TIME_STAMP is required so the device treats input triggers as the GPS 1 PPS bbInitiate(handle, BB_STREAMING, BB_STREAM_IQ | BB_TIME_STAMP); // Allocate an array large enough for the I/Q stream configured buffer_len; bbQueryStreamInfo(handle, &buffer_len, 0, 0); float *iq_buffer; iq_buffer float[buffer_len * 2]; Signal Hound | Appendix...
  • Page 47: Bandwidth Tables

    In Native RBW mode, this table shows the possible RBWs and their corresponding FFT sizes. As of version 1.0.7 non-native bandwidths do not use this table. Non-native bandwidths can be arbitrary. Native Bandwidths (Hz) FFT size 10.10e6 5.050e6 2.525e6 1.262e6 631.2e3 Largest Real-Time RBW 315.6e3 Appendix | Signal Hound...
  • Page 48 FFT length for an arbitrary RBW. A custom flat-top window with variable bandwidth is built in order to modify the signal bandwidth beyond just FFT length. non_native_fft_from_rbw(double rbw) double min_bin_sz = rbw / 3.2; double min_fft = 80.0e6 / min_bin_sz; order = (int)ceil(log2(min_fft)); return pow2(order); Signal Hound | Appendix...

This manual is also suitable for:

Bb60a

Table of Contents