How do I troubleshoot wifi on the GalaxyRVR?

I am getting an odd error unless I comment out the wifi start-up part of the script.
Are there any testing scripts

that I can use to see what the issue is?

Has your galaxyrvr code been modified?
In the screenshot you provided, the code does not require comments.
We recommend that you provide the complete code file so we can analyze and help resolve the issue.

I tried the demo code you have on your website Lesson 11: Exploring the Mars Rover Visual System - Camera and Real-time Control — SunFounder GalaxyRVR Kit for Arduino 1.0 documentation

#include “SunFounder_AI_Camera.h”

// Wifi configuration and credentials
// AP Mode
// #define WIFI_MODE WIFI_MODE_AP
// #define SSID “GalaxyRVR”
// #define PASSWORD “12345678”

// STA Mode
#define WIFI_MODE WIFI_MODE_STA
#define SSID “YOUR SSID”
#define PASSWORD “YOUR PASSWORD”

// Device configuration
#define NAME “GalaxyRVR” // Device name
#define TYPE “AiCamera” // Device type
#define PORT “8765” // Port for the SunFounder Controller APP

// Create AiCamera Object
AiCamera aiCam = AiCamera(NAME, TYPE);

void setup() {
// Initialize Serial(optional, if you need to debug)
Serial.begin(115200);

// Initialize AiCamera
aiCam.begin(SSID, PASSWORD, WIFI_MODE, PORT);

// Set command timeout (optional, default 100)
aiCam.setCommandTimeout(100);
}

void loop() {
// AiCamera loop. must put it in loop(). And more importantly, every time loop
// runs, a perioad of data sendf and receive runs, so loop must be fast enough.
// or it will be laggy or even stuck by other code.
aiCam.loop();
}
and It gives me the same error
21:16:41.210 → [FAIL]
21:16:56.837 → SET+RESET
21:16:56.837 → …SET+RESET
21:16:59.868 → …SET+RESET
21:17:02.882 → …[FAIL]

Then I tied this one too ad same issue SunFounder_AI_Camera/examples/basic_test/basic_test.ino at main · sunfounder/SunFounder_AI_Camera · GitHub

You need to modify your code since you are using STA mode. You must enter the WiFi network you want to configure; otherwise, the Mars Rover will not have internet access and won’t be able to connect with the app.

Please carefully review the tutorial instructions here: Lesson 11: Camera and Real-time Control.

Here’s a reminder of the code to modify:

// STA Mode
#define WIFI_MODE WIFI_MODE_STA
#define SSID “YOUR SSID” // Enter your WiFi name
#define PASSWORD “YOUR PASSWORD” // Enter your WiFi password

Hello,

Thanks for pointing that out. I tried WPA and STA and got the same error. Is there a way to figure out if the ESP32 is broken? I can get the IR code and the Sonar code to work so I’m thinking it has to be something with the ESP32…

Here is the full code in AP mode.

#include “SunFounder_AI_Camera.h”

// Wifi configuration and credentials
// AP Mode
#define WIFI_MODE WIFI_MODE_AP
#define SSID “GalaxyRVR”
#define PASSWORD “12345678”

// STA Mode
//#define WIFI_MODE WIFI_MODE_STA
//#define SSID “ssid”
//#define PASSWORD “password!”

// Device configuration
#define NAME “GalaxyRVR” // Device name
#define TYPE “AiCamera” // Device type
#define PORT “8765” // Port for the SunFounder Controller APP

// Create AiCamera Object
AiCamera aiCam = AiCamera(NAME, TYPE);

void setup() {
// Initialize Serial(optional, if you need to debug)
Serial.begin(115200);

// Initialize AiCamera
aiCam.begin(SSID, PASSWORD, WIFI_MODE, PORT);

// Set command timeout (optional, default 100)
aiCam.setCommandTimeout(100);
}

void loop() {
// AiCamera loop. must put it in loop(). And more importantly, every time loop
// runs, a perioad of data send receive runs, so loop must be fast enough.
// or it will be laggy or even stuck by other code.
aiCam.loop();
//Serial.println(“test”);
}

I got it to work once just by loading the same code and booting it a couple of times and then it stopped working again. I wonder if the ESP32 is bad… do you guys sell replacement ESP32 cameras? @SunFounder_Moderator

We have replaceable ESP32 module.Please contact at service@sunfounder.com