Get access point related information like password, metered type and auto-connection

How can I get other access point related information like whether I can auto connect or not, metered type and password using NM 1.0 in PyGObject? It’s ok if someone can explain in other language because the logic and implementation should be the same I guess. I tried the following but the passwords(psk) are showing None for all:

for connection in Client.get_connections():
    setting = connection.get_setting_wireless_security()

    if setting:
        ssid = connection.get_setting_wireless().get_ssid().get_data().decode("utf-8")
        psk = setting.get_psk()
        print(f"ssid: {ssid}, psk: {psk}")

The ssid(s) are all showing correct though

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.