Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkManager - AddConnection not working #260

Open
petergerten opened this issue Mar 31, 2019 · 1 comment
Open

NetworkManager - AddConnection not working #260

petergerten opened this issue Mar 31, 2019 · 1 comment

Comments

@petergerten
Copy link

petergerten commented Mar 31, 2019

Hi,

I try to translate the python example https://github.com/lcp/NetworkManager/blob/master/examples/python/add-connection.py to dbus-native.

but always get [ 'connection: setting not found' ]

My code looks like this:

systemBus.invoke(
    {
        path: '/org/freedesktop/NetworkManager/Settings',
        destination: 'org.freedesktop.NetworkManager',
        interface: 'org.freedesktop.NetworkManager.Settings',
        member: 'AddConnection',
        signature: 'a{sa{sv}}',
        body: [
	    {
	        '802-3-ethernet': {
		    'duplex': 'full'
		},
		'connection': {
		    'type': '802-3-ethernet',
		    'uuid': 'cccccccccccccccccccccccc',
		    'id': 'MyConnectionExample'
		},
		'ipv4': {
		    'method': 'ignore'
		},
		'ipv6': {
		    'method': 'ignore'
		}
	    }
	]
	,	    
	type: dbus.messageType.methodCall
    },
    function(err, res) {
        console.log(err, res);
    }
);

I suspect I might set something wrong in the body. Any suggestions?

@madhusudanhj
Copy link

madhusudanhj commented Nov 21, 2023

I think the body is what's wrong.
Sample.

[["connection",[["autoconnect-priority",["i",-999]],["id",["s","Wired connection 1"]],["interface-name",["s","ens160"]],["timestamp",["t",1699619344]],["type",["s","802-3-ethernet"]],["uuid",["s","4871f1e7-4149-39d6-abf9-19148f984b02"]]]],["802-3-ethernet",[["auto-negotiate",["b",false]]]],["ipv4",[["method",["s","auto"]]]],["ipv6",[["method",["s","disabled"]]]]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants