Skip to content

Unable to connect to ap with ssid of 32 characters length #3218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jstammi opened this issue Sep 16, 2019 · 8 comments
Closed

Unable to connect to ap with ssid of 32 characters length #3218

jstammi opened this issue Sep 16, 2019 · 8 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@jstammi
Copy link

jstammi commented Sep 16, 2019

#2746 # Hardware:
Board: ESP32-WROVER-B
Core Installation version: ??? (n/a)
IDE name: Platform.io
Flash Frequency: ??? (n/a)
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10

Description:

My ap's ssid is of 32 characters length, the max allowed AFAIK.

On connecting the serial console shows an error message: "[E][WiFiSTA.cpp:124] begin(): SSID too long or missing!"

WiFiSTA.cpp check length ssid > 31 ... seems to assume a trailing '\0'. But IMHO such is not enforced by the spec.

Sketch: (leave the backquotes for code formatting)

//Change the code below by your sketch
#include <Arduino.h>
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  Serial.println(WiFi.begin("123456789A123456789B123456789C12", "passphrase"));
}

void loop() {
}

### Debug Messages:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
[E][WiFiSTA.cpp:124] begin(): SSID too long or missing!
4
@atanisoft
Copy link
Collaborator

Per ESP-IDF this is intentional: espressif/esp-idf#1176

@stale
Copy link

stale bot commented Nov 15, 2019

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Nov 15, 2019
@stale
Copy link

stale bot commented Nov 30, 2019

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Nov 30, 2019
@jstammi
Copy link
Author

jstammi commented Mar 20, 2021

Per ESP-IDF this is intentional: espressif/esp-idf#1176

What is intenional? That it is impossible to connect to an AP with SSID length of 32 characters? But this is the allowed maximum SSID length ...

Today I came over this once again. But this time without an error message, the connection could not be established without giving any reasons on the console. With using shorter SSID everything works as expected (but I cannot change it in target environment!).

Please note that with using a ESP8266 instead, this does NOT face this problem.

@lbernstone
Copy link
Contributor

lbernstone commented Mar 20, 2021

@jstammi
Copy link
Author

jstammi commented Mar 21, 2021

Yes, I can confirm that this causes an error. For a long time already. But only for ESP32. Not for ESP8266. And the "if" in referenced line is simply not correct as the SSID max length per standard is 32 characters. See §7.3.2.1 in https://www.iith.ac.in/~tbr/teaching/docs/802.11-2007.pdf

me-no-dev added a commit that referenced this issue Mar 23, 2021
@me-no-dev
Copy link
Member

Fixed in master

@jeffrey-meyer
Copy link

I get same error with an 18 character ssid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

5 participants