Hi all,
Can anyone tell me how to determine whether it is connected to an access point? Access point on ESP8266 or ESP32.
WIFI.STATUS gives 0, 6, 255 and never 3. I tried fw 1.49 and 1.51.3 respectively.
Connections in Access Point mode.
-
- Posts: 7
- Joined: Tue Mar 19, 2024 6:54 am
- Has thanked: 1 time
- cicciocb
- Site Admin
- Posts: 2095
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 450 times
- Been thanked: 1385 times
- Contact:
Re: Connections in Access Point mode.
I've just verified with ESP32 S3 and ESP8266 and the result is 3
-
- Posts: 7
- Joined: Tue Mar 19, 2024 6:54 am
- Has thanked: 1 time
Re: Connections in Access Point mode.
My test program. I used fastboot and autorun options.
After rebooting, I connected to the access point and opened the editor page. After a few seconds, I disconnected from the AP and connected to the router. Then I connected to the AP again and refreshed the editor page in the browser. I ended the program with the stop button.
ESP8266 serial output:
Annex WiFi 1.49
(C) ciccioCB 2023
Personal use only, commercial use strictly prohibited
2M module
start ad000 max size 339968
Number of program lines :12
Basic File Loaded: /prolog2.bas
Program Running
0-6
.2-6
....ws[/ws][1][2] connect
......2-6
..........2-6
..........2-6
..........2-6
..........2-6
..........2-6
ws[/ws][2][2] connect
..........2-6
..........2-6
.Program Ended
Code: [Local Link Removed for Guests]
WIFI.SLEEP
PAUSE 1000
print STR$(WIFI.MODE)+"-"+STR$(WIFI.STATUS)
WIFI.APMODE "AP_TEST",""
i=0
DO WHILE 1
PAUSE 1000
print ".";
IF 0=i mod 10 print STR$(WIFI.MODE)+"-"+STR$(WIFI.STATUS)
i=i+1
LOOP
END
ESP8266 serial output:
Annex WiFi 1.49
(C) ciccioCB 2023
Personal use only, commercial use strictly prohibited
2M module
start ad000 max size 339968
Number of program lines :12
Basic File Loaded: /prolog2.bas
Program Running
0-6
.2-6
....ws[/ws][1][2] connect
......2-6
..........2-6
..........2-6
..........2-6
..........2-6
..........2-6
ws[/ws][2][2] connect
..........2-6
..........2-6
.Program Ended
-
- Posts: 7
- Joined: Tue Mar 19, 2024 6:54 am
- Has thanked: 1 time
Re: Connections in Access Point mode.
Oops, my mistake. ESP32 with 1.51.3 cannot start the wifi module at all. There is no AP or connection in STA mode. I used the same options: fastboot and autorun. Same program. Recently I was testing the ability of BLE to receive advertising packets without establishing a connection and therefore forgot that I was testing the AP with a different firmware (the latest at that time was 1.52.3).
Serial:
Annex initializing...
BLE support enabled
module Type 0 Display 255 SD_Card 0
OK
No SD cards found. Reverts to LittleFS
Annex32 BLE CAN 1.51.3 LFS
(C) ciccioCB 2022
Personal use only, commercial use strictly prohibited
Chip revision 1 Freq 240
Number of program lines :12
Basic File Loaded: /prolog2.bas
Program Running
1-255
.3-255
..........3-255
..........3-255
..........3-255
..........3-255
..........3-255
Serial:
Annex initializing...
BLE support enabled
module Type 0 Display 255 SD_Card 0
OK
No SD cards found. Reverts to LittleFS
Annex32 BLE CAN 1.51.3 LFS
(C) ciccioCB 2022
Personal use only, commercial use strictly prohibited
Chip revision 1 Freq 240
Number of program lines :12
Basic File Loaded: /prolog2.bas
Program Running
1-255
.3-255
..........3-255
..........3-255
..........3-255
..........3-255
..........3-255