API for NCS (Zephyr, Nordic, or Softdevice?)

Hi,

I am currently programming an nRF52 device with the NCS - I am confused about the API for the Zephyr controller, the API for the Bluetooth controller, and the Softdevice.

If I use a Bluetooth sample from the Zephyr docs, does this mean I can only use the Zephyr API in the source code? Similarly, for samples taken from the NCS documentation, must I only refer to the API found under the NCS libraries panel?

Also, where does the Softdevice come into all this?

Thanks,

Adam

Parents
  • Hello Adam,

    I am confused about the API for the Zephyr controller, the API for the Bluetooth controller, and the Softdevice.

    If you previously came from the nRF5 SDK I totally understand how this could be confusing at first.
    It might seem daunting at first to familiarize with the new SDK and its aspects, but I promise you that things get a lot easier than the bare-metal nRF5 SDK, once you've gotten familiar with the nRF Connect SDK! :)

    If you are just getting into the nRF Connect SDK I highly recommend going through this nRF Connect SDK Fundementals course to quickly familiarize with the new SDK.

    If I use a Bluetooth sample from the Zephyr docs, does this mean I can only use the Zephyr API in the source code? Similarly, for samples taken from the NCS documentation, must I only refer to the API found under the NCS libraries panel?

    No, you can use the same API calls - they might however use different backends depending on your project configuration (so the call to bt_le_adv_start would for instance both work for the Zephyr BLE Controller and the SoftDevice Controller, their API is the same).
    This is also one of the benefits in the nRF Connect SDK - the added level of abstraction enables you to use the same API calls with a variety of backends and target devices, so that you quickly and easily can change out (both HW and SW) components of your project if need be.

    Additionally, since the nRF Connect SDK is built with Zephyr as its foundation you can still draw on all the libraries and drivers that are available in Zephyr, into your nRF Connect SDK based application.
    You could take a look at the first section of this tutorial to quickly read about some of the core concepts of the nRF Connect SDK.

    Also, where does the Softdevice come into all this?

    The SoftDevice in the nRF Connect SDK is now named 'the SoftDevice Controller', and it handles the BLE parts of your application like the SoftDevice did in the nRF5 SDK. Using the SoftDevice controller is the default setting for all the nRF Connect SDK examples.

    Best regards,
    Karl 

  • Thanks very much for clarifying Karl.

    I am currently programming using the nRF52833 DK with the nRF52833 SoC. If I would like to set the TX Power to 8dBm in the sample application, Bluetooth: Peripheral HT, which API reference call should I use?

    Thanks,

    Adam

Reply Children
Related