nRF9160 thingy91 - AWS IOT (sample): Connect errors -11 and -10

Hello All,

This is from an app I had working 1 1/2 months ago - when I've tried recently to get it connected again, I haven't been successful.

The latest asset tracker appears to work find and posts data to the nRF Cloud.

I've seen previous posts - DNS is working - or appears to be ok.

I'm getting the following:

===

+CSCON: 0


RRC mode: Idle


Next connection retry in 30 seconds


AWS_IOT_EVT_CONNECTING


+CSCON: 1


RRC mode: Connected


E: getaddrinfo, error -11


E: client_broker_init, error: -10


AWS_IOT_EVT_CONNECTING


+CSCON: 0


RRC mode: Idle


Next connection retry in 30 seconds


AWS_IOT_EVT_CONNECTING


+CSCON: 1


RRC mode: Connected


E: getaddrinfo, error -11


E: client_broker_init, error: -10


AWS_IOT_EVT_CONNECTING


+CSCON: 0


RRC mode: Idle

====

I can reload the asset tracker and it'll work fine.  I'm running the AWS_IOT sample code.

Thanks in advance as to what -11 and -10 mean - it would appear getting the address fails - I tried to find error codes that make sense but not sure and wanted to ask in case something has changed in the last 1 1/2 months.  This app used to run without issue.

Thanks!
jwest

  • Didrik,

    Found the .hex file - and getting this:

    SPM: NS image at 0x1c200
    
    
    
    
    SPM: NS MSP at 0x2001f8b0
    
    
    
    
    SPM: NS reset vector at 0x222c1
    
    
    
    
    SPM: prepare to jump to Non-Secure image.
    
    
    
    
    *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    
    
    
    
    I: Modem library is not yet initialized, AT commands not sent
    
    
    
    
    I: Configuration of MAGPIO and COEX0 is left to drivers
    
    
    
    
    The AWS IoT sample started, version: v1.0.0A
    
    
    
    
    LTE cell changed: Cell ID: 170924863, Tracking area: 35667
    
    
    
    
    RRC mode: Connected
    
    
    
    
    Network registration status: Connected - home network
    
    
    
    
    Next connection retry in 30 seconds
    
    
    
    
    PSM parameter update: TAU: -1, Active time: -1
    
    
    
    
    AWS_IOT_EVT_CONNECTING
    
    
    
    
    DATE_TIME_OBTAINED_NTP
    
    
    
    
    AWS_IOT_EVT_DISCONNECTED
    
    
    
    
    W: connection_poll_start failed, error: -119
    
    
    
    

    So, -119 is there.

    All 3 of the previous build files are returning -119 on the aws_iot_connect command:

    aws_iot_connect, error: -119

    Maybe that actually means the certificates are incorrect.(?)

    Thanks,
    johnwest

  • johnwest said:
    Running what's in v1.7.1 - with latest firmware - 1.3.1.

    Did you make any changes?

    If not, it will default to use the hostname "example.endpoint.com", which doesn't exist.

    You need to change it to use the hostname of your AWS IoT Core.

    As for the -119, yes, it is possible it is due to the certificates. It is worth trying to update them to see if that helps.

  • Didrik,

    I guess the root cause here is the prj.conf doesn't appear to get updated after it's changed.

    I got the demo running again - but posting to an S3 location that was just for testing.  I changed it - and the tools got the settings stuck again.
    I got in the debugger and found the settings 'stuck' in autoconf.h (a name from the unix world, obviously); it kicked off cmake - then the v5.60 Embedded Studio environment promptly crashed.  I've seen that before.  But, it made merged.hex before croaking and I'm able to post now to S3:

    SPM: NS image at 0x1c200

    
    
    
    
    SPM: NS MSP at 0x200238d8
    
    
    
    
    SPM: NS reset vector at 0x2231d
    
    
    
    
    SPM: prepare to jump to Non-Secure image.
    
    
    
    
    *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    
    
    
    
    I: Modem library is not yet initialized, AT commands not sent
    
    
    
    
    I: Configuration of MAGPIO and COEX0 is left to drivers
    
    
    
    
    The AWS IoT sample started, version: v1.0.0
    
    
    
    
    Board: thingy91_nrf9160
    
    
    
    
    Host: ABCDEFG-ats.iot.us-west-1.amazonaws.com
    
    
    
    
    Port: 8883
    
    
    
    
    Client ID: my-thing
    
    
    
    
    Security Tag=12345678
    
    
    
    
    Command MaxLen=2700
    
    
    
    
    LTE cell changed: Cell ID: 170924863, Tracking area: 35667
    
    
    
    
    RRC mode: Connected
    
    
    
    
    Network registration status: Connected - home network
    
    
    
    
    Next connection retry in 30 seconds
    
    
    
    
    PSM parameter update: TAU: -1, Active time: -1
    
    
    
    
    AWS_IOT_EVT_CONNECTING
    
    
    
    
    DATE_TIME_OBTAINED_NTP
    
    
    
    
    AWS_IOT_EVT_CONNECTED
    
    
    
    
    Publishing: {	
    "state":
    {
    "reported":
    {		
    "app_version":	
    "v1.0.0",	
    "batv":
    4394,	
    "ts":	
    1636008654905
    }	
    }
    
    
    
    
    } to AWS IoT broker
    
    
    
    
    PSM parameter update: TAU: -1, Active time: 60
    
    
    
    
    AWS_IOT_EVT_READY
    
    
    
    
    AWS_IOT_EVT_DATA_RECEIVED
    
    
    
    
    Data received from AWS IoT console:
    
    
    
    
    
    
    Topic: $aws/things/my-thing/shadow/get/accepted
    
    
    
    
    
    

    ...

    So, is Segger supporting Embedded Studio or is that waning at the moment?  The stability of the tools appears tenuous at best.

    So, getaddrinfo() was getting an incorrect endpoint because the process to update the endpoints in prj.conf is apparently broke.

    This seems to be a rather well-known issue at Nordic - I'm at a loss as to why that wasn't pointed out early on as -11 is a 'fingerprint'

    if you will for this error.

    Regards,
    johnwest

  • It's good to hear you got it working.

    johnwest said:
    So, is Segger supporting Embedded Studio or is that waning at the moment?  The stability of the tools appears tenuous at best.

    We recently released a plugin for VS Code, which can be used instead of Segger Embedded Studio.

    https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-VS-Code/

    We will continue to support Segger Embedded Studio, but I recommend you look at the VS Code plugin as it better fits the nRF Connect SDK workflow.

    Amongst other things, the VS Code plugin will automatically detect changes to the prj.conf file, which SES isn't able to.

  • We will continue to support Segger Embedded Studio, but I recommend you look at the VS Code plugin as it better fits the nRF Connect SDK workflow.

    Didrik,

    From the way this thread reads - Nordic isn't supporting Segger Embedded Studio at all right now - if anyone claims to be using it - any issues are summarily ignored until that person keeps bringing the issue up.

    If we all don't start using VS Code - we don't get support - that's the actual, real message here.  

    If you are still actually supporting Segger Embedded Studio, how do I install the nRF Code Connect applet that helps with the SDK samples like what's in v5.60 in the newly released version 5.66?  I'll start a timer now and see how long it takes for this to be answered and works.  Yes, it'll have to work for the timer to stop.

    Regards,
    johnwest

Related