Skip to content

pynrfjprog

Published On:
Feb 11, 2025
Last Updated:
Feb 11, 2025

pynrfjprog is a Python wrapper around the Nordic Semiconductor nrfjprog DLL (dynamic link library). The code is open source and available on GitHub.

Installation

To install pynrfjprog, into your Python environment, run the following command:

Terminal window
pip install pynrfjprog

As always, it is recommended to use a virtual environment to manage your Python packages.

Usage

Use enum_emu_snr() to enumerate the serial numbers of the connected programmers:

from pynrfjprog import LowLevel
with LowLevel.API('NRF52') as api:
serial_numbers = api.enum_emu_snr()
if serial_numbers is None:
print("No programmers found")
else:
print(f"Found {len(serial_numbers)} programmers with serial numbers: {serial_numbers}")

enum_emu_snr() returns a list of serial numbers (e.g. [960095105, 1051285627]). If no programmers are found, it returns None.