Skip to content
Thomas Sarlandie edited this page Feb 11, 2018 · 3 revisions

Configuring KBox

KBox looks for a file named kbox-config.json on the SDCard when it starts. To change the configuration just remove the SDCard, edit the file (create it if it does not exist from one of the examples) and put it back in KBox. You need to restart KBox every time.

You can find complete examples in extras/config.

Configuration file format

The configuration file must be a valid JSON file. You can specify only the values that you want to change and skip everything else so the simplest configuration file would be:

{}

You can then add sections for the things you would like to configure.

For example, to change the name of the wifi network created by KBox:

{
  "wifi": {
    "accessPoint": {
      "ssid": "my-super-yacht"
     }
   }
}

WiFi Section

Config Key Type Description
wifi.enabled boolean Enables or disables the WiFi module completely.
wifi.mmsi string Sets the MMSI of the vessel to use in SignalK messages. If you do not specify this, a UUID will be generated automatically using the hardware serial number of KBox
wifi.nmeaConverter list of bools Enables or Disables nmea messages
wifi.accessPoint.enabled bool Enables or disables the built-in access point
wifi.accessPoint.ssid string SSID of the built-in access point.
wifi.accessPoint.password string Password of the built-in access point (omit this to set no password).
wifi.client.enabled bool Enables or disables KBox connecting to an existing WiFi network
wifi.accessPoint.ssid string SSID of the access point to connect to.
wifi.accessPoint.password string Password of the access point to connect to.

Example

  "wifi": {
    "enabled": true,               // Set this to false to completely de-activate the WiFi module.
    "mmsi": "412345678",
    "nmeaConverter": {             // Specify which sentences should be generated in NMEA format
      "xdrPressure": true,
      "xdrAttitude": true,
      "xdrBattery": true,
      "hdm": true,
      "mwv": true,
      "rsa": true
    },
    "accessPoint": {              // KBox can create an access point
      "enabled": true,            // set to False to disable the built-in access point
      "ssid": "KBox"              // You can set the ssid and a password if you want.
    },
    "client": {
      "enabled": false,                // KBox can also connect to an existing access point
      "ssid": "your-boat-network",     // Specify the SSID and password if required.
      "password": "super-secret"
    }
  },

Sample configuration file.

{
  "imu": {
    "enabled": true,
    "frequency": 20,
    "enableHdg": true,
    "enableHeelPitch": true,
    "mounting": "verticalPortHull"
  },
  "barometer": {
    "enabled": true,
    "frequency": 1
  },
  "wifi": {
    "enabled": true,
    "nmeaConverter": {
      "xdrPressure": true,
      "xdrAttitude": true,
      "xdrBattery": true,
      "hdm": true,
      "mwv": true,
      "rsa": true
    },
    "accessPoint": {
      "enabled": true,
      "ssid": "KBox"
    },
    "client": {
      "enabled": false,
      "ssid": "your-boat-network",
      "password": "super-secret"
    }
  },
  "serial1": {
    "inputMode": "nmea",
    "outputMode": "nmea",
    "baudRate": 38400,
    "nmeaConverter": {
      "xdrPressure": true,
      "xdrAttitude": true,
      "xdrBattery": true,
      "hdm": true,
      "mwv": true,
      "rsa": true
    }
  },
  "serial2": {
    "inputMode": "nmea",
    "outputMode": "nmea",
    "baudRate": 4800,
    "nmeaConverter": {
      "xdrPressure": false,
      "xdrAttitude": false,
      "xdrBattery": false,
      "hdm": true,
      "mwv": true,
      "rsa": true
    }
  },
  "nmea2000": {
    "txEnabled": true,
    "rxEnabled": true
  }
}