ESP8266 IP to String Conversion

Converting ESP8266 IP address to string or character array. There is simple way to convert IP address to string is using toString() function.

WiFi.localIP().toString();

IP address to string

What is IP Address?

An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing.

What is MAC Address?

A media access control address (MAC address) of a device is a unique identifier assigned to a network interface controller (NIC). For communications within a network segment, it is used as a network address for most IEEE 802 network technologies, including Ethernet, Wi-Fi, and Bluetooth.

How do you find your IP address of ESP8266?

You can get IP address of ESP8266 using WiFi.localIP(); when esp is connected to WiFi Router.

When ESP8266 is in access point mode then ESP has default IP address 192.168.4.1 .

Arduino ESP8266 Example for IP address conversion

The code to connect to a wireless access point is relatively straightforward: enter the SSID and the password of the network you want to connect to

Results

More about IP address

 

Leave a Reply