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

POLLHUP message in asset_tracker

I am using  asset_tracker as the basic program and basically it is running fine and sending data to the RF connect web page.

However approximately every 30 minutes I get the POLLHUP signal. at that point it executes the following code

LOG_ERR("Socket error: POLLHUP");
LOG_ERR("Connection was closed by the cloud.");
error_handler(ERROR_CLOUD, -EIO);
return;

this does a system reboot. Is there anyway to stop this from happening? if not is there a way to gracefully reconnect in asset_tracker without a system reboot. It is quite annoying and I am sure our customers would want this removed. I appreciate any help you can give. this is quite repeatable ~30 minutes forever.

  • Hi.

    The asset_tracker is configured to reboot when it encounters an error.

    The easiest way to change that is to set (=y) CONFIG_DEBUG, or unset (=n) CONFIG_REBOOT in the prj.conf file.

    However, you can control the behavior more exact by modifying the error_handler() function.

    The reason for the reboot is to try to solve potential problems with the modem, or the application-modem communication.

    However, it might be enough to simply try to reconnect to the cloud, or the network. A reboot is just the easiest catch-all solution.

    The more interesting question (to me), is why you receive the POLLHUP in the first place. Could you take a modem trace, for me to investigate further?

    Best regards,

    Didrik

  • Didrik

    I found that the original asset_tracker was sending sensor data to the cloud every 30 seconds. I am sending sensor data to the cloud every 15 minutes (system requirement). I did try to send sensor data every 30 seconds and the system ran for 2 hours with no POLLHUP.

    I changed the MQTT_KEEP_ALIVE to 60 seconds and ran for ~24 hours with no POLLHUP seen. I am going to keep the board running and add additional boards to test if this fixes the problem.

Related