So I've got ESP32 acting as a server, and when calling http://IP_OF_ESP32:7777/SOMETEXT my code enables me to view the text written after the slash, the problem is that after assigning static IP to my ESP32 it doesn't work anymore here's my code
Most home routers define a class C network (netmask 255.255.255.0), I have never seen one that defines a class B network (netmask 255.255.0.0) as you defined it. Where are these values from? Is your router configured that way?
Most home routers define a class C network (netmask 255.255.255.0), I have never seen one that defines a class B network (netmask 255.255.0.0) as you defined it. Where are these values from? Is your router configured that way?
My PC
Well then I guess that's the problem ..
IPv4 192.168.0.101
Subnet Mask 255.255.255.0
Def. Gateway 192.168.0.1
Router : 192.168.0.1
How should I change the code if I may ask?
Pylon gave you the important clue, your router is managing a C class network. Which means that the first three bytes of the address define the network and the last byte identifies a node on that network. That's what the subnet mask is telling you, albeit obliquely.
So, every IP address on your network must start with the same three bytes: 192.168.0 in your case. 192.168.1.121 doesn't match, so it doesn't work.
Just a side question, what wifi library do you use with your ESP32 board? The wifi boards have been developed since I've been playing around with the Arduino boards. I loaded your code on the latest Arduino IDE and there was a compile error, probably due to not having a correct wifi library, or some other basic issue. The ESP32 sounds interesting and I may put one on the Santa Clause list.
I loaded your code on the latest Arduino IDE and there was a compile error, probably due to not having a correct wifi library, or some other basic issue.
Did you choose the ESP32 as the target board? That code won't compile for an Arduino UNO! Did you install the ESP32 core?