Using wpa_supplicant via dbus in python - error
dcbw at redhat.com
Thu Aug 14 14:26:01 EDT 2008
On Thu, 2008-08-14 at 06:53 -0700, James Rayner wrote:
> I'm writing a client using python and the dbus interface. Having
> looked at the example and the wpa_supplicant code, I've got as far as
> being able to scan, add/remove networks and interfaces. However when I
> try to set anything for a new network, it complains at the .set():
> fi.epitest.hostap.WPASupplicant.InvalidOptions: Did not receive
> correct message arguments.
> As suggested to someone else on the list, passing as a dbus Byte array
> didn't help.
> The code is here: http://pastebin.com/f122abeb8
You do need to pass a d-bus byte array, since SSIDs can contain embedded
NULLs and are not necessarily UTF-8. I think you can just cast the SSID
value to a dbus.ByteArray() when setting the dictionary member.
More information about the HostAP