Skip to content

global.json

global.json is loaded at every boot and provides the fundamental device behaviour, network definitions, and server endpoints. It is stored on the USB filesystem at config/global.json and must always be present.

{
"data": {
"global": {
"dev": {
"core": { "update_period_mins": 15 },
"nfc": { "ndef": "https://www.infrafon.com", "mode": 0, "emul": true }
}
},
"network": {
"networks": {
"k1": {
"type": "wifi",
"auth": { "ssid": "kiosk", "wpa2_password": "infrafon-2022" },
"checkPeriodSecs": 900
}
},
"networkOrder": ["k1"],
"entityMgrServer": {
"url": "mqtt://mqtt.infrafon.cloud",
"auth": { "mqttUser": null, "mqttPassword": "none" },
"kmgr": {
"url": "https://api.infrafon.cloud/kmgr/rest/v1",
"auth": { "type": "devicetoken" }
}
},
"ap": {
"ssid": "kiosk",
"wpa2_password": "infrafon-2022"
}
}
}
}

The top‑level wrapper that contains all sections.

Configuration variables

  • Type: object
  • Required: yes
{ "data": { /* … */ } }

Contains device‑wide default settings. Any key under devcfg can appear here. This is merged with the per‑state allocdata.json / unallocdata.json files; the state‑specific file takes priority.

Configuration variables

  • Type: object
  • Required: yes
{
"data": {
"global": {
"dev": {
"core": { "update_period_mins": 10 }
}
}
}
}

A container for all devcfg keys that should be active when no other configuration overrides them. See the Device Config section for the full list of available keys.

{
"data": {
"global": {
"dev": {
"core": { "update_period_mins": 15 },
"alert": { "enabled": true, "onRed": true }
}
}
}
}

All keys inside dev are optional. If a key is present in both global.json and the active state file, the state file wins.

Holds everything related to network connections.

Configuration variables

  • Type: object
  • Required: yes (at least networkOrder)
{
"data": {
"network": {
"networks": {},
"networkOrder": ["k1"],
"entityMgrServer": { "url": "mqtt://mqtt.infrafon.cloud" }
}
}
}

Defines one or more named networks. Each key is the network name used in networkOrder, netact / netdeact actions, and the devcfg.fw.prov_net field.

Configuration variables

  • Type: object of network objects
  • Required: no (can be empty)
{
"data": {
"network": {
"networks": {
"k1": {
"type": "wifi",
"auth": { "ssid": "kiosk", "wpa2_password": "infrafon-2022" },
"checkPeriodSecs": 900
}
}
}
}
}

Valid network types:

TypeDescription
wifiStandard Wi‑Fi (WPA2‑PSK, WPA3‑SAE, EAP‑TLS)
bleBluetooth Low Energy (nRF53)
bleperiBLE peripheral (nRF52), requires state
loraperiLoRaWAN peripheral (nRF52), requires auth with nwkkey etc.

An ordered array of network names. The device will attempt to connect to networks in this order. All networks listed must be defined in networks.

Configuration variables

  • Type: array of strings
  • Required: yes
{
"data": {
"network": {
"networkOrder": ["k1", "b1", "q1"]
}
}
}

Address and credentials for the MQTT broker and the IES (Infrafon Entity Server) used for allocation/return operations.

Configuration variables

  • Type: object
  • Required: yes (required for alloc/return)
{
"data": {
"network": {
"entityMgrServer": {
"url": "mqtt://mqtt.infrafon.cloud",
"auth": { "mqttUser": null, "mqttPassword": "none" },
"kmgr": {
"url": "https://api.infrafon.cloud/kmgr/rest/v1",
"auth": { "type": "devicetoken" }
}
}
}
}
}

auth.mqttUser / mqttPassword can be null if the broker does not require authentication.

Fallback access point used when no other WiFi network is active (e.g., during provisioning or DFU). It uses the same auth object format as a WiFi network.

Configuration variables

  • Type: object
  • Required: no
{
"data": {
"network": {
"ap": {
"ssid": "kiosk",
"wpa2_password": "infrafon-2022"
}
}
}
}

The ap object does not include type or checkPeriodSecs; it only contains the auth fields directly.