Hello i am having this problem it says camera ok but there is no ip address
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_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:1
load:0x3fff0030,len:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0
CAMERA OK
here is the code
#include <WebServer.h>
#include <WiFi.h>
#include <esp32cam.h>
const char* WIFI_SSID = "";
const char* WIFI_PASS = "";
WebServer server(80);
static auto loRes = esp32cam::Resolution::find(320, 240);
static auto midRes = esp32cam::Resolution::find(350, 530);
static auto hiRes = esp32cam::Resolution::find(800, 600);
void serveJpg()
{
auto frame = esp32cam::capture();
if (frame == nullptr) {
Serial.println("CAPTURE FAIL");
server.send(503, "", "");
return;
}
Serial.printf("CAPTURE OK %dx%d %db\n", frame->getWidth(), frame->getHeight(),
static_cast<int>(frame->size()));
server.setContentLength(frame->size());
server.send(200, "image/jpeg");
WiFiClient client = server.client();
frame->writeTo(client);
}
void handleJpgLo()
{
if (!esp32cam::Camera.changeResolution(loRes)) {
Serial.println("SET-LO-RES FAIL");
}
serveJpg();
}
void handleJpgHi()
{
if (!esp32cam::Camera.changeResolution(hiRes)) {
Serial.println("SET-HI-RES FAIL");
}
serveJpg();
}
void handleJpgMid()
{
if (!esp32cam::Camera.changeResolution(midRes)) {
Serial.println("SET-MID-RES FAIL");
}
serveJpg();
}
void setup(){
Serial.begin(115200);
Serial.println();
{
using namespace esp32cam;
Config cfg;
cfg.setPins(pins::AiThinker);
cfg.setResolution(hiRes);
cfg.setBufferCount(2);
cfg.setJpeg(80);
bool ok = Camera.begin(cfg);
Serial.println(ok ? "CAMERA OK" : "CAMERA FAIL");
}
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
Serial.print("http://");
Serial.println(WiFi.localIP());
Serial.println(" /cam-lo.jpg");
Serial.println(" /cam-hi.jpg");
Serial.println(" /cam-mid.jpg");
server.on("/cam-lo.jpg", handleJpgLo);
server.on("/cam-hi.jpg", handleJpgHi);
server.on("/cam-mid.jpg", handleJpgMid);
server.begin();
}
void loop()
{
server.handleClient();
}
J-M-L
March 16, 2022, 6:32pm
2
so it seems you can't join your WiFi network and are stuck in the loop
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
change that loop to
while (WiFi.status() != WL_CONNECTED) {
Serial.write('.');
delay(500);
}
Serial.println(); Serial.println("Connected to WiFi");
if you see an endless stream of dots, then it means you can't join.
what happens if i cant join
J-M-L
March 16, 2022, 6:39pm
5
it's a network problem that you need to investigate... (or your board is dead)
J-M-L
March 16, 2022, 6:40pm
7
try the code from one of the example and triple check you are providing the right WiFi credentials in there
const char* WIFI_SSID = "";
const char* WIFI_PASS = "";
(any funny characters in there or just plain old ASCII?)
well there is brackets since its the same ssid i copied from the properties
ASK4 Wireless (802.1x)
J-M-L
March 16, 2022, 6:46pm
9
since its the same ssid i copied from the properties
Not sure what it means.
it should read exactly as your Mac/PC sees the network and the password should be exactly as you type it when you join
if you network name is myWiFiNetwork
then this is what needs to be within the quotes
const char* WIFI_SSID = "myWiFiNetwork";
you see i am in an accomedation each person has his own password however the ssid is the same and what i meant is that the ssid is the one above ask4 wireless (802.1x)
J-M-L
March 16, 2022, 6:49pm
11
the wifi connection is then probably not a simple WPA sign in.
WPA2-Enterprise yh thatsd the security type
however i still tried it from my phones hotspot yet same thing dots happen
changed the esp32 same thing
J-M-L
March 16, 2022, 7:02pm
13
sanadatari:
WPA2-Enterprise
that code won't let you sign in then.
it should work with your phone though
try a very simple code for a start
#include <WiFi.h>
const char* WIFI_SSID = "xxxxxxxxx";
const char* WIFI_PASS = "xxxxxxxxx";
void setup() {
Serial.begin(115200);
while (!Serial) yield();
Serial.println();
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) {
Serial.write('.');
delay(500);
}
Serial.println(); Serial.println("Connected to WiFi");
}
void loop() {}
if you open the serial monitor at 115200 bauds, do you see the message "Connected to WiFi"
Your post was MOVED to its current location as it is more suitable.
Could you also take a few moments to Learn How To Use The Forum .
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
J-M-L
March 16, 2022, 10:44pm
19
So it works on the phone and not on your WiFi ➜ this confirms the authentication challenge
yes thank you i only gave one more problem relatin to the object detection after i took the ip address from arduino and replaced it into the python
system
Closed
September 12, 2022, 10:54pm
21
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.