Issue with connman in OSMC RC1 & RC2

Thanks, I was aware of the wait for network feature that sam was talking about in one of his posts, I just wasn’t sure was the same thing and came as an option in the network settings.
I do run a mysql video and music libray but they seem to load fine when kodi starts even if that option isn’t enabled. I suppose it is just to make sure that nothing that relies on network availability in kodi fails at boot.

We’re narrowed the problem down to a bug in connman that only occurs after you change to Static IP and back to DHCP. (Thanks for spotting that!)

For some reason the configuration file still retains the manual IP configuration even when dhcp is enabled, this is causing connman to get stuck in *Ac (connecting) state. Deleting the configuration file for the network allows you to go back to DHCP and connect without issues. For example:

sudo rm -rf /var/lib/connman/ethernet_*
sudo reboot

Will delete the configuration for the Ethernet interface completely, after a reboot it will auto create a DHCP configuration that works again.

What is unknown at the moment is why this apparently wasn’t an issue in RC1 as connman has not changed since then…

Edit: Just confirmed that this issue is there on a fresh install of RC1 as well, so it is not a new problem, it just wasn’t noticed before…

@nirvana80:

I believe we have now fixed this, if you would like to try a testing version of connman for us to help confirm it (and confirm it doesn’t introduce any other problems) you can download it here:

http://46.37.189.135/osmc/apt/pool/main/a/armv7-connman-osmc/armv7-connman-osmc_1.2.6_armhf.deb

Copy this to your Pi 2 or download it directly with wget and then install it using dpkg:

sudo dpkg -i armv7-connman-osmc_1.2.6_armhf.deb

For Pi 1 the package name prefix would be armv6 not armv7.

1 Like

Cool, I will ceartainly try this tonight.

Cheers.

That makes sense cause on RC1 I never changed the configuration from dhcp to static and back to DHCP, was always DHCP if I remember correctly.

I just installed it and tested it switching back and forth between Static IP and DHCP and rebooted a few times with each settings and I can confirm the issue has been resolved.

I have just one comment about the OSMC Settings Networking Gui, but that’s more esthetic then anything else, when on DHCP and the interface is enabled the IP information is shown in black which is fine, however if you disable and enable the adapter the interface refreshes to a blank IP settings screen because dhcp hasn’t brought up the interface yet showing the interface status as No wired connection. All it takes to get the right screen is to exit the networking gui to osmc and enter it again, then the IP details shows up correctly.

The GUI thing is not a bit deal but I thought I would mention it as it might throw some people into thinking they have no connectivity if they are on the pc pinging the IP or logged in to SSH.

Thanks again for the fix :slight_smile:

@DBMandrake
by the way you didn include the change related to /etc/connman.prefs in this version as I don’t see the file, did you?

Curiously I still have:

exec /usr/sbin/connmand -n --nodnsproxy --config=/etc/connman.conf

in /usr/bin/start-network from before the install.

Thanks for the confirmation that bug is fixed.

No, the addition of connman.prefs won’t be there - due to the fact that we originally started with the standard debian connman package all our custom configuration (including service file and start-network script) are actually in armv7-network-osmc. The connman package only has the executables.

Now that we use our own custom connman package we could move all the configuration files and scripts in to the same package but doing so seamlessly during an upgrade while possible is quite tricky to get right. (As transfer of ownership of certain files would have to be passed from one package to the other, and include version dependencies between the two packages)