Network Configration

obnizOS for ESP32 can connect to the internet by using belows

  • Wi-Fi (b/g/n 2GHz)
  • Ethernet (10M/100M) (obnizOS 2.1.0 and later)

Wi-Fi needs antenna. Ethernet needs PHY transceiver (LAN8720 or TLK110) and connector.

Protocol

TCP is used to communicate with obniz Cloud. TLS communication is enabled regarding Account Plan.

Protocol used by obnizOS are below

OS Protocol
obnizOS 3.0.2 or older ws://
obnizOS 3.1.0 or later ws:// or wss:// depends on Plan

Configration

Configration is done from one of below two methods.

  • serial communication

  • connectin ESP32 via W-Fi (Wi-Fi only) (obnizOS 2.1.0 and later)

    obniz_cli which is used for flashing obnizOS will start serial communication after flashing see more detail at Install obnizOS.

2. Connect and configure by connecting ESP32 via Wi-Fi (obnizOS 2.1.0 and later)

ESP32 is available as Wi-Fi access point when

  1. Wi-Fi or Ethernet is not choosen yet.
  2. Wi-Fi was choosen. But connection failed or no known Wi-Fi found.

By connecting it Wi-Fi, choosing SSID and typeing password is done on a smartphone.

2-1 Connect to ESP32 Wi-Fi

It SSID is obniz-XXXXXXXX. Connect to that SSID.

2-2 Passowrd

On the same smartphone, Type and open webpage in your browser. URL is different in some obnizOS version

OS URL
obnizOS 3.0.2 or older http://1.2.3.4
obnizOS 3.0.3 or later http://192.168.0.1

Choose SSID from pull down and type a password for that.
Then press "Connect" Button.
ESP32 start connection immidiately and your browser shows "can't open page".
When success, your ESP32 will be online otherwise return to same state.

To configure static ip, Press "Option Setting".

You can configure Static IP

  • Static IP Address
  • SubnetMask
  • Gateway IP Address
  • DNS Server IP Address

You need to fill all of these parameters.

When you need to configure proxy server, fill belows

  • IP address of proxy server (obnizOS3.1.0 or later)
  • Port number of proxy server (obnizOS3.1.0 or later)

Then press "Connect" Button.
Your device will start connection immidiately.

OS Browser
obnizOS 3.0.2 or older your browser shows "can't open page".
obnizOS 3.1.0 or later your browser shows web page like below

When success, your device become online otherwise return to first state.

Configration via Serial - Network

It start from choosing network type.

  1. Wi-Fi or Ethernet
  2. When Wi-Fi, ssid and password type then choosing IP aquiring method.
  3. When Ethernet, PHY transceiver configrations.

First step is choosing Wi-Fi or Ethernet.

-----Select Interface-----

0:Wireless LAN(default)
1:Wired LAN:

Type 0 for Wi-Fi or 1 for Ethernet.
All selection will timtout after 60 seconds. If selections has no default selection, then ESP32 will reboot. Otherwise, default selection will be choosen.

Configration via Serial - Wi-Fi

In Wi-Fi mode, ESP32 start Wi-Fi Scannnig and wait for ssid selection.

Wi-Fi Scanning...

---Nearby SSID List---
 - obniz_wifi
 - AirPortXXX
 - freewifi2g-2019


Enter SSID-Pass
--- SSID ---
Input text >> obniz_wifi

Type SSID want to connect to and press Enter.
Then ESP32 will ask password.

--- Password ---
Input text >>

In password typing, characters you type will never printed.

--- select Network ---
0:DHCP(default)
1:Static IP
Input number >> 

In the case of DHCP, it is 1 for0 fixed IP. Enter 0 if not specified.

-0: In the case of DHCP, set or select the proxy next.
-1: For fixed IP, please refer to here.

After setting, configure Proxy settings

--- Proxy Setting ---
0:Proxy disable(default)
1:Proxy enable
Input number >> 0

It is 0 to disable Proxy and1 to enable it. Enter 0 if not specified.

-0: If disabled, connect to Wi-Fi next.
-1: If it is valid, please refer to here.

When it fail, ESP32 will scan again.
After pressing enter ESP32 will try to connect.

Wi-Fi Connecting SSID: obniz_wifi

After done, ESP32 will start connection to obniz cloud then show online when success.

Connecting Cloud
Online

How to set static ip

With Static IP, Below settings will be asked. All of below settings are needed to use static IP. No empty will be accepted.

--- IP Address ---
Input address >> 192.168.0.10
--- Default Gateway ---
Input address >> 192.168.0.1
--- Subnet Mask ---
Input address >> 255.255.255.0
--- DNS Address ---
Input address >> 192.168.0.1

それぞれに必要な値を入力し、エンターを押すと次の項目に移動します。

How to set proxy

Proxy settings require proxy server address and port information.。

--- Proxy Config ---
Proxy Address
Input text >> 192.168.8.11

--- Proxy Port ---
Port Area:0-65535
Input number >> 8080

Configration via Serial - Ethernet

In Ethernet mode, ESP32 will ask PHY transceiver connection settings.

--- Phy Base Address ---
0-31:Address: 

First PHY transciver base address. It depends on transceiver you use.

In case ofLAN8720, It should 0 or 1.
In case of TLK110, It should 31.

--- Clock Mode ---
0:IO0 IN
1:IO0 OUT
2:IO16 OUT
3:IO17 OUT

Clock synchronize method between ESP32 and PHY transciever.

Option Description
IO0 IN Input external clock in GPIO0
IO0 OUT Output internal APLL 50Mhz clock from GPIO0
IO16 OUT Output internal APLL 50Mhz clock from GPIO16
IO17 OUT Output inverted internal APLL 50Mhz clock from GPIO17
--- Power Mode ---
0-40:GPIO reset + module reset
41:only module reset:

Reset method for PHY transciever.

Option Description
0-40 Use hardware and module reset with GPIOXX
41 Only module reset
--- MDC GPIO ---
0-40:GPIO:

GPIO number which is connected to MDC of PHY transciever.

--- MDIO GPIO ---
0-40:GPIO:

GPIO number which is connected to MDIO of PHY transciever.

--- CHIP ---
0:LAN8720
1:TLK110:

Choose a PHY transciever from two option.

That's all. ESP32 will show settings you set then save it.

---Check Data---
PhyAddr:0
ClockMode : 3
PowerMode : 5
MDC GPIO : 23
MDIO GPIO : 18
CHIP : 0

Saveing...

After saving, ESP32 will try to obniz cloud. then show online when success.

Connecting Cloud
Online

Reset Configration

After boot or when connection to the cloud is not established, ESP32 will ask you to enter setting mode or not. It is very short time, about 0.5 sec.

Press 's' to setting mode: s

Press s to enter setting.

-----Select Setting-----

0:NormalBoot
1:Interface(Wireless LAN or Wired LAN)
2:All Reset
3:Wireless LAN Reset
4:Wired LAN Reset: 

Choose from a setting list by typing number.

Option Description
0 Back to normal operatio mode
1 Go to Wi-Fi、Ethenert selection
2 Reset all stored settings except for devicekey
3 Reset only Wi-Fi settings
4 Reset only Ethernet settings

Some setting option require confirmation like below.

-----All Reset (WirelessLAN and WiredLAN setting delete)-----

y:Yes
n:No:

You will Get in Few Days

Circuit for Starter “obniz Board” is available on Amazon and other online stores.
You can get it at below

Our products and resellers

Forum

Visit our developer’s forum to discuss and discover technologies.

Forum

Contact

Feel free to contact out support and technical team.

Contact us