🛠 Premier périphérique BLE avec le nRF Connect SDK

nRF52833-DK (boards.json id: nrf52833-dk) · intermediaire · Le nRF52833 est la puce BLE phare de Nordic : un fichier C, quelques Kconfig, et votre kit diffuse un nom que l'app nRF Connect trouve immédiatement.

The SDK to use

The nRF Connect SDK (NCS) is the official SDK for the nRF52833: the kit's Product Brief states verbatim that the NCS is the development SDK for this SoC, with board support. It integrates Zephyr RTOS, the Bluetooth LE/mesh stack, and the OpenThread port. The target is named nrf52833dk/nrf52833. The old nRF5 SDK (v16.0.0 cited in the 2019 User Guide) is legacy — for a new BLE project, go with the NCS.

Step 1 — Install the NCS

The easiest way: the graphical installer "nRF Connect for Desktop" with its toolchain manager, then west init -m https://github.com/nrfconnect/sdk-nrf --mr main ncs and west update. The upstream Zephyr path also works on this board (it is "Maintained" upstream); the examples below work in both trees.

Step 2 — The advertising firmware

A minimal connectable advertiser, as documented for the board:

/* beacon.c — NCS 2.x ; sur Zephyr récent BT_LE_ADV_CONN
 * est devenu BT_LE_ADV_CONN_FAST_1 */
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/bluetooth/bluetooth.h>

static const struct bt_data ad[] = {
        BT_DATA_BYTES(BT_DATA_FLAGS, BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR),
        BT_DATA(BT_DATA_NAME_COMPLETE, CONFIG_BT_DEVICE_NAME,
                sizeof(CONFIG_BT_DEVICE_NAME) - 1),
};

int main(void)
{
        bt_enable(NULL);
        if (bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0)) {
                return 0;
        }
        while (1) {
                k_sleep(K_SECONDS(1));   /* la radio tourne en ISR/threads */
        }
}

In prj.conf: CONFIG_BT=y and CONFIG_BT_DEVICE_NAME="mon-dk". Build and flash via the J-Link OB (cable on J2):

west build -b nrf52833dk/nrf52833 mon-projet && west flash

Step 3 — See the signal on your phone

Install nRF Connect for Mobile (Nordic, Android/iOS): scan → mon-dk appears → connect. For a complete scenario with GATT service + notifications, the peripheral_uart sample (Nordic UART Service) is the next step; upstream Zephyr Bluetooth samples compile as-is on nrf52833dk.

Radio options that open doors

The nRF52833 is not a generic BLE chip — Product Spec v1.7 documents:

Pitfalls

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials