-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
SD card not working when using Wifi AP. Working fine when connecting to an existing network. #10195
Comments
Please try this code. Pin 48 is a bad choice if using a dev board, as that is where the built-in LED is attached.
|
Thanks a lot! It still does not work. When opening a file right after creating the AP the read fails. Before starting the AP it reads without issue. e.g.: #include <WiFi.h>
#include <SD.h>
#define SCK 12
#define MISO 13
#define MOSI 11
#define CS 10
const char* ssid = "ESP32-Access-Point";
const char* password = "123456789";
void setup(void) {
Serial.begin(115200);
Serial.print("Initializing SD card...");
SPI.begin(SCK, MISO, MOSI, CS);
if (!SD.begin(CS)) {
Serial.println("SDCard failed");
} else {
Serial.println("SDCard initialised");
}
File file2 = SD.open("/index.html", FILE_READ);
if (file2) {
Serial.println("Success");
file2.close();
}
else{
Serial.println("Fail");
}
WiFi.softAP(ssid, password);
Serial.println("AP started");
File file3 = SD.open("/index.html", FILE_READ);
if (file3) {
Serial.println("Success");
file3.close();
}
else{
Serial.println("Fail");
}
} This prints for me when running:
|
I'm unable to reproduce |
If I had to guess, I'd also say power supply. |
@P-R-O-C-H-Y Please help with triage, thanks |
Board
ESP32-S3
Device Description
ESP32-S3-WROOM-1
Hardware Configuration
#define SCK 18
#define MISO 19
#define MOSI 23
#define CS 5
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
115200
Description
It appears that the SD card only works when not using an access point:
When an access point is created the sd card stops working.
WiFi.softAP("FHD", "123456789");
The SD card functions well as long as no AP is used. Do you have any idea what's going on here?
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: