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.
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.
it loops at err = at_cmd_write("AT+CMEE?", response, sizeof(response), NULL); in cmee_active() function
Hello,
Do someone at Nordic could help me please ? It's easy to replay on nRF9160 DK.
Fabien Comte said:I had to move modem_configure() before but lte_lc_init_and_connect() after.
I'm sorry, but this isn't really helping me help you.
Can you provide some more information on what is actually failing? Can you provide output from the LTE Link Monitor or similar?
modem_configure() calls lte_lc_ini_and_connect() inside itself:
/**@brief Configures modem to provide LTE link. Blocks until link is * successfully established. */ static void modem_configure(void) { #if defined(CONFIG_LTE_LINK_CONTROL) if (IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT)) { /* Do nothing, modem is already turned on * and connected. */ } else { #if defined(CONFIG_LWM2M_CARRIER) /* Wait for the LWM2M_CARRIER to configure the modem and * start the connection. */ printk("Waitng for carrier registration...\n"); k_sem_take(&carrier_registered, K_FOREVER); printk("Registered!\n"); #else /* defined(CONFIG_LWM2M_CARRIER) */ int err; 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 /* defined(CONFIG_LWM2M_CARRIER) */ } #endif /* defined(CONFIG_LTE_LINK_CONTROL) */ }
Fabien Comte said:No I have issues. Could you test it please ?
What are the issues you are seeing?
My certificates are ok.
My issues are, often lte_lc_init_and_connect() never returns.
Your modem_configure() function is different vs the one in aws_fota sample...
Please do a test with aws_fota sample. Only set your broker, certificates and set CONFIG_PROVISION_CERTIFICATES
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:
Thank you.
-Øyvind