BLYNK_PRINT Alternatives

I have been working on a project for a while now, using the insight of the more technical posts, but I finally got stuck.
Here is the gist of it; I need to make a ESP32 based product that has no connection to a computer. Currently, Blynk Edgent faults out the ESP32 if I do not have my ESP32 connected to my computer via USB. As soon as BlynkEdgent.begin(); is called in my setup() when the USB is not connected to the ESP32, the core faults out. Resetting the ESP32 does not change the behavior. Only reconnecting the ESP32 to the computer via USB allows the program to run. I have noticed this behavior in my complex program along with in the basic ESP32 example, Edgent_ESP32.ino available in the library examples. How can either prevent Blynk from trying to check for a serial connection, create a ‘fake’ serial port to direct Blynk to use that does not crash Blynk, or otherwise keep Blynk from faulting out when there is no serial connection?

Here is my setup:
Hardware: ESP32 WROOM 32D (see link)
Comms: WIFI
Phone OS: Android
Blynk Server
Blynk Library v1.0.1 HiLetgo ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA for Arduino IDE : Electronics

Here is the example code with some modifications, including a custom hardware definition and the serial setup and debug lines commented out. No other changes were made.

// Fill-in information from your Blynk Template here
#define BLYNK_DEVICE_NAME "5002FFProto"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

//#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_TTGO_T7
//#define USE_ESP32C3_DEV_MODULE
//#define USE_ESP32S2_DEV_KIT
#define ESP32FF_BOARD

#include "BlynkEdgent.h"

void setup()


void loop() {;

And the custom board definition in Settings.h for reference, which was placed before the #else for a custom board definition. This just ports the LED to an external LED I have on my breadboard, along with an external button.


// EDITED 2/15/2022 2:23PM NS


#elif defined(ESP32FF_BOARD)


  #define BOARD_BUTTON_PIN            15

  #define BOARD_BUTTON_ACTIVE_LOW     true

  #define BOARD_LED_PIN               17

  #define BOARD_LED_INVERSE           false

  #define BOARD_LED_BRIGHTNESS        255


From what I have read on other topics, it seems like there has been a lot of work done to try and port BLYNK_PRINT to use other means of displaying debug and crash reports, but nothing that fully describes what alternatives to ‘Serial’ that can be used for BLYNK_PRINT. The threads linked below have such applications, like the terminal in the Blynk app and also a LCD screen, both of which could be options for me I suppose. Credit to @Gunner and @Costas for your work there. I’ll link them in a reply to this, as the forum will not allow me to include them in this original post.

And yes, I even consulted the ancient texts, but the new and old documentation leaves a sour taste in my mouth…
Gotta love an empty entry…

Any ideas or ways to consolidate the Terminal and LCD means into a single topic that covers all the possibilities? I’ve gotten lost in the source code trying to find what alternatives the firmware will accept. It appears that the old version of Blynk readily supports commenting out BLYNK_PRINT, as shown below, but not the new verison. This was sourced from the Blynk example generator, which appears to be setup for the old version of Blynk.


  You’ll need:
   - Blynk IoT app (download from App Store or Google Play)
   - ESP32 board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData

// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID           "TMPLxxxxxx"
#define BLYNK_DEVICE_NAME           "Device"
#define BLYNK_AUTH_TOKEN            "YourAuthToken"

// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial

Thanks in advance.

Here is the links to the different alternatives I’ve seen on this forum:
LCD: My attempts at transferring BLYNK_PRINT to Various Displays - Projects made with Blynk - Blynk Community
Terminal in App: BLYNK_DEBUG print to terminal - Solved - Blynk Community

It shouldn’t be a problem running the Edgent sketch without the ESP32 being connected to a computer.
I suspect the issue is to do with the way that you’re powering the board when it’s not connected to your PC.

Can you explain more about your power arrangements?


@PeteKnight Currently I am using a cheap breadboard power supply, powered via USB. The power supply is similar to the one linked below, and is supposedly able to source at least 600mA, which I assumed would be sufficient. I rechecked the datasheet for the ESP32, which states a recommended supply current of at least 500mA. Obviously, that is only a minimum, and WIFI consumes a lot of power when transmitting and searching for networks, but even with two power supplies in parallel, I am still observing the same behavior. In your experience, how large of a supply have you needed in your home automation design to keep up with current demands?
Realistically, if the cheap chineseium power supply current output ratings are reasonable, I should be supplying the ESP32 currently with at least 1.5A. I find it hard to believe that even with about 500uF of total capacitance on my rails for filtering for different devices in my circuit, a WIFI tranmission current surge would be enough to deplete the assorted filter caps and the supply output current.
Link to similar supply: Breadboard Kit with Power Supply for Electronics, 65 Pieces M/M Bread Jumper Wires(12/16/20/25cm), 1 Piece Power Supply Module MB 102(5V/3V), 1 Piece 830 Tie-Points Breadboard: Industrial & Scientific

I’m still not clear exactly how you are powering your ESP32.
Is it via the 5v and GND pins?

Have you tried powering the ESP32 from a 5v USB phone charger, using the same cable that you were using to connect it to the PC ?


Sorry, I am powering it via the 3.3V pin and GND, supplying with 3.3V on breadboard via the above mentioned power supply.

I tried that with a USB charging bus block, which can supply about 5A at 5V, and the ESP booted and connected to the server without an issue. It appears that my problem is just a lack of power. I’ll change this topic title to correspond and determine the actual current required for the ESP32 without any low power considerations activated while running Blynk on WIFI.

This is bypassing the ESP’s outage regulator, which isn’t what I’d recommend.
I’d suggest using the 5v output from the PSU and connecting it to the pin that’s labelled Vin or 5v on the ESP.