# How do I troubleshoot wifi on the GalaxyRVR?

**URL:** <https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743>\
**Category:** Robotic kit for Arduino\
**Created:** [October 1, 2024, 1:10am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743 "2024-10-01T01:10:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeorgeClement](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@GeorgeClement](https://forum.sunfounder.com/u/GeorgeClement)\
**Post date:** [October 1, 2024, 1:10am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/1 "2024-10-01T01:10:33Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/1X/2b261c80b904dfb374da8701e577456dadb6f6c5.png)

that I can use to see what the issue is?

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [October 8, 2024, 9:17am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/2 "2024-10-08T09:17:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GeorgeClement](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@GeorgeClement](https://forum.sunfounder.com/u/GeorgeClement)\
**Post date:** [October 12, 2024, 2:52am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/3 "2024-10-12T02:52:48Z")

</div>

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](https://docs.sunfounder.com/projects/galaxy-rvr/en/latest/lesson11_camera.html)

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

---

<div class="post-metadata">

**Author:** ![GeorgeClement](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@GeorgeClement](https://forum.sunfounder.com/u/GeorgeClement)\
**Post date:** [October 12, 2024, 2:54am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/4 "2024-10-12T02:54:08Z")

</div>

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](https://github.com/sunfounder/SunFounder_AI_Camera/blob/main/examples/basic_test/basic_test.ino)

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [October 12, 2024, 8:56am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/5 "2024-10-12T08:56:39Z")

</div>

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.](https://docs.sunfounder.com/projects/galaxy-rvr/en/latest/lesson11_camera.html)

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

---

<div class="post-metadata">

**Author:** ![GeorgeClement](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@GeorgeClement](https://forum.sunfounder.com/u/GeorgeClement)\
**Post date:** [October 12, 2024, 2:39pm UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/6 "2024-10-12T14:39:24Z")

</div>

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…

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/1X/68ff508562ac13a710437b8b617243b156774879.png)

---

<div class="post-metadata">

**Author:** ![GeorgeClement](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@GeorgeClement](https://forum.sunfounder.com/u/GeorgeClement)\
**Post date:** [October 12, 2024, 2:42pm UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/7 "2024-10-12T14:42:00Z")

</div>

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](https://Serial.println)(“test”);  
}

---

<div class="post-metadata">

**Author:** ![GeorgeClement](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@GeorgeClement](https://forum.sunfounder.com/u/GeorgeClement)\
**Post date:** [October 13, 2024, 10:15pm UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/8 "2024-10-13T22:15:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [October 15, 2024, 1:47am UTC](https://forum.sunfounder.com/t/how-do-i-troubleshoot-wifi-on-the-galaxyrvr/1743/9 "2024-10-15T01:47:52Z")

</div>

We have replaceable ESP32 module.Please contact at [service@sunfounder.com](mailto:service@sunfounder.com)
