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

nrF9160 sample aws_fota

I am trying to implement the AWS FOTA sample from SDK V1.4.2.

I have already implemented the AWS IOT sample which works fine.

However, the AWS FOTA fails with mqtt_connect errror -22.

The log is shown below:

*** Booting Zephyr OS build v2.4.0-ncs2  ***


MQTT AWS Jobs FOTA Sample, version: 2.0.0


Initializing bsdlib


Initialized bsdlib


LTE Link Connecting ...


I: PDP Context: AT+CGDCONT=1,"IP","arkessalp.com"


LTE Link Connected!


IPv4 Address 54.154.11.137


client_id: TDG_logger_thing


mqtt_transport_connect FAILED


ERROR: mqtt_connect -22


My prj.cfg file is attached:

5270.prj.conf

Can you point out where it's gone wrong?

Parents
  • Hi Marte,

    Thanks for your help.

    I have changed the prj.conf file as per your directions and moved things on a bit.

    It does successfully connect to the MQTT broker but I'm not seeing that it is susbcribing to the topic (as per Nordic documentation)

    [mqtt_evt_handler:129] MQTT client connected!
    [00:00:14.106,140] <inf> aws_jobs: Subscribe: $aws/things/nrf-aws-fota/jobs/notify-next

    My topic is:
    $aws/things/TDG_logger_thing/jobs/notify-next
    Here is what I am seeing:
    client_id: TDG_logger_thing
    
    
    
    
    hostname: a3vecosqszzrnz-ats.iot.eu-west-1.amazonaws.com
    
    
    
    
    [mqtt_evt_handler:182] MQTT client connected!
    
    
    [mqtt_evt_handler:235] PUBACK packet id: 50475
    
    
    
    
    [mqtt_evt_handler:245] SUBACK packet id: 2114
    
    
    
    
    [mqtt_evt_handler:193] MQTT client disconnected -128
    
    
    
    
    ERROR: mqtt_input -128
    
    
    
    
    Disconnecting MQTT client...
    
    
    
    
    Could not disconnect MQTT client. Error: -128


    Can you tell me what is wrong here?

    Many thanks

  • Hi Marte,

    We did follow the guide for setting up the S2 bucket and creating a thing in AWS IoT - and correctly I think.

    I'm attaching the modem trace.

    I am using nrF9160DK.

    trace-2021-03-17T16-20-13.110Z.bin

    ,Thanks for your help,

    Dermot

Reply Children
Related