Access point status function return error #12497
-
I created an access point on ESP8266 and used the status function to return the status of the access point but I get a type error. It states: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Please provide a code sample which demonstrates the problem. |
Beta Was this translation helpful? Give feedback.
-
That code works fine here on an ESP8266. In my testing When posting code samples, if you enclose the sample in triple backtick ( import network
import time
ap_interface = network.WLAN(network.AP_IF)
ap_interface.active(True)
ap_interface.config(essid="rats", password="password")
while ap_interface.active() == False:
pass
print('Access Point enabled successfully')
print(ap_interface.ifconfig())
while True:
print(ap_interface.status())
time.sleep(1) |
Beta Was this translation helpful? Give feedback.
That code works fine here on an ESP8266. In my testing
.status()
returns -1 every time, but no exception is thrown.When posting code samples, if you enclose the sample in triple backtick (
) characters, indentation is preserved. If the opening triple backtick is followed by
py` then syntax colouring is also added: