Thanks to visit codestin.com
Credit goes to nordicsemiconductor.github.io

nRF Connect for Desktop

Developer documentation

Logo

Basics

API

Other topics


NordicSemiconductor/pc-nrfconnect-docs on GitHub

Getting started

The following sections describe the architecture for developing nRF Connect for Desktop apps.

Prerequisites

nRF Connect for Desktop is based on Electron, React, and Redux.

You need to be familiar with React and Redux to create apps. At the very least, you must understand concepts like JSX, props, actions, reducers, and immutable state.

Development is mostly done in TypeScript, with the tooling provided for such purpose.

Installing development tools

Install the following tools:

Installing nRF Connect

If you only want to develop (existing or new) apps, it is sufficient to have nRF Connect for Desktop installed as a binary. If you do not have it installed already, follow the instructions on how to install nRF Connect for Desktop.

Architecture of nRF Connect for Desktop

nRF Connect for Desktop is structured around two main blocks: the core and the apps. There are also some other projects that aid the development of apps for nRF Connect for Desktop.

The core

The core resides in the two projects: pc-nrfconnect-launcher and pc-nrfconnect-shared.

pc-nrfconnect-launcher

pc-nrfconnect-launcher contains the following parts:

pc-nrfconnect-shared

pc-nrfconnect-shared contains the common code for all apps: UI elements and code to give lower-level access to hardware.

Note: Some common libraries are not only provided during development and then bundled into the apps. The launcher also provides these libraries during runtime, so that the individual apps do not have to include the shared code themselves. This has two advantages for the apps:

However, this approach means also that the core is platform-dependent and a platform-specific variant must be downloaded or compiled.

pc-nrfconnect-shared also contains code to use nRF Util, the command line tool used by nRF Connect for Desktop to list devices and in some cases to interact with them. There is code to install the core of nRF Util as well as needed commands in specific versions in sandbox, so they are independent of other versions installed in the system.

Besides common code pc-nrfconnect-shared also provides common package dependencies, scripts and configurations for all official applications and the core. For example, it includes configurations for esbuild, ESLint and Jest as well as scripts to run them.

The apps

Nordic Semiconductors provides several apps to work with the development kits or dongles from Nordic Semiconductor. They are all installed and run through the launcher provided by the core.

Besides using the officially distributed apps, you are also able to run your own apps. This is described in Everyday app development.

The rest

The following projects aid the development of apps for nRF Connect for Desktop:

Next steps

You are now set up to develop a new app, work on an existing app or work on the core of nRF Connect for Desktop.