Can't connect when SSID or key contains < character
meeusen opened this issue · 0 comments
meeusen commented
Windows 7
Python 2.7.9 32-bit
PyWiFi 1.1.10
When trying to connect to a network, and the SSID or key contains a "<" character, pywifi is not able to create the network profile (looking at Control Panel - Network and Internet - Manage Wireless Networks).
When using < in the Profile.ssid or Profile.key, and calling interface.add_network_profile(), there is no error, but there is also no network profile created. When using <, a network profile is created, but a connection with that profile fails.
I only have a problem with the < character. The >, & or " characters don't show this issue, I can just use them in the SSID or key.
import pywifi
pw = pywifi.PyWiFi()
i = pw.interfaces()[0]
p = pywifi.Profile()
p.ssid = "My<SSID"
i.add_network_profile(p)
# no network profile is created
p.ssid = "My<SSID"
i.add_network_profile(p)
# A network profile "My<SSID" is created, but a connection with that profile fails