nRF9160 new SDK integration and build procedure

Hi Team,

We are starting new product development using nrF9160 modem.

I saw that new SDK available is v3.0.2. I hope we have to build/compile it in VS code, am I correct?

Can you please provide complete procedure from downloading v3.0.2 SDK from nRF desktop application to build the sample code in VS code.

Regards,

Sravan Rikka

Parents
  • Hello, 

    Please see our nRF Connect SDK Fundamentals course in our Developer Academy. This will provide all steps to go forward with NCS and the VS Code extension.

    Kind regards,
    Øyvind

  • Hi Øyvind,

    I am going through the links you shared.

    Can you please provide your answers to below queries.

    1. v3.0.2 SDK is the latest on as of today?

    2. How much frequently SDK versions will be released? (Ex: Every 3 months or every 6 months? etc)

    3. We have to use VS Code for the development? No need to use segger embedded studio IDE?

    Regards,

    Sravan Rikka

  • Hi Øyvind,

    Awaiting for your response, can you please respond to above email.

    Regards,

    Sravan Rikka

  • Hello, 

    sravan.rikka said:
    The sample does not include a main.c file. To follow the typical flow of the application, see the Sequence diagram section. I found this in architecture webpage.

    Yes, that is correct. There is no main file. I recommend looking at the nrf connect sdk intermediate course and lesson 1 specifically, which provides more information on this. That said, I've reached out to the developers to discuss the use of main.c or lack off.

    sravan.rikka said:
    2. I have kept our modified/updated board files in 'zephyr/boards/arm' folder and also tried by keeping in 'nrf/boards/nordic' folder but still I can't see it under build configuration 'board target' section. In which folder I have to keep board files? and how to select our board files under 'board target' in build configuartion

    Same as above, have a look at the intermediate course and lesson 3 - Adding custom board support. 

    I will update you within 3 business days. 


    Kind regards,
    Øyvind

  • Hi Oyvind,

    Awaiting for your response.

    Can we take 'at_client' sample code as a starting point to start implementation at least drivers etc and later we will add mqtt related changes to this sample code, is the 'at_client' good to use as a starting sample code or do you suggest any other sample code as a starting point?

    'at_client' sample code available at below path in SDK 3.1.0.

    C:\ncs\v3.1.0\nrf\samples\cellular\at_client.

    Regards,

    Sravan Rikka

  • Hello,

    The MQTT sample documentation has been updated to elaborate around the sample and its usage of system threads

    sravan.rikka said:
    Can we take 'at_client' sample code as a starting point to start implementation at least drivers etc and later we will add mqtt related changes to this sample code, is the 'at_client' good to use as a starting sample code or do you suggest any other sample code as a starting point?

    You’re encouraged to begin with the sample that best fits your development needs. If the MQTT sample appears too advanced, consider exploring other examples available in our SDK and the Zephyr repository. These can be combined or adapted to suit your implementation.

    Please note that this particular sample does not include a traditional main.c file. Instead, it follows a modular architecture where each module defines its own thread using the K_THREAD_DEFINE macro. This design removes the need for a central main() function, allowing each module to initialize and operate independently.

    Inter-module communication is handled through Zephyr’s zbus message-passing system, resulting in a loosely coupled, event-driven architecture. For a clearer understanding of the application's flow, refer to the Sequence Diagram section.

    More information can be found under Zephyr's System Thread chapter

    Kind regards,
    Øyvind

  • Hi Øyvind,

    1. Is the GPS functionality can be enabled using nRF9160? If yes, can you please share the steps or procedure.

    2. OTP memory available in nRF9160? if yes, how to access it?

    3. If there is no catM1 or NBIOT network then will it fall back to 2g/3g?

    4. When used QoS as 1 or QoS 2 and if the broker is down and how many times the nRF9160 retries sending publish message to the broker?

    5. QoS 1 or QoS 2 acknowledgements are handled by stack right? not handled in application level? If application wants to know that publish is successfully received by broker, is it possible, if yes please provide procedure.

    6. nRF9160 subscribe for a topic and went to sleep state and publisher published the message to the broker but subscriber is in sleep state then broker will wait till subscriber wakeup and forwards the publish message? or broker will discard the message?

    Regards,

    Sravan Rikka

Reply
  • Hi Øyvind,

    1. Is the GPS functionality can be enabled using nRF9160? If yes, can you please share the steps or procedure.

    2. OTP memory available in nRF9160? if yes, how to access it?

    3. If there is no catM1 or NBIOT network then will it fall back to 2g/3g?

    4. When used QoS as 1 or QoS 2 and if the broker is down and how many times the nRF9160 retries sending publish message to the broker?

    5. QoS 1 or QoS 2 acknowledgements are handled by stack right? not handled in application level? If application wants to know that publish is successfully received by broker, is it possible, if yes please provide procedure.

    6. nRF9160 subscribe for a topic and went to sleep state and publisher published the message to the broker but subscriber is in sleep state then broker will wait till subscriber wakeup and forwards the publish message? or broker will discard the message?

    Regards,

    Sravan Rikka

Children
  • Hello, 

    sravan.rikka said:
    1. Is the GPS functionality can be enabled using nRF9160? If yes, can you please share the steps or procedure.

    Yes, the nRF9160 support GNSS. Have a look at our GNSS sample, and the Modem Library chapter on GNSS. You can also use the Serial LTE Modem application to configure GPS.

    Please note: GPS receiver operation is time multiplexed with the LTE modem, and GPS and QZSS position can be received while the LTE modem is in RRC Idle mode, power saving mode (PSM), or completely deactivated. See GPS Receiver chapter in nRF9160 Datasheet

    sravan.rikka said:
    2. OTP memory available in nRF9160? if yes, how to access it?

    Yes, the OTP region of UICR is emulated by placing a write-once per halfword limitation on registers defined here. Please see OTP subsection in Key Management Unit (KMU) chapter and OTP in the UICR register.

    sravan.rikka said:
    3. If there is no catM1 or NBIOT network then will it fall back to 2g/3g?

    No. The nRF91 series support CatM1 and NB-IoT only.

    sravan.rikka said:
    4. When used QoS as 1 or QoS 2 and if the broker is down and how many times the nRF9160 retries sending publish message to the broker?
    1. / .5 The application itself does not have built-in Quality of Service (QoS) handling. While the MQTT helper stack supports acknowledging QoS messages, it’s the responsibility of the application layer to implement full QoS behavior. This can be achieved by integrating the Quality of Service (QoS) library, which provides the necessary tools to manage message delivery guarantees.

    sravan.rikka said:
    6. nRF9160 subscribe for a topic and went to sleep state and publisher published the message to the broker but subscriber is in sleep state then broker will wait till subscriber wakeup and forwards the publish message? or broker will discard the message?

    • When a device is subscribed to a topic, the broker will immediately deliver any published messages to it, provided the device is awake and connected. If the device is asleep, message delivery depends on whether the cellular network buffers messages during that period. Please note that not all networks support message buffering, so this behavior can vary depending on the operator and configuration.

    Kind regards,
    Øyvind

Related