# How to setup OpenFAN Micro

## Configure WiFi

When you power up the OpenFAN Micro for the first time, you will have to configure it.\
This is done only once, or whenever you want to switch OpenFAN Micro to a different WiFi network.

1. Connect OpenFAN Micro to USB
1. The white LED on OpenFAN Micro should be constantly on (not blinking)
1. On your Phone/Tablet/PC scan for available WiFi networks
1. Connect to WiFi network with `SK OpenFAN` SSID
1. Your phone should automatically open to `http://192.168.4.1`
1. You will see a list of available WiFi networks
1. Select the one you want to connect the OpenFAN Micro to and enter WiFi Password
1. Click save and wait couple of seconds for the OpenFAN Micro to connect
1. The white LED should start to blink. This means OpenFAN Micro has connected to your WiFi
1. Power cycle OpenFAN Micro

## Device IP

If your network supports mDNS you can use your OpenFAN Micro device name to access the web UI.\
For example if your device name is `MyOpenFan`, you can access it via `http://uopenfan-myopenfan.local`.

Alternatively you can use your device IP address.\
For example if OpenFAN Micro has the IP address of `192.168.1.150`, then you can access it via `http://192.168.1.150`.

> **NOTE: mDNS / Device IP**
>
> By default OpenFAN will be named `MyOpenFan`.\
> If your network does not support mDNS, you will have to find the IP address of the OpenFAN Micro.\
> Usually you can find this information on your network router.

## Switch/reset WiFi network

In order to switch WiFi network, we first have to tell OpenFAN Micro to "forget" the current WiFi network it's connected to:

1. You will need to know the IP/mDNS address of your OpenFAN Micro

1. Just as an example will assume OpenFAN Micro has the IP of `192.168.1.150`

1. In your web browser open `http://192.168.1.150/api/v0/wifi/reset?confirm=true` (replace `192.168.1.150` with the actual IP address of your OpenFAN micro)

1. You should see the response that looks like

   ```json
   {"status":"ok", "message": "WiFi configuration has been reset. Please connect to OpenFAN WiFi and re-configure the device."}
   ```

1. OpenFAN Micro will restart

1. After a second or two the ACT LED should be constantly on. This means device is waiting for WiFi configuration

1. Follow the steps in "Configure WiFi" section to select a new WiFi network

> **NOTE**
>
> If your network does not support mDNS, you will have to find the IP address of the OpenFAN Micro.\
> Usually you can find this information on your network router.
