Skip to main content
Info Contains Python APIs for interacting with RFmx WLAN Generation 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 WLAN Generation Python API Status

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

$ python -m pip install nirfmxwlangen

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

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

Upgrade

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

$ python -m pip install nirfmxwlangen --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.

RFmx WLAN Generation Example

import nirfmxwlangen
import nirfsg

num_tx = 4
resource_names = ["RFSG0", "RFSG1", "RFSG2", "RFSG3"]
waveform_name = "Wlan"
script = (
    "script GenerateWlan\n"
    "    repeat forever\n"
    "        generate Wlan\n"
    "    end repeat\n"
    "end script"
)

wlangen_session = None
rfsg_sessions = [None] * num_tx

try:
    # Create RFSG Sessions
    active_rfsg_sessions = []
    for i in range(num_tx):
        rfsg_sessions[i] = nirfsg.Session(resource_names[i])
        rfsg_sessions[i].power_level_type = nirfsg.PowerLevelType.PEAK
        rfsg_sessions[i].external_gain = 0.0
        active_rfsg_sessions.append(rfsg_sessions[i])

    # Create WLAN Generation Session
    wlangen_session = nirfmxwlangen.Session(
        nirfmxwlangen.CompatibilityVersion.Version060000, "WlanGenSession"
    )

    # Configure WLAN MIMO OFDM standard and parameters
    wlangen_session.set_standard("", nirfmxwlangen.Standard.STANDARD_80211AX_MIMO_OFDM)
    wlangen_session.set_channel_bandwidth("", 80e6)
    wlangen_session.set_number_of_transmit_channels("", num_tx)
    wlangen_session.set_mcs_index("", 0)
    wlangen_session.set_mapping_matrix_type("", nirfmxwlangen.MappingMatrixType.DIRECT)
    wlangen_session.set_number_of_space_time_streams("", num_tx)
    wlangen_session.set_lo_frequency_offset_mode(
        "", 
        nirfmxwlangen.LOFrequencyOffsetMode.AUTO
    )
    wlangen_session.set_rf_blanking_enabled("", nirfmxwlangen.RFBlankingEnabled.TRUE)

    # Configure Multiple Device Synchronization
    wlangen_session.rfsg_configure_multiple_device_synchronization(
        active_rfsg_sessions, "PXI_Clk", [0, 1]
    )

    # Configure Frequency using Single LO
    wlangen_session.rfsg_configure_frequency_single_lo(
        active_rfsg_sessions,
        nirfmxwlangen.LOSource.ONBOARD,
        rfsg_sessions[0],
        5.18e9,
        False,
        False,
    )

    # Create and Download MIMO Waveforms
    wlangen_session.rfsg_create_and_download_mimo_waveforms(
        active_rfsg_sessions, None, waveform_name
    )

    # Configure Script for each RFSG device
    for i in range(num_tx):
        wlangen_session.rfsg_configure_script(rfsg_sessions[i], "", script, -10.0)

    # Initiate Multiple Device Generation
    wlangen_session.rfsg_multiple_device_initiate(active_rfsg_sessions)

    # Print Results
    iq_rate, _ = wlangen_session.get_iq_rate("")
    iq_waveform_size, _ = wlangen_session.get_iq_waveform_size("")
    waveform_duration = iq_waveform_size / iq_rate if iq_rate != 0 else 0
    print("--------------WLAN Generate MIMO OFDM Waveform (Multiple RFSG)--------------")
    print(f"Waveform Duration {{s}}{waveform_duration}")
    print("Actual Headroom (dB)")
    for i in range(num_tx):
        actual_headroom, _ = wlangen_session.get_actual_headroom(f"channel{i}")
        print(f"\t{actual_headroom}")

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

finally:
    # Stop Generation and Close Sessions
    for i in range(num_tx):
        if rfsg_sessions[i] is not None:
            rfsg_sessions[i].abort()
            rfsg_sessions[i].output_enabled = False
            rfsg_sessions[i].commit()

    if wlangen_session is not None:
        for i in range(num_tx):
            if rfsg_sessions[i] is not None:
                wlangen_session.rfsg_clear_database(rfsg_sessions[i], "", waveform_name)
        wlangen_session.close()
        wlangen_session = None

    for i in range(num_tx):
        if rfsg_sessions[i] is not None:
            rfsg_sessions[i].close()
            rfsg_sessions[i] = 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 nirfmxwlangen 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 nirfmxwlangen 26.8.0
File Interpreter ABI Platform Actions
nirfmxwlangen-26.8.0-py3-none-any.whl Python 3 none any Details for nirfmxwlangen-26.8.0-py3-none-any.whl

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

Download URL nirfmxwlangen-26.8.0-py3-none-any.whl
Size 180.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
535bc9ffebae17d31b1b3746058275b7c2a0eb2e5288e64d545503e206e260c3
BLAKE2b-256 checksum
How to use checksums
79e808cc55e0b44ee197e2dcb07cbaaf6f5ff5b8a751ef09aeea6bd473b6ab65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for nirfmxwlangen 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.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for nirfmxwlangen-26.8.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

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.

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