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

aws_fota sample broken when CONFIG_PROVISION_CERTIFICATES is activated

Hello,

When CONFIG_PROVISION_CERTIFICATES is y and certificates are defined in certificates.h the program fails in provision_certificates() function,  the modem_key_mgmt_delete function never returns.

Version is master from this morning.

Parents Reply Children
  • Please do a test with aws_fota sample. Only set your broker, certificates and set CONFIG_PROVISION_CERTIFICATES

  • This is the actual modem_configure() code.

    static void modem_configure(void)
    {
    #if defined(CONFIG_LTE_LINK_CONTROL)
    	BUILD_ASSERT_MSG(!IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT),
    			"This sample does not support auto init and connect");
    	int err;
    
    	err = at_notif_init();
    	__ASSERT(err == 0, "AT Notify could not be initialized.");
    	err = at_cmd_init();
    	__ASSERT(err == 0, "AT CMD could not be established.");
    	printk("LTE Link Connecting ...\n");
    	err = lte_lc_init_and_connect();
    	__ASSERT(err == 0, "LTE link could not be established.");
    	printk("LTE Link Connected!\n");
    #endif
    }

  • Fabien Comte said:
    This is the actual modem_configure() code.

     Yes, I'm sorry, I used the modem_configure() from another sample. But still, it shows that lte_lc_init_and_connect() is called within it.

    Fabien Comte said:
    Please do a test with aws_fota sample. Only set your broker, certificates and set CONFIG_PROVISION_CERTIFICATES

     I can run it, but can you please run the example first and provide the output from the LTE Link Monitor? I need more information to know what I'm looking for, and if there is anything else failing. 

    When CONFIG_PROVISION_CERTIFICATES is y and certificates are defined in certificates.h the program fails in provision_certificates() function,  the modem_key_mgmt_delete function never returns.

     Your initial issue was that modem_key_mgmt_delete() never returns, and now it's  lte_lc_init_and_connect(). And with the fact that you have modified the sample, it is difficult for me to know what it the problem. 

    Let's start fresh:


    1. What version of modem FW are you running on your device?
    2. Revert the AWS_FOTA sample back to its original self. 
    3. Make sure that you follow the instructions for certificate.h (IMPORTANT)
    4. Now run the AWS_FOTA sample using the LTE Link Monitor to provide an output when connecting. 
      1. If it still hangs anywhere, we need to know why it's hanging. I.e. we need output from the terminal or an error code or similar. 
    5. If failed, please load the AT_client sample which gives more information about the connection

    Thank you.

    -Øyvind

Related