How to get MAC and IP address of devices connected to ESP8266 ?

This post explains getting MAC address and IP address of devices connected to ESP8266. Typically, the MAC address is only visible on each end of a “hop” in a packet so if you are going from some device via WiFi through the router to some other device, the MAC address you would see would be from your device and the router. The router will typically have a table of IP addresses and associated MAC addresses for those devices that it has handed out an IP address to via DHCP.

A media access control address (MAC address) of a device is a unique identifier assigned to network interfaces for communications. In this Example we will get MAC address of all connected devices to the ESP8266. ESP8266 acts as WiFi access point.

ESP8266 Code to Get MAC and IP Address of Connected Devices

This program shows IP and MAC address of connected devices to ESP8266.

Results

Open serial monitor to see the connected devices and IP, MAC address.

ESP8266 IP and MAC Address of Connected clients

To get MAC address of ESP8266 read this.

Leave a Reply