This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Setup nRF Cloud with own boards by using AT commands

We have developed our own application board with the nRF9160 on it according to the reference design.

The modem is connected to an application controller by UART (no HW Ctrl pins) and I have the same UART to connect from outside.

I wanted to know if it is possible to connect it to the nRF Cloud for test reasons (just send some packages)

For the moment I use the "Serial LTE modem" Software (removed RTS/CTS) to send AT commands from application controller.

In general I can get a connection with the LTE/NB-ioT and get an IP address.

Questions:

- Is it possible to connect to the nRF Cloud just using AT commands?

- How can I use / update a certificate (only AT)?

- How do the packages look like that must be sent (by AT)?

Thanks for helping...

Regards,

Bernd

Parents
  • Hello Bernd, 

    Have you looked at the nRF Cloud documentation? From the Serial LTE Modem you should be able to communicate with nRF Cloud using either MQTT or REST API.

    Kind regards,
    Øyvind

  • Hi Øyvind,

    Because it seems that there is a more basic problem with connecting I have setup an AWS thing and try to connect it with MQTT AT commands and the FOTA example. I cannot get a connection in general.

    MQTT FOTA Sample Settings
    ■ Security tag for TLS credentials <CERT_SEC_TAG> 1000
    Custom MQTT client ID <USE_CUSTOM_CLIENT_ID> 
    ■ Client ID <CLIENT_ID> nRF9160_BMS
    ■ AWS IoT MQTT broker hostname <MQTT_BROKER_HOSTNAME> a2lfsfrs57xcmu-ats.iot.eu-central-1.amazonaws.com
    ■ AWS IoT MQTT broker port <MQTT_BROKER_PORT> 8883
    ■ MQTT message buffer size <MQTT_MESSAGE_BUFFER_SIZE> 256
    ■ MQTT payload buffer size <MQTT_PAYLOAD_BUFFER_SIZE> 256

    The FOTA returns:

    SPM: NS image at 0x20200
    
    
    
    
    SPM: NS MSP at 0x2001e248
    
    
    
    
    SPM: NS reset vector at 0x25c91
    
    
    
    
    SPM: prepare to jump to Non-Secure image.
    
    
    
    
    *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    
    
    
    
    MQTT AWS Jobs FOTA Sample, version: v1.0.0
    
    
    
    
    Initializing modem library
    
    
    
    
    Initialized modem library
    
    
    
    
    LTE Link Connecting ...
    
    
    
    
    LTE Link Connected!
    
    
    
    
    IPv4 Address 35.156.166.89
    
    
    client_id: nRF9160_BMS
    
    
    
    
    ERROR: mqtt_connect -111

    What could be the problem?

    Regards,

    Bernd

  • Hello Bernd,

    I'll let Øyvind confirm but what I remember, MQTT connect error -111 means connection refused.
    This could be related to wrong/missing provisioning / registration of your nRF9160 on AWS.


    I am digging into this as well now.

    Best regards,
    Kevin

Reply Children
  • Hello Bernd and Kevin, 

    Kevin Kotinkar said:
    MQTT connect error -111 means connection refused.
    This could be related to wrong/missing provisioning / registration of your nRF9160 on AWS.

    Yes, this is correct. 

    I'm currently trying to find some more answers from our developers as well.  

     

    Bernd said:
    MQTT FOTA Sample Settings

     Do you mean AWS FOTA sample? Are you trying to connect nRF Cloud or AWS? 

    Thanks.
    -Øyvind

Related