Environment Variables

libbladeRF uses a few environment variables to allow users and developers to modify behavior at runtime. These enviroment variables should be treated as diagnostic features, rather than part of the API. They may be modified or removed in future versions of the library.

This enviroment variable controls the default log level setting, which is usually BLADERF_LOG_LEVEL_INFO.

This may be useful when a program using libbladeRF is encountering errors. Setting the log level to debug or verbose often yields information that allows the reason for failures to be identified.

Note that this environment variable may not help if a program overrides the default log level by calling bladerf_log_set_verbosity().

The values supplied to this environment variable correspond directly with the bladerf_log_level values of the same name. The available values are listed below, and are handled in a case-insensitive manner.

• critical
• error
• warning
• info
• debug
• verbose

Linux and OSX:

• The current working directory
• The directory containing the program being executed
• ~/.config/Nuand/bladeRF
• ~/.Nuand/bladeRF
• /etc/Nuand/bladeRF
• /usr/share/Nuand/bladeRF

Windows:

• The current working directory
• The directory containing the program being executed
• C:\Users\USERNAME\AppData\Roaming\Nuand\bladeRF (via FOLDERID_RoamingAppData)
• The installation path, via HKEY_LOCAL_MACHINE\Software\Nuand LLC\Path

This environment variable may be used to specify a path to search prior to those listed above.

Normally, the default tuning mode is set per the conditions described in the documentation of the bladerf_tuning_mode enumeration.

This environment variable allows this default to be overridden at runtime and is intended to facilitate debugging. Valid values are: host and fpga.

Generally this environment variable is most useful when set to host and used in conjunction with setting the BLADERF_LOG_LEVEL environment variable to verbose. This allows low-level information about the frequency tuning operation to be observed, even though a program may not provide a means to change the log level or tuning mode.

Attempting to force the tuning mode to fpga on FPGA versions that do not support this will yield unexpected (and likely undesirable) behavior.

If defined, this forces libbladeRF to use the legacy packet format when communicating with the FPGA. This is intended for development and debugging.