Dfu refused connection

Hi, I’m trying to use golioth for dfu ota. The board I use is nrf9160dk and ncs is 2.2.0, I had some problem with connecting lte but now it works, there’s only two things mcuboot image is not confirmed, it says magic=unset for primary and secondary image. The other things is that golioth return:
golioth_system: failed to connect: -111
and I don’t know why and where it comes from. I found errno.h that have -ECONNREFUSED but is the only file where i found it.
I use psk authentication, I have to use the other method too. Why my connection is refused the address is coap.golioth.io and default port.
I need help asap.

Hi Serjo,

Sorry to hear you’re having issues. Hopefully we can help get you unstuck. It sound like it may be more than one issue. Let’s start with some basic information:

What version of the Golioth SDK are you using? (You can run git rev-parse HEAD in the modules/lib/golioth directory to find this info.)

Are you using the samples/dfu application or trying to add OTA to an existing project?

The version is 2f301e6784cfd75daede917b308fd15e7a34bbe8
I tried with dfu sample and with a new project.

Now it says:
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.501,586] golioth_system: Initializing
[00:00:01.534,637] lte_monitor: Network: Searching
[00:00:01.595,916] lte_monitor: RRC: Connected
[00:00:03.707,702] lte_monitor: Network: Registered (roaming)
[00:00:03.708,221] app: Starting…
[00:00:03.708,557] golioth_dfu: updater_thread_fn: Start DFU sample
[00:00:03.708,587] golioth_samples: Waiting for interface to be up
[00:00:03.708,648] golioth_system: Starting connect
[00:00:33.713,378] golioth: Fail to get address (coap.golioth.io 5684) -11
[00:00:33.713,409] golioth_system: Failed to connect: -11
[00:00:33.713,409] golioth_system: Failed to connect: -11

Hi Serjo,

Have you seen the device as reporting “connected” to the platform at any point? You can find this on the device detail page and it looks like this:

Want to make sure there was an initial connection to the cloud. You said in your original post

I use psk authentication, I have to use the other method too.

Can you confirm you have seen the device connect to the cloud using the DFU sample or other samples?

@Serjo it looks to me like you are connecting the cell tower but that you don’t have a network connection. To further troubleshoot this I would suggest trying the Nordic Link Monitor which can tell you more about the connection. Here are the Nordic docs on that process:


I’ll check it all, but now I’m not sure let works. With LTE link monitor it tells me that I’m not connected even with CONFIG_LTE_AUTO_INIT_AND_CONNECT. Maybe I have to buy a new sim 'cause the one I use is not mine.

With lte link monitor I can enable all. Then I try with AT#XPING=“”,45,1000 and AT#XCONNECT=“google.com”,8080, but both return failed: phone failure. What it means?
I use modem firmware mfw_nrf9160_1.3.3.zip and nrf9160dk_asset_tracker_v2_2022-12-08_188a1603.hex. I think there’s some problem on CONFIG_LTE_AUTO_INIT_AND_CONNECT because I have to turn on lte from at commands. It never connects to the cloud. I have no last report from cloud, but I’m not sure my sim already can use network, because of this I’m trying ping.

@mike @ChrisGammell Hello, excuse me for bothering you. I’m on it again, now it works. The issue was caused by sim but now it returns Error in poll:95. What it means?