I'm using an ESP32 mounted in an inconvenient location to push the boot loader button every time I upload new code. I tried this approach:
[SOLVED] Failed to connect to ESP32: Timed out waiting for packet header | Random Nerd Tutorials
Although it worked, it also causes boot problems.
I can upload OTA but still need the serial monitor for debugging. Is it possible to use the Bluetooth built into the ESP32 to send serial data to my computer? I'm running a Mac so I have all kinds of unix tools available.
You cannot use WiFi and native Bluetooth at the same time on an ESP32. You could use an external Bluetooth module as you would on an AVR based Arduino
For Mac or linux users (don't know about windows), I found a better solution for uploading code and reading serial data for microcontrollers that are difficult to access but you have USB connectivity.
In the Arduino app, select the WiFi port. This disables the serial connection.
With your USB cable connected, open the terminal app.
Type: ls /dev/tty.*
Look for a usbserial entry something like: /dev/tty.usbserial-0001
Type: screen /dev/tty.usbserial-0001 115200
The last parameter must match your Serial.begin() speed. To exit, ctl-a, ctl-k
It seems you can use Bluetooth and WiFi at the same time,
where did you learn you can not use "native" Bluetooth, and what does that native mean?
I am not sure where I gleaned this information from and I may well be remembering it wrongly and/or conflating it with the fact that you cannot use ESP-Now and WiFi at the same time
If I get a chance I will try it
To me "native" Bluetooth means using the Bluetooth capability of the ESP32 itself rather than an external Bluetooth device
Wifi STA combined with internal Bluetooth was one of the power consumption test in the linked video.
I have never really worked with Bluetooth and used only quite basic stuff with the ESP32.
For completeness I have tested concurrent use of WiFi and Bluetooth on the ESP32 and it works
An example sketch
const char *ssid = "PLUSNET_Moonraker";
const char *password = "WIBBLE999";
static byte count = 0;
// int sec = millis() / 1000;
// int min = sec / 60;
// int hr = min / 60;
int size = snprintf(temp, 400, "<html>\
<meta http-equiv='refresh' content='5'/> <title>ESP32 WiFi & Bluetooth</title>\
<p>Count : %04d</p>\
server.send(200, "text/html", temp);
while (WiFi.status() != WL_CONNECTED)
Serial.print(F("Connected to "));
Serial.print(F("IP address: "));
Serial.println("HTTP server started");
SerialBT.begin("Web and BT test");
November 21, 2021, 10:50am
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.