NRF9160 DK, setup LTE/NB-IOT connection for samples aws_iot, aws_iot_mqtt

As I understand it, the nrf samplesaws_iot and aws_iot_mqtt assume there a network connection up and running.

I am trying to adapt the sample to create the connection via LTE or NB-IOT.

Before trying to modify the samples, I proved the board works using the https_client sample.

However the http_client sample is configured for a non-secure setup while aws_iot and aws_iot_mqtt are not.

So just copying the network setup is not working (it can be I am going about it in the wrong way ).

The connection manager is just a frontend for available network interfaces. So I assume I still need to tell it which interface to use.

Can anyone point me in the right direction because studying the documentation and other samples does not get me to a solution.

Thanks

Parents
  • Hello,

    However the http_client sample is configured for a non-secure setup while aws_iot and aws_iot_mqtt are not.

    Can you explain what you mean by this? There are overlays and config files for non-secure build.

  • Thank you Hakon for looking into this.

    From your question I conclude that I do not fully understand the configuration and build intrinsics and that makes sense as I am new to the SDK and am still studying documentation and samples.

    I thought it would be an easy excercise to add LTE connectivity to the aws_iot sample or add aws_iot to the https_client sample.

    My target is putting certificates in the store and connect to aws_iot. After that I will implement a serial connection and read a voltage by ADC. That would be the application.

    Can you advice or point me to samples/documentation to make this happen? I also saw somewhere an article about a method to get certificates and code onto the chip in production.

    I am a newbe and am grateful for all help.

  • Okay, first of all may I ask you what board you are building for? Are you building for nrf9160dk_nrf9160_ns? Then the overlays and configs should be automatically included in the build.

  • Yes, I am now building for nrf9160dk_nrf9160_ns. I managed to get things working. I was able to use code from the https_client example and the aws_iot example and have the certificates in the certificate store.

    I am now in the process of adding a uart connection on uart2 and  an ADC for 1 channel.

    It is still not clear to me what exactly is the difference between building for non secure and secure. Can I just switch  build environment? Do I need to make code changes when building for secure, use different libraries?

    In the end I want a single image and I expect to manage without using threads, just interrupt driven code.

    If you can point out to me what to pay attention for so that I can move forward in the right direction, that would be great.

    Thank you

  • leonardo17 said:
    It is still not clear to me what exactly is the difference between building for non secure and secure. Can I just switch  build environment? Do I need to make code changes when building for secure, use different libraries?

    If you are intending to use the nrf modem, then should build for non-secure board. If you are not, then I have no idea why you would choose to use the nrf9160 in the first place. Anyhow, building for non-secure board is generally what you should be doing when developing for nrf9160.

  • Thank you for making this clear. Let's close this ticket

Reply Children
No Data
Related