Skip to main content
Info Contains Python APIs for interacting with RFmx LTE 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 Q3
Supported Python Versions Python 3.9+ (64-bit)
Documentation RFmx Instr Docs

RFmx LTE Python API Status

Item Details
Driver Version Tested 2026 Q3
Supported Python Versions Python 3.9+ (64-bit)
Documentation RFmx LTE 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 nirfmxlte and install it.

$ python -m pip install nirfmxlte

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

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

Upgrade

You can use pip to upgrade nirfmxlte package using following command:

$ python -m pip install nirfmxlte --upgrade

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.

RFmxLTE Example

import nirfmxinstr
import nirfmxlte

instr_session = None
lte_signal = None

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

    # Get LTE signal configuration
    lte_signal = instr_session.get_lte_signal_configuration()

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

    # Configure RF settings
    lte_signal.configure_frequency(selector_string="", center_frequency=1.95e9)
    lte_signal.configure_reference_level(selector_string="", reference_level=0.0)
    lte_signal.configure_external_attenuation(selector_string="", external_attenuation=0.0)

    # Configure trigger
    lte_signal.configure_digital_edge_trigger(
        selector_string="",
        digital_edge_trigger_source="PFI0",
        digital_edge_trigger_edge=nirfmxlte.DigitalEdgeTriggerEdge.RISING_EDGE,
        trigger_delay=0.0,
        enable_trigger=False,
    )

    # Configure component carrier
    lte_signal.component_carrier.configure(
        selector_string="",
        component_carrier_bandwidth=10e6,
        component_carrier_frequency=0.0, 
        cell_id=0
    )

    # Configure band and duplex scheme
    lte_signal.configure_band(selector_string="", band=1)
    lte_signal.configure_duplex_scheme(
        selector_string="",
        duplex_scheme=nirfmxlte.DuplexScheme.FDD,
        uplink_downlink_configuration=nirfmxlte.UplinkDownlinkConfiguration.CONFIGURATION_0,
    )

    # Configure auto DMRS detection
    lte_signal.configure_auto_dmrs_detection_enabled(
        selector_string="",
        auto_dmrs_detection_enabled=nirfmxlte.AutoDmrsDetectionEnabled.TRUE
    )

    # Select ModAcc measurement
    lte_signal.select_measurements(
        selector_string="",
        measurements=nirfmxlte.MeasurementTypes.MODACC,
        enable_all_traces=True
    )

    # Configure ModAcc measurement
    lte_signal.modacc.configuration.configure_synchronization_mode_and_interval(
        selector_string="",
        synchronization_mode=nirfmxlte.ModAccSynchronizationMode.SLOT,
        measurement_offset=0,
        measurement_length=1,
    )

    lte_signal.modacc.configuration.configure_evm_unit(
        selector_string="", evm_unit=nirfmxlte.ModAccEvmUnit.PERCENTAGE
    )

    lte_signal.modacc.configuration.configure_in_band_emission_mask_type(
        selector_string="",
        in_band_emission_mask_type=nirfmxlte.ModAccInBandEmissionMaskType.RELEASE_11_ONWARDS
    )

    lte_signal.modacc.configuration.configure_averaging(
        selector_string="",
        averaging_enabled=nirfmxlte.ModAccAveragingEnabled.FALSE,
        averaging_count=10
    )

    # Initiate measurement
    error_code = lte_signal.initiate(selector_string="", result_name="")

    # Retrieve results
    (
        mean_rms_composite_evm,
        max_peak_composite_evm,
        mean_frequency_error,
        peak_composite_evm_symbol_index,
        peak_composite_evm_subcarrier_index,
        peak_composite_evm_slot_index,
        error_code,
    ) = lte_signal.modacc.results.fetch_composite_evm(selector_string="", timeout=10.0)

    (
        mean_iq_origin_offset,
        mean_iq_gain_imbalance,
        mean_iq_quadrature_error,
        error_code,
    ) = lte_signal.modacc.results.fetch_iq_impairments(selector_string="", timeout=10.0)

    in_band_emission_margin, error_code = 
        lte_signal.modacc.results.fetch_in_band_emission_margin(
            selector_string="", timeout=10.0
        )

    # Print Results
    print("------------------Measurements------------------")
    print(f"Mean RMS Composite EVM (% or dB)      : {mean_rms_composite_evm}")
    print(f"Max Peak Composite EVM (% or dB)      : {max_peak_composite_evm}")
    print(f"Peak Composite EVM Slot Index         : {peak_composite_evm_slot_index}")
    print(f"Peak Composite EVM Symbol Index       : {peak_composite_evm_symbol_index}")
    print(f"Peak Composite EVM Subcarrier Index   : {peak_composite_evm_subcarrier_index}")
    print(f"Mean Frequency Error (Hz)             : {mean_frequency_error}")
    print(f"Mean IQ Origin Offset (dBc)           : {mean_iq_origin_offset}")
    print(f"Mean IQ Gain Imbalance (dB)           : {mean_iq_gain_imbalance}")
    print(f"Mean IQ Quadrature Error (deg)        : {mean_iq_quadrature_error}")
    print(f"In-Band Emission Margin (dB)          : {in_band_emission_margin}")

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

finally:
    # Close Session
    if lte_signal is not None:
        lte_signal.dispose()
        lte_signal = 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nirfmxlte-26.5.0-py3-none-any.whl (451.7 kB view details)

Uploaded Python 3

File details

Details for the file nirfmxlte-26.5.0-py3-none-any.whl.

File metadata

  • Download URL: nirfmxlte-26.5.0-py3-none-any.whl
  • Upload date:
  • Size: 451.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nirfmxlte-26.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb22c4af8ce567238d3fd79663c1c944c7bb331604b3c757107bdec158e84ce7
MD5 f3d91f7e09444cd2dfec3ad1a8285567
BLAKE2b-256 d2e04d398cc2dd04f5d67a78524f057f5bfba0d32bbd2ff785ec4a1bbbf1f0bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirfmxlte-26.5.0-py3-none-any.whl:

Publisher: Publish-Package.yml on ni/nirfmx-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

26.5.0 This release

1 file

26.3.0

1 file

26.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page