ESP32 Device Offline (Platform IO)

Hi,

I am facing issues while trying to get my device online.
The program gets compiled and uploaded without any errors. But, I do not see anything in my serial monitor and the device status is also offline in Blynk console (Desktop) and Blynk App(Android).

Please help me out here

Software and Hardware details-

  • Platform IO IDE
  • ESP32 with WiFi
  • Android 10
  • Blynk server - blynk.cloud
  • Blynk Library version 1.0.1
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

/* Fill-in your Template ID (only if using Blynk.Cloud) */
#define BLYNK_TEMPLATE_ID "aaa"

#include <Arduino.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "zzz";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxx";
char pass[] = "yyy";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

Personally, I prefer to set my debug serial rate to the native serial rate for your board, which in your case is probably 115200. It’s easy enough to find out what your board’s native serial rate is by pressing the RST button and observing the serial monitor output. If you see the boot message from the board then you have selected the correct baud rate…

ets Jun  8 2016 00:22:57

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:1
load:0x3fff0030,len:1420
ho 0 tail 12 room 4
load:0x40078000,len:13540
load:0x40080400,len:3604
entry 0x400805f0

By using the same baud rate for your debug messages, you can see if there is an issue that the board is reporting that is preventing it getting to the point where it configures your serial port to the lower baud rate in the void setup.

BTW, this is wrong…

The two correct options are blynk-cloud.com for the Legacy cloud servers or blynk.cloud for the new IoT cloud servers (which you are using).

Pete.

Hi Pete,

I tried setting the baud rate to 115200 and then upload my code. Now, when I press the reset button, I see the following -

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:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

I do not see any error messages. Neither do I see any output

Well, your code works fine for me when I upload it via the Arduino IDE…

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:1420
ho 0 tail 12 room 4
load:0x40078000,len:13540
load:0x40080400,len:3604
entry 0x400805f0
[31] Connecting to REDACTED
[19150] Connected to WiFi
[19150] IP: 192.168.1.42
[19150] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.1 on ESP32

[19161] Connecting to blynk.cloud:80
[22974] Ready (ping: 1455ms).

Maybe it’s a PlatformIO issue?

Pete.

I see.

Maybe my board is malfunctioning because the Arduino IDE is not even detecting my board. I need to get some new gear.

Thanks for the help, Pete.

Maybe it’s the serial cable, or the port on your PC.

Pete.

I tried changing the serial cable but still, I am getting the same output in Platform IO.

When I tried uploading the code using Arduino IDE, it worked flawlessly.

I think it’s Platform IO specific error. I’ll get in touch with them.

Thanks for all the help Pete. Much appreciate it

1 Like