I'm trying to use Connman to manage the WiFi connection of my embedded system because it handles automagically any type of protection.
In interactive mode it's very simple:
- connmanctl
- agent on
- scan wifi
- services
- connect
- enter password if requested
On my system, the user enters the WiFi credentials (SSID, password) using a remote (web) application. Then I would use this information to setup connman using a script.
The goal is to avoid the user to select which type of protection is going to setup. I mean, most users just enter SSID/password but they don't know if it is a WPA-PSK or WEP connection.
I'm reading throught the documentation, but I'm not sure which is the correct approach:
but as far as I understand I need to specify the type of the security:
Security: The security type of the network. Possible values are 'psk' (WPA/WPA2 PSK), 'ieee8021x' (WPA EAP), 'none' and 'wep'. When not set, the default value is 'ieee8021x' if an EAP type is configured, 'psk' if a passphrase is present and 'none' otherwise.
It seems 'wep' is not handled if the field is omitted.
Here I understand it needs an 'agent' to feed the passphrase, thus I'm afraid I cannot send it programmatically.
Do you have any recommendation about?