You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use this module to establish a wifi connection in Windows, my code is as follows:
wifi=PyWiFi()
ifaces=wifi.interfaces()[0]
print(ifaces.name())
print(const.IFACE_CONNECTED)
print(const.IFACE_INACTIVE)
if ifaces.status() == const.IFACE_CONNECTED:
print("OK")
else:
print("ERROR")`
Now I wann make a wifi connection on Raspberry pi,using this code not succeed.
The "Prerequisites" : "On Linux, you will need to run wpa_supplicant to manipulate the wifi devices, and then pywifi can communicate with wpa_supplicant through socket." I think I should start here, but I don't know how to do it in particular. could you give me some advice? Thanks
The text was updated successfully, but these errors were encountered:
I can use this module to establish a wifi connection in Windows, my code is as follows:
wifi=PyWiFi()
ifaces=wifi.interfaces()[0]
print(ifaces.name())
print(const.IFACE_CONNECTED)
print(const.IFACE_INACTIVE)
profile = pywifi.Profile()
profile.ssid = ""
profile.auth = const.AUTH_ALG_OPEN
profile.akm.append(const.AKM_TYPE_WPA2PSK)
profile.cipher = const.CIPHER_TYPE_CCMP
profile.key = "**"
tmp_profile = ifaces.add_network_profile(profile)
ifaces.connect(tmp_profile)
time.sleep(5)
if ifaces.status() == const.IFACE_CONNECTED:
print("OK")
else:
print("ERROR")`
Now I wann make a wifi connection on Raspberry pi,using this code not succeed.
The "Prerequisites" : "On Linux, you will need to run wpa_supplicant to manipulate the wifi devices, and then pywifi can communicate with wpa_supplicant through socket." I think I should start here, but I don't know how to do it in particular. could you give me some advice? Thanks
The text was updated successfully, but these errors were encountered: