Setting JSON

OS3.5.0 or later

This is a JSON file used internally by obnizOS. By writing this JSON from the console or the cloud, you can configure the device in a single step.

Key Name Type Description Required
net String Specify the network. For multiple settings, This indicate first priority of network used. "wirelesslan"(wifi), "wifimesh", "wiredlan" "cellularmodule" required
wifi Array of wifi Object ※1 The last one is the one added most recently. Before OS3.5.0 first one is tried out first then the second one. After OS3.5.0 the order is reversed hence the last one is tried out first.
wifimesh Array of wifimesh Object※2 This is an array of object.
ether ether Object※3 Settings for "wiredlan"
cellular cellular Object※4 Settings for "cellularmodule"
passkey String Passkey for Setting via Wi-Fi
wifi_channel String Wi-Fi Max Active Channel. Default is 11.

※1 wifi Object

Key Name Type Description Required Format/Example
ssid string SSID required
pass string Password required
bssid string BSSID of access point Hex 6 Bytes. ex) 0123456789ab
ip string Static IP ex) 192.168.0.2
netmask string Subnet mask ex) 255.255.255.0
gw string Default gateway ex) 192.168.0.1
dns string DNS server ex) 8.8.8.8
e_n string WPA2 Enterprise Username
e_p string WPA2 Enterprise Password
e_i string WPA2 Enterprise Identity/Anonymous ID
addr string WPA2 Proxy address
port string WPA2 Proxy port

※2 wifimesh Object

Key Name Type Description Required Format/Example
ssid string SSID required
pass string Password required
meshid string Mesh ID required Hex 6 Bytes. ex) 0123456789ab
bssid string BSSID of access point Required when target Wi-Fi is hidden. Hex 6 Bytes. ex) 0123456789ab
ip string Static IP ex) 192.168.0.2
netmask string Subnet mask ex) 255.255.255.0
gw string Default gateway ex) 192.168.0.1
dns string DNS server ex) 8.8.8.8
e_n string WPA2 Enterprise Username
e_p string WPA2 Enterprise Password
e_i string WPA2 Enterprise Identity/Anonymous ID
addr string WPA2 Proxy address
port string WPA2 Proxy port

※3 ether Object

Key Name Type Description Required Format/Example
ip string Static IP ex) 192.168.0.2
netmask string Subnet mask ex) 255.255.255.0
gw string Default gateway ex) 192.168.0.1
dns string DNS server ex) 8.8.8.8
addr string WPA2 Proxy address
port string WPA2 Proxy port

※4 cellular Object

Key Name Type Description Required Format/Example
apn string APN required
id string ID required
password string Password

passkey

passkey can be set from this setting json.
If it has a key, then default passkey "obniz" will disabled and new passkey will be used.

{
    "passkey": "newpasskey",
    "net": "wirelesslan",
    "wifi": [
        {
            "ssid": "your ssid",
            "pass": "your password"
        }
    ]
}

wifi_channel

Wi-Fi Channel/Region Setting. By default, "11" will be used. It mean 11 channel is maximum frequency activly scan.

Available values are

  • "11": North America
  • "13": EU and Almost all the World
  • "14": Japan
{
    "wifi_channel": "13",
    "net": "wirelesslan",
    "wifi": [
        {
            "ssid": "your ssid",
            "pass": "your password"
        }
    ]
}

System Component

System Components is not public on OS3.5.0. Please contact us if you

JSON Examples

Simple Wi-Fi

{
    "net": "wirelesslan",
    "wifi": [
        {
            "ssid": "your ssid",
            "pass": "your password"
        }
    ]
}

Two Wi-Fi Setting and Cellular with cellular primary.

{
    "net": "cellularmodule",
    "wifi": [
        {
            "ssid": "secondary wifi ssid",
            "pass": "your password"
        },
        {
            "ssid": "primary wifi ssid",
            "pass": "your password"
        }
    ],
    "cellular": {
        "apn": "apn1",
        "id": "id1",
        "password": "pass1"
    }
}

Example with keys

{
    "net": "wirelesslan",
    "wifi": [
        {
            "ssid": "ssid1",
            "pass": "pass1",
            "bssid": "",
            "ip": "",
            "netmask": "",
            "gw": "",
            "dns": "",
            "e_n": "",
            "e_p": "",
            "e_i": "",
            "addr": "",
            "port": ""
        },
        {
            "ssid": "ssid2",
            "pass": "pass2",
            "bssid": "",
            "ip": "",
            "netmask": "",
            "gw": "",
            "dns": "",
            "e_n": "",
            "e_p": "",
            "e_i": "",
            "addr": "",
            "port": ""
        }
    ],
    "wifimesh": [{
        "ssid": "ssid1",
        "pass": "pass1",
        "bssid": "",
        "ip": "",
        "netmask": "",
        "gw": "",
        "dns": "",
        "e_n": "",
        "e_p": "",
        "e_i": "",
        "addr": "",
        "port": "",
        "meshid": "0123456789ab"
    }],
    "ether": {
        "ip": "",
        "netmask": "",
        "gw": "",
        "dns": "",
        "addr": "",
        "port": ""
    },
    "cellular": {
        "apn": "apn1",
        "id": "id1",
        "password": "pass1"
    }
}