Esp8266 to LocalServer

384 views Asked by At

Basically I need to send data from Esp8266 to a server which is created using XAMPP on the laptop. I have been using the following code on the ESP side

AT+CWJAP="dlink","password" AT+CIPMUX=1 AT+CIPSTART=4,"TCP","192.168.0.105",80 AT+CIPSEND=4,6 123456 busy s... AT+CIPCLOSE

My question is whether the IP address which i'm using is the correct IP for the server created using XAMPP? Do I need to send a GET request in order to send data? Do I need to make changes on the server side or just running the apache service is enough for my purpose?

1

There are 1 answers

1
Emil Vikström On

The IP will be different in every network. I assume your network is set up with DHCP in which case the server might get different addresses every time.

There are mDNS libraries for ESP82666 that you can use to lookup the server by its local domain name (for example servername.local). Or you can configure the server to use a static IP.