Page 1 of 1

Connections in Access Point mode.

Posted: Thu Mar 28, 2024 12:31 pm
by ChipBurner
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.

Re: Connections in Access Point mode.

Posted: Thu Mar 28, 2024 6:37 pm
by cicciocb
I've just verified with ESP32 S3 and ESP8266 and the result is 3

Re: Connections in Access Point mode.

Posted: Fri Mar 29, 2024 2:43 am
by ChipBurner
My test program. I used fastboot and autorun options.

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
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

Re: Connections in Access Point mode.

Posted: Fri Mar 29, 2024 4:28 am
by ChipBurner
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