Hi Jirka.
I have been stuck in a peculiar situation.
As I said before, after adding the '802-1x' settings. I am able to connect
to the WPA/WPA2-Enterprise network via "ActivateConnection" dbus-api.
However, if I pre-save the network-settings-profile (via python
configparser), and then load, I get the following error (I have not been
able to figure out the exact API call here, still in process; however, I
think that there may be some very basic error) ::
*1322623903.644373 ERROR dbus.service: Unable to append
({'802-11-wireless': {'security': '802-11-wireless-security', 'ssid':
dbus.ByteArray('MTNL')}, 'connection': {'timestamp': 1322623871,
'autoconnect': True, 'type': '802-11-wireless', 'id': 'Auto MTNL', 'uuid':
'c467a80dd4c64d7abc1ab94fa543f8f2438191b4'}, '802-1x': "{'ca_cert':
'file://usr/local/etc/raddb/certs/ca.pem', 'phase2_auth': 'pap',
'anonymous_identity': 'anonymous', 'eap': ['ttls'], 'password': 'hello',
'identity': 'John Doe'}", '802-11-wireless-security': {'key-mgmt':
'wpa-eap', 'pairwise': "['tkip']", 'group': "['tkip']", 'proto': 'rsn'}},)
to message with signature a{sa{sv}}: <type 'exceptions.TypeError'>: string
indices must be integers, not str*
Also, the NetworkManager logs (in /var/log/messages) are ::
*Nov 30 08:58:52 ajay NetworkManager[1478]: <info> couldn't retrieve
connection settings: Traceback (most recent call last):#012 File
"/usr/lib/python2.7/site-packages/dbus/service.py", line 749, in
_message_cb#012 _method_reply_return(connection, message, method_name,
signature, *retval)#012 File
"/usr/lib/python2.7/site-packages/dbus/service.py", line 256, in
_method_reply_return#012 reply.append(signature=signature,
*retval)#012TypeError: string indices must be integers, not str#012.*
Note that, if I remove the '802-1x' setting-parameters from the pre-saved
profile, I *DO NOT* get the *Error: string indices must be integers, not str
*error.
Anything basic that I may be doing wrong?
Regards,
Ajay
On Mon, Nov 28, 2011 at 8:06 PM, Jirka Klimes <[email protected]> wrote:
> On Friday 25 of November 2011 21:25:18 Ajay Garg wrote:
> > Thanks Jirka,
> >
> > I understood, that there needed a set of key-value pairs, to be added
> under
> > the heading-setting '802-1x'.
> > It is working now - I am able to connect to the WPA2-Enterprise network.
> >
> > Thanks a ton !!
> >
> You're welcome. It's great that you got it working.
>
> You can find description of NM settings at [3]. A connection consists of
> settings, which in turn have some properties, see
> NetworkManagerConfiguration
> at [1]. The D-Bus API used to communicate with NM can be found at [2].
>
> [1] http://live.gnome.org/NetworkManager - wiki page about
> NetworkManager
> [2] http://projects.gnome.org/NetworkManager/developers/api/09/spec.html - D-
> Bus API specifications
> [3] http://projects.gnome.org/NetworkManager/developers/api/09/ref-
> settings.html - specification of connection settings
>
> Jirka
>
>
> > Ajay Garg wrote:
> > > You are a champ, Jirka.
> > > I am, in fact, trying to activate a connection - a WPA2-Enterprise
> type.
> > >
> > > The key-management is, in fact,
> > > wireless_security['key_mgmt'] = 'wpa-eap'
> > >
> > > I have also set
> > >
> > > wireless_security['proto'] = "rsn"
> > > wireless_security['pairwise'] = ['ccmp', 'tkip']
> > > wireless_security['group'] = ['ccmp', 'tkip']
> > >
> > >
> > > and also
> > >
> > > wireless_security['ssid']='Auto MTNL
> > > 'wireless_security['eap']='TTLS'
> > > wireless_security.['scan_ssid']=1
> > > wireless_security['identity']="John Doe"
> > > wireless_security['password']="hello"
> > > wireless_security['phase2']="auth=PAP"
> > > wireless_security['ca_cert']="/usr/local/etc/raddb/certs/ca.pem"
> > > wireless_security['anonymous_identity']="anonymous"
> > >
> > >
> > > but I see, the following (potentially non-fatal, but warnings
> > > nevertheless) logs:
> > >
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'password'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'ca_cert'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'anonymous_identity'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'scan_ssid'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'ssid'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'identity'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'phase2'
> > > Nov 25 00:57:17 ajay NetworkManager[1451]: <WARN> one_property_cb():
> > > Ignoring invalid property 'eap'
> > >
> > >
> > > Strangely, the above settings are seen as 'Config added:' when I do the
> > > connection via nm-applet, and not through python-dbus-apis. Obviously,
> I
> > > am able to connect through nm-applet, but not through python-dbus-apis.
> > >
> > > So, I am, in fact, missing the '802-1x' setting.
> > > Could you please let-me-know/point-to-the-relevant-docs the possible
> > > value(s) that
> > > wireless_security['802-1x'] may take? My 3-day long struggle may
> finally
> > > come to an end...
> > >
> > > Thanks for returning my confidence..
> > >
> > > Regards,
> > > Ajay
> > >
> > > Jirka Klimes wrote:
> > >> Your connection is not valid.
> > >> You probaly have a connection which requires '802-1x' setting, but it
> is
> > >> missing.
> > >> The setting is required for "ieee8021x" or "wpa-eap" key management.
> > >>
> > >> List your connection with:
> > >> nmcli con list id "Auto MTNL"
> > >>
> > >> You can create a valid connection using nm-connection-editor.
> > >>
> > >> Jirka
> > >> _______________________________________________
> > >> networkmanager-list mailing list
> > >> [email protected]
> > >> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>
_______________________________________________
networkmanager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list