10

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:

  1. connmanctl
  2. agent on
  3. scan wifi
  4. services
  5. connect
  6. 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?

4

0 回答 0