Edge Configuration
For details on Edge see Edge M2MBridge Configuration can be achieved in 2 ways
Contents
Editing bridgeConfig.json
It is located at /opt/M2MBridge directory.
Configuration is based on cloning. Referencing an M2MBridge instance as a template; its configuration will be cloned. The objective is to have a single configuration that can then be used to create and maintain multiples deployments. The template is described through a template id and prefix. Other configuration options are described below:
- description Text to be assigned to M2MBridges description property. Type: string.
- description:children If the description property will be assigned to M2MBridge's linked things. Type: boolean.
- dap DAP connection options. Type: JSON, having:
- dapUrl AMTech IoT DAP URL. Type: string, valid URL
- userId Bridge instance user ID. Type: string.
- tenant Bridge tenant. Type: string.
- password Bridge password. Type: string.
- Note: You should use an invited follower in the authentication. See remarks in this section
- templateId Bridge instance ID to be cloned. Type: string, valid bridge name.
- bridgeIdPrefix Prefix to add to the unique M2MBridge identifier, the MAC address of the device is used as unique ID. In the absence of a prefix, just the MAC address is used as identifier. Type: string.
- location WKT location to set to the M2MBridge location. Overrides address if also present. Type: stringified version of JSON representing the WKT.
- location:children Express if the location property will be assigned to M2MBridge's linked things. Type: boolean.
- address Address to be used to guess M2MBridge location. Type: JSON.
- digiMesh DIGI Mesh options. Type: JSON, having:
- availability To indicate if a DIGI mesh network should be made available. Type: enum. Possible values: none, plain, encrypted
- nodeType To indicate if this is a master or a node. Type: enum. Possible values: master, node
- portID Path to port ID. Example:
/dev/ttyUSB0
. Type: string - networkID Network ID of DIGI Mesh Net that should be shared among all the nodes in one mesh network. Type: string representing an hexadecimal value between 0x0000 and 0x7FFF
- encryptionKey If encryption is available this should contain a string of 32 hexadecimal characters. Type: string
bridgeConfig.json example
{
"description": "AMTech M2M Bridge",
"description:children" : true,
"dap":{
"dapUrl": "https://dap.amtech.mx",
"userId": "xxxxxxx@amtech.mx",
"tenant" : "xxxxxxx",
"password" :"xxxxxxxx"
},
"templateId":"m2mCreator:m2mBridge",
"bridgeIdPrefix":"tienda1",
"location": "{\"wkt\":\"POINT(-99.17125583 19.40501031)\",\"sContext\":\"geo\"}",
"location:children" : true,
"address" :{
"country" : "usa",
"city": "Las Vegas",
"road": "Las Vegas Boulevard South",
"number":"3960"
},
"digiMesh": {
"networkID": "0x2017",
"portID": "/dev/ttyUSB0",
"nodeType": "node",
"availability": "plain",
"encryptionKey": "1234567890abcdef1234567890abcdef"
}
}
Using the M2MBridge Web Configurator
You can reach the interface through the URL http://<address of your pi>/ to start configuring the PI.
The image provided for the Raspberry PI comes with the following default configuration:
- The wired interface is configured to acquire an IP address through DHCP. So you can connect it to a wired network where there is a DHCP present and try to guess the assigned IP. For instance, by inspecting the leases of the DHCP service.
- The wireless interface is configured as an AP with SSID
amtech-pi
. You can connect your computer to this wireless network by using the passphrasefreepass
and then use the address 192.168.0.1 to connect to the PI.
Home
Bridge Configuration
Service Management
In this window there are several actions that operate on the M2MBridge daemon service. They allow you to start, stop or restart the server.
The last lines from the M2MBridge daemon log will be shown in the editor below the actions.
Wireless Network Configuration
Throw this wizard you can configure the WIFI interface of the raspberry PI where the M2MBridge is running. You will be able to set the usual configuration options for a wireless network.
Ethernet Network Configuration
This section allows you to configure the wired ethernet interface of the Raspberry PI where the M2MBridge is running. You will be able to set the usual options for a network interface.
Configuration validation
- At startup time the M2MBridge validates its configuration with the cloud. If there is an error, the application aborts
- To simplify the process of validation configuration there is an option to validate the configuration for a M2MBridge instance (See here)