Connman v1.37 name resolving blocks for 20 seconds while not connected

When all networks are not connected name resolving takes ~20seconds. This makes application irresponsive for that amount of time. I would not plain if it was in C/C++ , but it is in some scripting language where we have no threads.
I think it should return with error immediately, especially when none of interfaces has IP assigned. At least it is so on Windows PC.
Editing connman.service to disable dnsproxy by adding -r switch solved this issue but produces another one. With -r switch connman tethering stops working. The problem is tethering client machines don’t receive IP address assignment. So with -r name resolving doesn’t block for 20 seconds, but tetheritng is working. And without -r tethering works and name resolving blocks for 20 seconds…

Is there a reason for why 2 years old connman 1.37 is provided with yocto? Who regulates this? Any chances someone could give instructions to crosscompile connman without yocto?

Is network manager better in this respect? Could someone try how it is with network manager, does ping by name blocks for that long when all cables are unplugged and WiFi not connected?

Thanks,

Edward

Looks like it’s time to switch from connman to systemd-networkd. I didn’t know it’s so flexible and includes pretty everything like DHCP server/client, DNS resolving and much more. Peeks wpa_supplicant established connections well, etc.

Hi @Edward

Thanks for writing to Toradex community!

Is there a reason for why 2 years old connman 1.37 is provided with yocto? Who regulates this? Any chances someone could give instructions to crosscompile connman without yocto?

We have been using connman till now which is a working solution. The version of connman is defined by the version of the Yocto Project as you can see here. You may download the sources here and crosscompile using the cross-compile toolchain.

As you already wrote, you may also switch to other network managers as described here.

Best regards,
Jaski

Hi @jaski.tx ,

After you moved from init.d to systemd, which I had no time then to learn deep enough, connman seemed to be the only and quite good solution. I made all required SW around connman to solve our networking needs. It was my fault I didn’t check how good is systemd-network. Perhaps it wasn’t so good then, but it is very good and flexible now. As well it fixes nasty 20 second resolve block when not connected.
It would solve me time to not move away from connman, but I don’t know who to ask to make nasty 20 seconds delay fixed. As well it doesn’t seem to be fixed quickly.

Regards,
Edward

Hi @Edward

I also don’t know how to solve the issue with connman. Maybe the best is not use any network manager.

Best regards,
Jaski