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 | 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. | |
| hw | Object | LED and other hardware related configrations | |
| ws_server( OS7 or later ) | string | Destination Endpoint for Self Hosting |
※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"
}
]
}
Component Settings
The configuration of System Components can be performed within hw.
The following settings are available:
| Key | Type | Description | Required |
|---|---|---|---|
| terminal | boolean | ( OS7 or later ) Specifies whether to enable the Console. The default value is true. |
|
| setting_mode | string | ( OS7 or later ) By specifying "only_initial", you can disable the feature that automatically enters setup mode when a network connection cannot be established. |
Connection Target Server for Self-Hosting
In OS7 and later versions, it is possible to connect to self-hosting servers other than the obnizCloud.
Please specify the target using an IP address or domain name via the WebSocket protocol.
{
"ws_server": "ws://192.168.0.2"
}
{
"ws_server": "ws://192.168.0.2:8080"
}
{
"ws_server": "ws://mydomain.com"
}
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"
},
"hw": {
"terminal": false,
"setting_mode": "only_initial"
},
"ws_server": "ws://mydomain.com"
}