TypeError: could not convert 'AP' to type 'GArray_guchar_' when setting property 'NMSettingWireless.ssid'



Hello,

I am failing to construct connection argument for NMGtk.WifiDialog
in Python:

from gi.repository import NMGtk
from gi.repository import NetworkManager

... snip, snip

con = NetworkManager.Connection.new()

s_con = NetworkManager.SettingConnection()
uuid = NetworkManager.utils_uuid_generate()
s_con.set_property('uuid', uuid)
con.add_setting(s_con)

s_wifi = NetworkManager.SettingWireless()
s_wifi.set_property('ssid', ap.get_ssid())    <----------
s_wifi.set_property('security', "802-11-wireless-security")
con.add_setting(s_wifi)

... snip, snip

dialog = NMGtk.WifiDialog.new(client, settings, con, device, ap, False)



I don't seem to be able to set 'ssid' property of wireless setting(marked above):
s_wifi.set_property('ssid', ap.get_ssid())

getting:
TypeError: could not convert 'AP' to type 'GArray_guchar_' when setting property 'NMSettingWireless.ssid'


How should I construct suitable object for 'ssid' property?
Is there a type that would be converted?

Thanks,

Radek



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]