Hello,
With version of few hours ago, I retried tests with aws_fota and it looks broken.
mqtt connection looks correct but mqtt_live returns -EAGAIN.
Hello,
With version of few hours ago, I retried tests with aws_fota and it looks broken.
mqtt connection looks correct but mqtt_live returns -EAGAIN.
Could you try to modify the while(1) loop in main() in \ncs\nrf\samples\nrf9160\aws_fota\src\main.c, accodringly and run your example:
while (1) {
err = poll(&fds, 1, K_SECONDS(CONFIG_MQTT_KEEPALIVE));
if (err < 0) {
printk("ERROR: poll %d\n", errno);
break;
}
err = mqtt_live(&client);
if (err != 0) {
printk("ERROR: mqtt_live %d\n", err);
//break;
}
if ((fds.revents & POLLIN) == POLLIN) {
err = mqtt_input(&client);
if (err != 0) {
printk("ERROR: mqtt_input %d\n", err);
break;
}
}
if ((fds.revents & POLLERR) == POLLERR) {
printk("POLLERR\n");
break;
}
if ((fds.revents & POLLNVAL) == POLLNVAL) {
printk("POLLNVAL\n");
break;
}
if ((fds.revents & POLLIN) == POLLIN) {
printk("POLLIN\n");
//break;
}
if ((fds.revents & POLLHUP) == POLLHUP) {
printk("Socket error: POLLHUP\n");
return;
}
if (do_reboot) {
/* Teardown */
mqtt_disconnect(&client);
sys_reboot(0);
}
}
Best regards,
Simon