import wlan
# Modul WLAN (Client-Connect)
print("Connecting to WLAN...")
wlan_result = wlan.client_connect() # result is a Tuple: (True, SSID, IP) or (False, 0, 0)
if wlan_result[0] == False:
print("WLAN: NOT connected! Check Config...")
else:
print("WLAN: Connected!")
print("SSID: " + wlan_result[1])
print("IP: " + wlan_result[2])
# Functions bellow is not implemented yet in the wlan.py
"""
# Modul WLAN (AP-Connect)
print("Create a WLAN access point...")
ap_result = wlan.ap_connect() # result is a Tuple: (True, SSID, IP) or (False, 0, 0)
if ap_result[0] == False:
print("WLAN access point not created")
else:
print("WLAN access point successfully created")
print("SSID: " + ap_result[1])
print("PASS: " + ap_result[2])
# Modul WLAN disconnect
print("Disconect WLAN...")
dis_result = wlan.dis_connect() # result is a Tuple: (True, SSID, IP) or (False, 0, 0)
if dis_result[0] == False:
print("WLAN is NOT disconected...")
else:
print("WLAN is successfully disconected!")
"""