Skip to main content
Info Contains Python APIs for interacting with RFmx GSM Product.
Author National Instruments

Table of Contents

About

The nirfmx-python repository generates Python bindings (Application Programming Interface) for interacting with the RFmx Products.

nirfmx-python follows Python Software Foundation support policy for different versions.

RFmx Instr Python API Status

Item Details
Driver Version Tested 2026 Q4
Supported Python Versions Python 3.9+ (64-bit)
Documentation RFmx Instr Docs

RFmx GSM Python API Status

Item Details
Driver Version Tested 2026 Q4
Supported Python Versions Python 3.9+ (64-bit)
Documentation RFmx GSM Docs

Documentation

You can find the latest API documentation for the nirfmx-python package on Read the Docs

Refer to the RFmx User Manual for an overview of RFmx, system requirements, troubleshooting, key concepts, etc.

Operating System Support

nirfmx-python supports Windows systems where the supported drivers are installed. Refer to NI Hardware and Operating System Compatibility for which versions of the driver support your hardware on a given operating system.

Installation

You can use pip to download nirfmxgsm and install it.

$ python -m pip install nirfmxgsm

To also install gRPC support for remote NI gRPC Device Server communication:

$ python -m pip install "nirfmxgsm[grpc]"

License

This project is licensed under the MIT License. While the source code is not publicly released, the license permits binary distribution with attribution.

Note: This Python driver depends on several third-party components that are subject to separate commercial licenses. Users are responsible for ensuring they have the appropriate rights and licenses to use those dependencies in their environments.

gRPC Features

For driver APIs that support it, passing a GrpcSessionOptions instance as a parameter to nirfmxinstr.Session.init() is subject to the NI General Purpose EULA.

SSL/TLS Support

The server supports both server-side TLS and mutual TLS. Security configuration is accomplished by setting the server_cert, server_key and root_cert values in the server's configuration file. The server expects the certificate files specified in the configuration file to exist in a certs folder that is located in the same directory as the configuration file being used by the server. For more detailed information on SSL/TLS support refer to the Server Security Support wiki page.

Support and Feedback

For support with Python API, hardware, the driver runtime or any other questions, please visit NI Community Forums.

RFmxGSM Example

import nirfmxinstr
import nirfmxgsm
import numpy

instr_session = None
gsm = None

try:
    # Create a new RFmx Session
    instr_session = nirfmxinstr.Session(resource_name="RFSA", option_string="")

    # Configure frequency reference
    instr_session.configure_frequency_reference(selector_string="",
        frequency_reference_source="OnboardClock", frequency_reference_frequency=10e6)

    # Get GSM signal configuration
    gsm = instr_session.get_gsm_signal_configuration()

    # Configure RF settings
    gsm.configure_rf(selector_string="", center_frequency=890.2e6, reference_level=0.0,
        external_attenuation=0.0)
    gsm.configure_band(selector_string="", band=nirfmxgsm.Band.PGSM)
    gsm.configure_link_direction(selector_string="", link_direction=nirfmxgsm.LinkDirection.UPLINK)

    # Configure trigger
    gsm.configure_iq_power_edge_trigger(
        selector_string="",
        iq_power_edge_source="0",
        iq_power_edge_slope=nirfmxgsm.IQPowerEdgeTriggerSlope.RISING_SLOPE,
        iq_power_edge_level=-20.0,
        trigger_delay=0.0,
        minimum_quiet_time_mode=nirfmxgsm.TriggerMinimumQuietTimeMode.AUTO,
        minimum_quiet_time=582e-6,
        iq_power_edge_level_type=nirfmxgsm.IQPowerEdgeTriggerLevelType.RELATIVE,
        enable_trigger=True,
    )

    # Configure burst settings
    gsm.configure_number_of_timeslots(selector_string="", number_of_timeslots=1)
    gsm.configure_auto_tsc_detection_enabled(selector_string="",
        auto_tsc_detection_enabled=nirfmxgsm.AutoTscDetectionEnabled.TRUE)
    gsm.configure_signal_type(selector_string="slot::all",
        modulation_type=nirfmxgsm.ModulationType.MODULATION_TYPE_8PSK,
        burst_type=nirfmxgsm.BurstType.NB, hb_filter_width=nirfmxgsm.HBFilterWidth.NARROW)
    gsm.configure_tsc(selector_string="slot::all", tsc=nirfmxgsm.Tsc.TSC0)
    gsm.configure_power_control_level(selector_string="slot::all", power_control_level=0)

    # Select PVT measurement
    gsm.select_measurements(selector_string="", measurements=nirfmxgsm.MeasurementTypes.PVT,
        enable_all_traces=True)

    # Configure PVT measurement
    gsm.pvt.configuration.set_rbw_filter_bandwidth(selector_string="", value=500000.0)
    gsm.pvt.configuration.configure_averaging(
        selector_string="",
        averaging_enabled=nirfmxgsm.PvtAveragingEnabled.FALSE,
        averaging_count=10,
        averaging_type=nirfmxgsm.PvtAveragingType.RMS,
    )

    gsm.initiate(selector_string="", result_name="")

    # Retrieve results
    measurement_status, error_code = gsm.pvt.results.fetch_measurement_status(
        selector_string="", timeout=10.0
    )

    (
        slot_average_power,
        slot_burst_width,
        slot_measurement_status,
        slot_maximum_power,
        slot_minimum_power,
        slot_burst_threshold,
        error_code,
    ) = gsm.pvt.results.fetch_slot_measurement_array(selector_string="", timeout=10.0)

    # The numpy arrays are passed in pre-allocated. If the pre allocated array size does not match the
    # actual array size returned by the measurement, the array is automatically resized to fit the data,
    # which may invalidate the previously created view. Passing an empty array (size 0) is fine;
    # it will be resized as needed.
    upper_mask = numpy.empty(0, dtype=numpy.float32)
    signal_power = numpy.empty(0, dtype=numpy.float32)
    lower_mask = numpy.empty(0, dtype=numpy.float32)
    x0, dx, error_code = gsm.pvt.results.fetch_power_trace(
        selector_string="", timeout=10.0, upper_mask=upper_mask, signal_power=signal_power,
        lower_mask=lower_mask
    )

    # Print Results
    print(f"Measurement Status      : {measurement_status}\n")
    for i in range(len(slot_average_power)):
        print(f"\nSlot Measurement        : {i}")
        print(f"Average Power (dBm)     : {slot_average_power[i]}")
        print(f"Burst Width (s)         : {slot_burst_width[i]}")
        print(f"Maximum Power (dBm)     : {slot_maximum_power[i]}")
        print(f"Minimum Power (dBm)     : {slot_minimum_power[i]}")
        print(f"Burst Threshold (dBm)   : {slot_burst_threshold[i]}")
        print(f"Measurement Status      : {slot_measurement_status[i]}")

except Exception as e:
    print("ERROR: " + str(e))

finally:
    # Close Session
    if gsm is not None:
        gsm.dispose()
        gsm = None
    if instr_session is not None:
        instr_session.close()
        instr_session = None

Numpy array size handling in RFmx APIs

The numpy arrays are passed in pre-allocated. If the pre allocated array size does not match the actual array size returned by the measurement, the array is automatically resized to fit the data, which may invalidate the previously created view. Passing an empty array (size 0) is fine; it will be resized as needed.

Metadata

Release files for nirfmxgsm 26.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for nirfmxgsm 26.8.0
File Interpreter ABI Platform
nirfmxgsm-26.8.0-py3-none-any.whl Python 3 none any Details

Release files / nirfmxgsm-26.8.0-py3-none-any.whl

Download URL nirfmxgsm-26.8.0-py3-none-any.whl
Size 143.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1efef10b009edae4cadd8932309a99e6a07668610729248b3a46a6ebace77ba
BLAKE2b-256 checksum
How to use checksums
7fa9f5cb6691193e1850e1ce5663ecada257c9f00f53813c6b593fe4d39bc5ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Security for nirfmxgsm 26.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

26.8.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page