Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The MMB Wireless Bridge Commissioning Daemon implements a RESTful API for commissioning the device onto on premises Wifi Wi-Fi networks, and for custom application provisioning ( device individual IDs, Tokens, credentials, resource urls, etc ). The customer is able to specify a configuration file 'white list' so that only the files they specify are allowed to be uploaded via the API. On startup the daemon will start the Gateway in uAP mode, broadcasting with the SSID 'Tripoli_<Gateway ethernet mac address>'. Once connected, the API documented below ( with sample scripts in python ) can be exercised. During first touch the web GUI can be used to connect the Gsteway Gateway to a local Wifi Wi-Fi network.

  • The bridge commissioning part of the service allows the user to provision and connect the device to a wireless network of their choosing
  • The executable provides a REST api to facilitate this

...

  • The service should be running on startup, but in case it is not, the service can be found at /etc/init.d/S99wirelessbridgecommissioning S85wirelessbridgecommissioning and the executable can be found at /usr/sbin/wireless_bridge_commissioning.
  • The configuration, and web gui files used by the wireless_bridge_commissioning executable can be found at /opt/commissioning/

...

Commissioning Usage

State Diagram

drawio
Drawio
103022659
baseUrlhttps://mmbnetworks.atlassian.net/wiki
diagramNameWBC State Diagram
contentId378110028
width641.5237862723216
zoom1
pageIdcontentId655622230
simple0
zoom1
inComment0
pageId555581807
diagramDisplayNameWBC State Diagram
lbox1
contentVer12
height764
revision14
3
baseUrlhttps://mmbnetworks.atlassian.net/wiki
diagramNameUntitled Diagram.xml
contentId377913403
width665WBC State Diagram
width641.5237862723216
links
tbstyle
height764
Drawio
103022659
contentId603226344
simple0
zoom1
pageId555581807
diagramDisplayNameUntitled Diagram.xml
lbox1
contentVer1
revision2
baseUrlhttps://mmbnetworks.atlassian.net/wiki
diagramNameUntitled Diagram.xml
width665
links
tbstyle
height880revision1

Bridge Commissioning Web GUI

  1. The commissioning gui GUI can be reached at 193192.167168.110.1:8080/commissioning.html
  2. Click the WIFI SCAN button at the top
    • This will cause the service to perform a scan for all 2.4 Ghz GHz networks
    • List all found networks with their associated SSID, Frequency, RSSI, and Security types
  3. Input the PASSWORD into the password field at the bottom of the form
    • Currently, there is no mechenism mechanism to support join a network with no security
  4. Press theĀ WIFI ASSOCIATE button at the bottom of the form
    • This will cause the service to attempt to join the selected network
    • The Gateway's IP Address will be returned in green on success

RESTful API

GET /sys/scan

Scan for Wifi for Wi-Fi networks

Input on /sys/scan

...

JSON array of all available and visible Wifi Wi-Fi networks where each entry contains the following: (SSID, Signal Level, Security)

We can ignore all non b/g/n and all non 2.4Ghz 4GHz results

Code Block
firstline1
titleJSON Format
linenumberstrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Wifi Scan Results",
  "description": "Result of Wifi Scan and Wifi Networks found",
  "type": "object",
  "properties": {
    "result": {
      "description": "Did the Wifi Scan succeed or fail?",
      "type": "boolean"
    },
    "found": {
      "description": "List of Wifi Networks found",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ssid": {
            "description": "Name of Wifi Network",
            "type": "string"
          },
          "security": {
            "description": "The security type of the Wifi Network",
            "type": "string"
          },
          "rssi": {
            "description": "The signal strength",
            "type": "integer"
          },
          "frequency": {
            "description": "The frequency of the Wifi Network",
            "type": "string",
            "default": "2.4",
            "enum": [
              "2.4",
              "3.6",
              "4.9",
              "5",
              "5.9"
            ]
          }
        },
        "required": [
          "ssid",
          "security",
          "rssi"
        ]
      }
    }
  },
  "required": [
    "result"
  ],
  "additionalProperties": false
}

POST /sys/associate

Connect to the Wifi Wi-Fi network pointed to by the given information

...

Code Block
firstline1
titleJSON Format
linenumberstrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Wifi Scan Results",
  "description": "Passing Opaque data",
  "type": "object",
  "properties": {
    "result": {
    "Wifi Scan Results",
  "description": "WhetherPassing theOpaque Associate succeededdata",
   
  "type": "boolean"
    }
  }object",
  "requiredproperties": [{
    "result": {
 ],     "additionalPropertiesdescription": "Whether the false
}

POST /sys/connect

Input

Code Block
firstline1
titleJSON Format
linenumberstrue
{Associate succeeded",
      "$schematype": "http://json-schema.org/draft-04/schema#"boolean"
    }
  },
  "titlerequired": "Wifi[
Scan Results",   "descriptionresult":
"Passing Opaque data"],
  "typeadditionalProperties": "object"false
}

Output

204 No Content

GET /sys/info

Input

None

Output

Code Block
firstline1
titleJSON Format
linenumberstrue
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Get System Info",
  "description": "Sotfware and Hardware information about the gateway",
  "type": "object",
  "properties": {
	"Manufacturer": {
	  "type": "string",
	  "value": "MMB Networks"
	},
	"Model_Number": {
	  "type": "string",
	  "value": "AMA01GW10"
	},
	"Kernel_Version": {
	  "type": "string"  
	},
	"RFS_Version": {
	  "type": "string"  
	},
	"MMB_Version": {
	  "type": "string"  
	},
	"ETH_MAC": {
	  "type": "string"  
	},
  }
}

...

Code Block
{  
    "$schema":"http://json-schema.org/draft-06/schema#",
    "title":"Gateway Configuration whitelist data structure",
    "description":"Whitelist to determine which files are to be written to disk when reading the /sys/configure endpoint data",
    "type":"object",
    "properties":{  
        "whitelist":{  
            "type":"array",
            "items":{  
                "type":"object",
                "properties":{  
                    "name":{  
                        "description":"The name of the file",
                        "type":"string"
                    },
                    "path":{  
                        "description":"The location the file should be placed (No trailing slash)",
                        "type":"string"
                    },
                    "type":{  
                        "description":"The type of the file",
                        "type":"string",
                        "enum":[  
                            "json",
                            "text"
                        ]
                    },
                    "user":{  
                        "description":"Which user should own the file (default: mmb)",
                        "type":"string"
                    },
                    "group":{  
                        "description":"Which group should own the file (default: mmb)",
                        "type":"string"
                    }
                },
                "required":[  
                    "name",
                    "path",
                    "type"
                ]
            }
        }
    },
    "required":[  
        "whitelist"
    ]
}


Input

Code Block
{  
    "$schema":"http://json-schema.org/draft-06/schema#",
    "title":"Gateway Configuration data structure to be written to disk",
    "description":"Passing Opaque data, along with a specific API version number for future use",
    "type":"object",
    "properties":{  
        "version":{  
            "type":"number"
        },
        "config_data":{  
            "type":"array",
            "items":{  
                "type":"object",
                "properties":{  
                    "name":{  
                        "type":"string"
                    },
                    "contents":{  
                        "type":[  
                            "string",
                            "object"
                        ]
                    }
                },
                "required":[  
                    "name",
                    "contents"
                ]
            }
        }
    },
    "required":[  
        "version",
        "config_data"
    ]
}

Output

Commissioning result

Client side

...

customizing and branding

The client side Javascript and CSS files are available on the Gateway in /opt/commissioning/gui/

...