You are not logged in.

#1 2023-03-29 01:32:02

scruffidog
Member
Registered: 2010-01-10
Posts: 26

connman iwd and the wiki

After revisiting the ConnMan wiki page, and particularly the IWD section, I think the integration process can be greatly simplified and all the extra custom service files are not really necessary due to some of the upstream work.

All I did on a virgin install (this is just to make sure there's no cruft or legacy stuff hidden somewhere) was to install connman and iwd:

pacman -Sy connman iwd

The systemd configuration was pretty simple:

systemctl enable connman
systemctl add-requires connman iwd

You should have:

/etc/systemd/system/connman.service.requires/iwd.service -> /usr/lib/systemd/system/iwd.service
/etc/systemd/system/multi-user.target.wants/connman.service -> /usr/lib/systemd/system/connman.service

The conf files /etc/{connman,iwd}/main.conf are pretty bog standard and should not require any tweaking.
And that's it. ConnMan will manage all the network interfaces with optional DNS resolution and NTP, if and when there's connectivity. No need for custom service files, etc.

Optional tweak: for my own preference, it seems ConnnMan auto-invoke connman-vpn which annoys me so I also mask the service:

systemctl mask connman-vpn

If this works for others, maybe we can get the wiki updated to reflect something more current ?

Last edited by scruffidog (2023-03-29 01:33:16)

Offline

#2 2023-03-29 10:22:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,754

Re: connman iwd and the wiki

You are ignoring the point the relevant section makes that you'll want to ensure that iwd is used even if wpa_supplicant is already installed. You are right in so far that this could be handled with a simple override that just adjusts the requires and likely only the Exec= line. In any case the wiki is there to be changed and ammended, so feel free to potentially add an additional section/point for the simplified case of only having iwd installed.

FWIW the best way to ask about improvements to a wiki page without making the edit outright, is to add your points to the talk section of the page, that way previous editors/wiki admins will get notified of your intention to change something.

Last edited by V1del (2023-03-29 10:22:56)

Offline

#3 2023-03-29 11:25:27

scruffidog
Member
Registered: 2010-01-10
Posts: 26

Re: connman iwd and the wiki

I guess I need to add preceding words for the specific use case I intend for the post. It is not intended for those who need wpa_supplicant for other network authentication. It is for those that use connman in conjunction with iwd, don't have wpa_supplicant installed and to minimize the amount of deviations to a standard install, even though there's a tremendous amount of flexibility to doing so.

I probably will add to the discussion over in the wiki section, once others have confirm this works and does not creates unforeseen issues. I will probably edit my first post to reflect the use case.

Last edited by scruffidog (2023-03-29 16:02:11)

Offline

#4 2023-03-29 12:23:02

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: connman iwd and the wiki

But that use case (not having wpa_supplicant installed) is already covered, so what you really want is to make that clearer to prevent others from having the same misunderstanding? (That section does seems a bit messy because of multiple authors/edits.) And you're actually doing more work than the wiki currently suggests, namely the add-requires. It seems connman can autostart iwd (dbus activation?), so the Requires would not be needed* and if autostart does not work, it makes sense to also include the After.

Assuming autostart does work, the only crucial change (for the other use case) to force use of iwd would then be the --wifi option on the Exec line. That part could indeed be simplified with an override/drop-in file (but "all the extra custom service files" is really only that one, right?).

* unless you want other side-effects of Requires, like connman stopping/restarting whenever iwd stops/restarts. If you want connman for more than just wifi, Requires might be too strong.

Offline

#5 2023-03-29 17:10:12

scruffidog
Member
Registered: 2010-01-10
Posts: 26

Re: connman iwd and the wiki

You're right about wanting to clarify what works for me in my particular situation which a laptop with an ethernet. I think what worked for me (which I hope someone else can confirm before tackling the wiki arbitrarily) was a simpler process than what was outlined currently. Any other config may or may not be appropriate and probably needs some tweaking.

As far as the auto start of iwd, I guess I should have noted that did NOT work, as I thought it might have, magically. Hence the add-requires.

At least to me, a series of file operation(s) is less burdensome than editing and maintaining the contents of a file. If someone wants to maintain content, that's fair. I no longer have that kind of spare bandwidth or capacity.

I've noticed that connman and iwd are fairly loosely coupled in that the restart of one does not affect the other. They functionally connect back without additional work after a restart of either.

Last edited by scruffidog (2023-03-29 19:08:20)

Offline

#6 2023-03-30 16:10:20

scruffidog
Member
Registered: 2010-01-10
Posts: 26

Re: connman iwd and the wiki

Just a quick update: this configuration, seems empirically to be much more "responsive". In the past, under the wiki sanctioned methodology of using the connman_iwd.service file, the system coming out of sleep would 9/10 require some sort of intervention via connmanctl (scanning, connecting, disabling/enabling, manually or in my case, within connman-gtk) or various combinations of systemctl restart. I've had everything from "no carrier" on the wifi interface, passphrase failures, missing ssids, etc. It usually takes just about a minute and sometimes longer to restore connectivity.

To be fair, there's been a number of changes in addition to the configuration setup, like new versions of connman, iwd, systemd and the kernel. The new responsiveness of seconds vs. minutes may be a culmination of factors, and not just this specific integration tweak. This is across the board with both intel wifi-6 and RTL8852AE wifi-6e based systems. The "responsiveness" and stability seems to be especially pronounced on the Realtek, given the prior, less than ideal experiences with that hw.

Last edited by scruffidog (2023-03-30 16:16:39)

Offline

Board footer

Powered by FluxBB