ESP32 - Ethernet w5500 With Plain (HTTP) and SSL (HTTPS) - Renzo Mischianti
ESP32 - Ethernet w5500 With Plain (HTTP) and SSL (HTTPS) - Renzo Mischianti
NEXT STORY
NEWSLETTER
Electronic, 3D printing and embedded
Email
E
SUPPORT ME!!
programming S Language
English
P
By continuing, you accept the
3 privacy policy
2:
et
h
er
n
et
w
5
5
1 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
P
) USEFUL PCBS
a
n
d
Ciclop 3D scanner: production
S and assembly of the control PCB
–2
S
L
(
H
2 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
T
T
P
S
)
BY
RENZO
MISCHIANTI
·
PUBLISHED
18
OCTOBER
2022
·
UPDATED
22
NOVEMBER
2023
3 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
4 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
5 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
6 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
7 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
D
e
vi
c
e
s
8 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
9 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
10 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
11 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
F
e
a
t
u
r
e
s
12 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
13 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
14 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
15 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
16 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
W
iri
n
g
17 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
18 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
19 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
20 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
21 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
22 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Li
b
ra
ry
23 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
S
S
L
C
li
e
n
t
24 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
25 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
26 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
S
S
L
C
li
e
n
t
w
it
h
E
t
h
e
r
n
e
t
27 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
28 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
#include
"Ethernet.h"
#include
29 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
"EthernetLarge.h"
B
u
ff
e
r
e
xt
e
n
30 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
si
o
n
unsigned
unsigned
M
a
n
31 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
u
al
M
o
di
fi
c
a
ti
o
n
C:\Program
Files
(x86)\Arduino
32 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
libraries\Ethernet\src C:\Program
Files
(x86)\Arduino
\libraries
\Ethernet\src
Ethernet.h
1 ...
2 // Configure the m
3 // up to 4 sockets
4 // of RAM are used
5 // you are limited
6 #if
7 #define
8 #else
9 #define
10 #endif
11
12 // By default, eac
13 // MAX_SOCK_NUM is
14 // this will use l
15 // can really help
16 // buffers should
17 // does not always
18 //#define ETHERNET
19 ...
1 ...
2 // Configure the m
3 // up to 4 sockets
4 // of RAM are used
5 // you are limited
6 #define
7
8 // By default, eac
9 // MAX_SOCK_NUM is
10 // this will use l
11 // can really help
12 // buffers should
13 // does not always
14 #define
15 ...
33 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
sudo
MAX_SOCK_NUM
ETHERNET_LARGE_BUFFERS
34 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
C
o
d
e
35 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
36 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
In
iti
al
iz
e
d
e
vi
c
e
37 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
38 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
1 if
2
3 }
Serial.println
// Check for Ethernet
if (Ethernet.hardwareS
Serial.println
while
}
}
if (Ethernet.linkStatu
Serial.println
39 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
IPAddress ip(MYIPADDR)
IPAddress dns(MYDNS);
IPAddress gw(MYGW);
IPAddress sn(MYIPMASK)
Ethernet.begin(mac, ip
Serial.println
Si
m
pl
e
H
T
T
P
r
e
q
u
e
st
40 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
41 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
42 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
43 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
if (len >
byte
if (len >
client.read(buffer,
if (printWebData) {
Serial.write
}
byteCount
}
44 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Serial.print
Serial.println
// do nothing foreve
while
delay
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
45 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
46 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
1 Begin Ethernet
2 DHCP OK!
3 Local IP : 192.168
4 Subnet Mask : 255.
5 Gateway IP : 192.1
6 DNS Server : 192.1
7 Ethernet Successfu
8
9 Connected!
10 HTTP/1.1 200 OK
11 Date: Wed, 09 Mar
12 Content-Type: appl
13 Content-Length: 19
14 Connection: close
15 Server: gunicorn/1
16 Access-Control-All
17 Access-Control-All
18
19 {
20
21
22
23
24
25
26
27 }
28
29 disconnecting.
30 Received 422 bytes
H
T
T
47 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
P
S
r
e
q
u
e
st
48 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
if (client.connect(ser
Serial.println
// Make a HTTP reque
client.println(
client.println(
client.println(
client.println();
} else
// if you didn't get
Serial.println
}
Begin Ethernet
DHCP OK!
Local IP : 192.168.1.1
Subnet Mask : 255.255.
Gateway IP : 192.168.1
DNS Server : 192.168.1
Ethernet Successfully
Connected!
HTTP/1.1 400 Bad Reque
Server: awselb/2.0
Date: Wed, 09 Mar 2022
Content-Type: text/htm
Content-Length: 220
Connection: close
<html>
<head><title>400 The p
<body>
<center><h1>400 Bad Re
<center>The plain HTTP
</body>
</html>
Disconnecting.
Received 370 bytes in
49 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
R
e
tr
ie
v
e
c
e
50 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
rt
if
ic
a
t
e
51 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Generate
code
52 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
trust_anchors.h
trust_anchors.h
1 #ifndef
2 #define
3
4 #ifdef
5 extern
6 {
7 #endif
8
9 /* This file is au
10
11
12
13
14
15
16
17
18 #define
19
20 static
21
22
23
24
25
53 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
26
27
28
29
30 };
31
32 static
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 };
56
57 static
58
59 };
60
61 static
62
63
64
65
66
67
68
69
70
71
72
73 };
74
75 #ifdef
76 }
77 #endif
78
79 #endif
A
d
d
S
S
L
54 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
C
li
e
n
t
w
r
a
p
p
e
r
trust_anchors.h
#include
#include
#include
#include
55 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
EthernetClient
56 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
TAs
TAs_NUM
1
2
3
4
5
6
7
8
57 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
58 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
59 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Begin Ethernet
DHCP OK!
Local IP : 192.168.1.1
Subnet Mask : 255.255.
Gateway IP : 192.168.1
DNS Server : 192.168.1
Ethernet Successfully
connected to HTTP/1.1
Date: Wed, 09 Mar 2022
Content-Type: applicat
Content-Length: 198
Connection: close
Server: gunicorn/19.9.
Access-Control-Allow-O
Access-Control-Allow-C
{
"args": {},
"headers": {
"Host": "httpbin.o
"X-Amzn-Trace-Id":
},
"origin": "82.51.127
"url": "
}
disconnecting.
Received 423 bytes in
T
h
a
n
k
s
60 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
61 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
62 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
63 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
64 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
65 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
66 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
67 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
68 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
69 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
SUPPORT
FORUM
70 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
10
December
2022 at
10:49
Many
thanks
for
your
code,
it
works
perfectly
when
connecting
71 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
to
an
HTTPS
link
i.e.
with
port
443.
However,
when
using
MQTTS
with
port
8883
the
certi�cate
does
not
work
and
gives
a
number
of
errors.
It
is
possible
to
generate
a
certi�cate
for
use
with
MQTTS
please?
72 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Thank
you.
Dr
Phil…
Reply
10
December
2022 at
15:12
Hi
Phil,
I
don’t
know
if
the
certi�cate
it’s
the
same.
MQTTS
certi�cate
usually
is
used
to
do
mutual
authenticating
not
for
ssl
encrypting.
For
example
73 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
when
using
aws
mqtt
like
here
AWS
IoT
core
and
MQTT
services:
creating
AWS
thing
with
certi�cate
and
policy
–
2
But
I
must
check
better.
Bye
Renzo
Reply
28
July
2023
at
20:47
74 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Hi,
I
am
testing
the
sslclient
method
on
an
ESP32
DEV
Module
board,
connected
to
a
W5500
breakout
board.
Basic
ethernet
client
works
�ne,
but
when
testing
ssl,
it
seems
to
get
stuck
at
connect(server,
port)
line.
75 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
I
am
using
Ethernet.h,
and
I
made
the
recommended
changes
to
both
this
lib
and
the
sslclient
library.
Have
you
seen
such
issues?
Reply
31
July
2023
at
08:56
Hi
Abraham,
It’s
very
strange,
76 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
try
to
use
ErtherLarge,
It’s
possible
that
the
Ethernet
is
changed
from
the
�rst
version.
Bye
Renzo
Reply
30
September
2023 at
18:28
Hi
Renzo,
Thank
you
for
sharing
this,
this
was
the
only
article
that
worked
77 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
for
me,
but
I
had
a
problem
that
every
time
I
try
to
make
a
request
from
a
website
it
returns
this:
x-hcdn-
request-
id:
9c6970381f26e9be6a600fafb441ff2f-
asc-
edge2
x-hcdn-
cache-
status:
HIT
301
Moved
Permanently
301
Moved
Permanently
78 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
The
document
has
been
permanently
moved.
.
Basically
it
can
do
everything
except
the
http
request,
and
it
comes
back
saying
“301
moved
permanently”,
I’ve
already
tried
requesting
a
port
443
to
try
with
ssl
and
it
didn’t
79 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
work,
I’ve
tried
using
llocalhost
and
the
connection
can’t
even
be
established,
I
no
longer
know
what
what
to
do
Reply
1
October
2023 at
08:51
Hi
Esguixo,
the
code
work
correctly,
but
the
HTTP_STATUS
301
80 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
identify
that
the
url
you
point
no
more
exist
and
the
server
know
that
and
send
you
a
redirect
path
to
the
new
URL.
Bye
Renzo
Reply
22
November
2023 at
06:08
Thanks
for
the
code
you
81 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
shared.
Everything
is
correct,
and
the
code
works
�ne
for
me.
The
only
issue
I’m
facing
is
that
after
about
two
months,
the
device
is
unable
to
connect
to
the
server
I
introduced
to
it.
In
the
serial
82 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
monitor,
it
writes
‘SSL_error
connection_failed.’
Please
guide
me
on
what
to
do.
thanks
Reply
22
November
2023 at
08:21
Hi
Hossein,
if
it
works
for
two
months,
I
think
It
can
be
a
memory
leak
problem.
83 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
Try
to
check
with
this
command
the
memory
usage.
SSL
needs
a
lot
of
memory,
and
It
can
be
the
�rst,
in
that
situation,
to
give
an
error.
Bye
Renzo
Reply
84 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
85 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
86 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
87 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
88 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
89 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
90 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
91 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
92 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
93 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
94 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
95 of 96 28/12/2023 19:04
ESP32: ethernet w5500 with plain (HTTP) and SSL (HTTPS) –... https://mischianti.org/esp32-ethernet-w5500-with-plain-http...
96 of 96 28/12/2023 19:04