New ESP32-Pi Programming


New member
Hi - I have just received a new ESP32-Pi. I have it connected to my Windows 10 PC. I see it in Device Manager under Other Devices, listed as USB serial. It does not seem to have a driver. Can anyone point me in the right direction? Thanks - GT


New member
Thanks for the help. That got me going.

Now I am trying to run the SM_ESP32Pi ethernet example. I am getting Ethernet cable is not connected. I have a known good cable on a known good switch port. I have also tried a second cable on another port. No link or status LEDs on the port or the switch when the ESP32Pi is connected.

Looking for additional guidance.

Thanks - GT


Staff member

Could you share all the messages received from the arduino serial monitor?
Did you have a router in your network or just the switch and the ESP32-PI?


New member
Sure - seral output below. I have a cable modem connected to the switch. The switch is an unmanaged Netgear 16 port. Everything else on the switch is working properly. I have tried different switch ports / different cables.

The ESP32Pi LED is flashing, so I believe the loop is working.

I also have a BAS card (stack level 0) and an 8 relay card (stack level 1) stacked on the ESP32Pi. I am thinking of removing the IO cards and trying just the ESP32Pi.

Failed to configure Ethernet using DHCP
Ethernet cable is not connected.
Local IP :
Subnet Mask :
Gateway IP :
DNS Server :
Ethernet Successfully Initialized
connection failed

Received 0 bytes in 0.0000, rate = 0.00 kbytes/second

on COM5


Staff member
The questions is that there is someone on the network assigning IP's trough DHCP method? or the IP'S on the network are static?
Do you have an other device connected to the switch that working? How this device get his IP and what is the IP of this device?


New member
There is DHCP on the network. I have 8 other DHCP devices on the switch. The IP address that it is reporting is the one I assigned in the sketch. I unplugged a Raspberry Pi and plugged in the ESP32-Pi to the same network cable. Changed the Static IP, Gateway, and DNS in the sketch. And uploaded to get the result I previously posted.

I have tried two other cables and two other switch ports. I don't get any connection or status LEDs on either the ESP32-Pi or the ethernet switch.

Just to make sure I did not mess up something else, here is the entire sketch.

* This sketch demonstrate the usage of the Ethernet port on the Sequent Microsystems
* ESP32 Raspberry Pi Alternative card.
* Please connect a ethernet cable to the card and
* open the Serial Monitor to see the results
#include "SM_ESP32Pi.h"
#include "Ethernet.h"
char server[] = "";
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
#define MYIPADDR 10,0,0,51
#define MYIPMASK 255,255,255,0
#define MYDNS 10,0,0,1
#define MYGW 10,0,0,1
EthernetClient client;
SM_ESP32Pi esp = SM_ESP32Pi(1);// pin header pin number type
// Variables to measure the speed
unsigned long beginMicros, endMicros;
unsigned long byteCount = 0;
bool printWebData = true; // set to false for better speed measurement
void setup() {
unsigned int i = 0;
esp.begin(1);// debug enable
if (Ethernet.begin(mac)) { // Dynamic IP setup
Serial.println("DHCP OK!");
} else {
Serial.println("Failed to configure Ethernet using DHCP");
// Check for Ethernet hardware present
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
Serial.println("Ethernet shield was not found. Sorry, can't run without hardware. :(");
while (true) {
delay(1); // do nothing, no point running without Ethernet hardware
if (Ethernet.linkStatus() == LinkOFF) {
Serial.println("Ethernet cable is not connected.");
IPAddress ip(MYIPADDR);
IPAddress dns(MYDNS);
IPAddress gw(MYGW);
IPAddress sn(MYIPMASK);
Ethernet.begin(mac, ip, dns, gw, sn);
Serial.println("STATIC OK!");

Serial.print("Local IP : ");
Serial.print("Subnet Mask : ");
Serial.print("Gateway IP : ");
Serial.print("DNS Server : ");
Serial.println("Ethernet Successfully Initialized");
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
// Make a HTTP request:
client.println("GET /get HTTP/1.1");
client.println("Connection: close");
} else {
// if you didn't get a connection to the server:
Serial.println("connection failed");
beginMicros = micros();
void loop() {
// if there are incoming bytes available
// from the server, read them and print them:
int len = client.available();
if (len > 0) {
byte buffer[80];
if (len > 80) len = 80;, len);
if (printWebData) {
Serial.write(buffer, len); // show in the serial monitor (slows some boards)
byteCount = byteCount + len;
// if the server's disconnected, stop the client:
if (!client.connected()) {
endMicros = micros();
Serial.print("Received ");
Serial.print(" bytes in ");
float seconds = (float)(endMicros - beginMicros) / 1000000.0;
Serial.print(seconds, 4);
float rate = (float)byteCount / seconds / 1000.0;
Serial.print(", rate = ");
Serial.print(" kbytes/second");
// do nothing forevermore:
while (true) {
#define ON_TIME_MS 50
#define PERIOD_MS 1000
void heartBeat()
static int period = ON_TIME_MS;
static unsigned long tms = 0;
if ((millis() > (tms + period)) || (millis() < tms))
tms = millis();
if (period == ON_TIME_MS)
//esp.led(0); //library function
digitalWrite(SM_ESP32PI_LED, LOW);//builtin function with library definition SM_ESP32PI_LED
period = PERIOD_MS - ON_TIME_MS;
//esp.led(1);//library function
digitalWrite(SM_ESP32PI_LED, HIGH);//builtin function with library definition SM_ESP32PI_LED
period = ON_TIME_MS;
void nbDelay(int milliseconds)
unsigned long time_now = 0;
time_now = millis();
while (millis() < time_now + milliseconds)


Staff member
This is strange, the code detect the hardware (W5500 chip) but is not link to the network..
Could you please send me a picture with the bottom (smd components) side of the card to see if there is something wrong with the card.


Staff member
We could send you a replacement, but I am not so sure the card is the problem.
Could you check the Raspberry IP, DNS..etc when connected to the network, Disconnect it and use the same for the ESP-PI in the code :
#define MYIPADDR (Raspberry address)
#define MYIPMASK 255,255,255,0
#define MYDNS (Raspberry DNS)
#define MYGW (Raspberry DNS)

Also please change the MAC adress ( byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; ) with something else (highly improbable but you might have a device in the network with the same mac address)


New member
I change the following:

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xE2 }

#define MYIPADDR 10,0,0,50
#define MYIPMASK 255,255,255,0
#define MYDNS 75,75,75,75
#define MYGW 10,0,0,1

I am still getting the Ethernet cable is not connected message. I still don't see any ethernet connection LEDs on the ESP32-PI or the network switch.