Skip to main content

How do I get the IP address of my device?

Depending on what device you are using you'll need to take a different approach.

Windows

In Windows you can right click on the Wi-Fi icon in the system tray and click properties to get the IP address, or open the Command Prompt and type ipconfig

macOS, UNIX and Linux devices including Raspberry Pi

On *nix devices you will need to type either ifconfig or IP config in the Terminal, or you can browse in System Settings for Network and then click the Wi-Fi adapter and select properties.

On newer builds of Ubuntu you'll need to use ip a in the commmand line.

Arduino based microcontrollers

There will likely be example code in the Example menu for your particular board, but roughly speaking you need something like this:

#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  WiFi.begin("UAL-IoT", "example");
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
  
  Serial.println(WiFi.localIP());
}

void loop() {
}