Closed zlinuxboy closed 2 years ago
list-connections.py
has similar problem, ConnectionType
Can not be imported. but device-state.py
is working well.
(wireless) rui@odc2-1 ~/w/s/l/p/e/block (master)> python list-connections.py
Traceback (most recent call last):
File "/home/rui/wireless/src/learn-pysdbus/python-sdbus-networkmanager/examples/block/list-connections.py", line 19, in <module>
from sdbus_block.networkmanager import (
ImportError: cannot import name 'ConnectionType' from 'sdbus_block.networkmanager' (/home/rui/wireless/lib/python3.10/site-packages/sdbus_block/networkmanager/__init__.py)
(wireless) rui@odc2-1 ~/w/s/l/p/e/block (master) [0|1]> python device-state.py
Interface Type State Internet Connection
lo Generic Unmanaged Unknown
eth0 Ethernet Unmanaged Unknown
usb_wifi1 Wifi Activated Limited wlusb1
usb_wifi2 Wifi Activated Limited wlusb2
p2p-dev-usb_wifi1 Wifi_P2P Disconnected None
p2p-dev-usb_wifi2 Wifi_P2P Disconnected None
wlvrf1 Vrf Activated Limited wlvrf1
wlvrf2 Vrf Activated Limited wlvrf2
Hello,
Did you use the PyPI version of python-sdbus-networkmanager
? It is still version 1.1
The examples use the latest master (and eventual version 2.0).
any plan to write a binding for wpa_supplicant dbus api? how is your developing progress of binding for systemd?
Eventually, or someone else can create them. I don't have much time currently to work on them. There is network manager binds version 2 and BlueZ binds that need to be released first.
Indeed, you are right, after install sdbus and sdbus-networkmanager with master. the example code work flawless. but the sdbus-networkmanager version is 1.2, not 2.0 as you mention above.
issue close
but the sdbus-networkmanager version is 1.2
The original plan was to add the settings classes and release 1.2 but there had been some incompatible changes so the next version will be 2.0
I am newbie in programming, want to utilize sdbus to manipulate wifi connection for a project, finally find your project. It's awesome, really. I am trying to figure out how python-sdbus-networkmanager works, when running example/sd_block/add-wifi-psk-connection.py, there is an error emitted:
My questions are: