andrew-bibb / cmst

QT GUI for Connman
174 stars 37 forks source link

Connecting to EAP fails with invalid argument, cannot be removed #225

Closed BenWestcott closed 2 years ago

BenWestcott commented 3 years ago

Security shown in the table in the "Wireless" tab is listed as "IEEE8021x".

The first connection attempt brought up the expected prompt, window title "Agent Input", but I did not fill in the "Identity" field in the EAP section.

Connection fails with net.connman.Error.InvalidArguments ("Invalid arguments"). This is somewhat expected, since the identity is required for EAP (though customizing the dialogue box to hide and require the relevant fields would be greatly appreciated).

However, I cannot remove the network to fix the credentails. Selecting the network then clicking "Remove" does nothing, and reconnection attempts still fail with InvalidArguments, without prompting for new credentials.

andrew-bibb commented 3 years ago

This is a hack, but should at least let you remove the problem service. As root or sudo navigate to /var/lib/connman and delete the entire folder containing the bad connection. You will then be able to recreate it with CMST.

After deleting the problem service another option would be to manually configure a service using the provisioning editor (need to enable Advanced controls in the preferences tab). This will allow you to manually configure and edit a service instead of letting ConnMan try to set it up automatically.

A service created using the provisioning editor can be edited and deleted by CMST. We do not allow editing of services created by any other means, including (maybe especially) ones created automatically by ConnMan. That is for security reasons. I need to research why the service was not being removed, that is odd. Selecting Remove invokes a call to ConnMan to remove a service so my guess it is something internal to ConnMan, but I can at least start by making sure the call to ConnMan is being made correctly.

BenWestcott commented 3 years ago

Perhaps the initial prompt was my imagination, or maybe I clicked the wrong access point, because after deleting all potentially relevant services, trying to connect still gives no prompt and invalid arguments. Further, I brought a different computer on-site, recently reimaged and never having been near the access point before, and it also has no credentials prompt and says invalid arguments.

andrew-bibb commented 2 years ago

Remove mainly removes the "favorite" property from the service, basically all it does is have Connman execute the "Remove" property on the service. If the service was in a "Failure" mode it would also reset the servcie.

A week or two back I fixed issue #202 which added an "Edit" button to the Wifi tab to edit services. That should allow edits to misconfigured services so I am going to close this one assuming that fix helped here as well.