Access point status function return error #12497
Answered
by
peterhinch
sabeehalam
asked this question in
ESP8266
|
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: |
Answered by
peterhinch
Sep 25, 2023
Replies: 2 comments 2 replies
|
Please provide a code sample which demonstrates the problem. |
1 reply
|
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) |
1 reply
Answer selected by
peterhinch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 bypy` then syntax colouring is also added: