DEV Community

Tomoyuki KOYAMA
Tomoyuki KOYAMA

Posted on

Check IP address on ESP32 via serial console

Connect to ESP32 via serial console

screen /dev/cu.usbserial-0001 115200
Enter fullscreen mode Exit fullscreen mode

Check IP address

>>> import network
>>> sta_if = network.WLAN(network.STA_IF)
>>> sta_if.ifconfig()
('192.168.0.14', '255.255.255.0', '192.168.0.1', '192.168.0.1')
Enter fullscreen mode Exit fullscreen mode

The result represents a list that takes as follows: IP address, Subnet mask, Default gateway, DNS server address.

Reference

4. Network basics — MicroPython 1.8.7 documentation

Top comments (0)