How to automate firmware upgrade for NI-XNET modules like NI-9860?

Updated Jan 20, 2020

Reported In


  • NI-9860
  • CompactRIO Controller



Issue Details

For my cRIO Real-Time Target I use NI-XNET modules like NI 9860. Using NI MAX I can update my NI-XNET module. I want to automatically deploy and update to multiple cRIOs using SysAPI and C API, but trying to update the NI-XNET module using NISysCfgUpgradeFirmwareFromFile my update process fails with the error code NISysCfg_NotImplemented.


It is possible to programmatically update the firmware of a NI-XNET device by version using the SysConfig C API. Do as following:

  1. Query the property NISysCfgResourcePropertyNumberOfAvailableFirmwareVersions. This will return the number of available firmware versions for a given device.
  2. Get the latest available firmware by querying NISysCfgIndexedPropertyAvailableFirmwareVersion.
  3. Update the firmware by providing the value from step 2 as the firmwareVersion input to the function NISysCfgUpgradeFirmwareVersion.


Additional Information

All of these functions and properties are defined in the nisyscfg.h file. An in-depth description of the functions stated above can be found using the alphabetical function index for the System Configuration API for C.

NI-XNET devices don't support firmware update by specifying a filepath. For NI-XNET devices, if the wrong firmware file is uploaded, it is easy to render the device unaccessible, so NI engineers decided to ensure the correct file is loaded for all users' convenience. So, it is not possible to work specifying a filepath. Still, it is possible to automatically update using a version number, which is checked internally against a file path. This ensures that the correct file is being chosen and uploaded to the module.