Difference between revisions of "How to install & execute"

From AMTech WikiDocs
Jump to: navigation, search
(Os and core components)
Line 1: Line 1:
 
== Os and core components ==
 
== Os and core components ==
 
=== Manual installation of M2MBridge script ===
 
=== Manual installation of M2MBridge script ===
** Installs Ubuntu OS
+
* Installs Ubuntu OS
** Install nodejs 5.x by adding this repository 'deb https://deb.nodesource.com/node_5.x xenial main' with:
+
* Install nodejs 5.x by adding this repository 'deb https://deb.nodesource.com/node_5.x xenial main' with:
*: <code>curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -</code>
+
: <code>curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -</code>
*: and then:
+
: and then:
*: <code>sudo apt-get install -y nodejs</code>
+
: <code>sudo apt-get install -y nodejs</code>
** Allow nodejs program to bind to ports under 1024
+
* Allow nodejs program to bind to ports under 1024
*: <code>sudo setcap 'cap_net_bind_service=+ep' /usr/bin/nodejs</code>
+
: <code>sudo setcap 'cap_net_bind_service=+ep' /usr/bin/nodejs</code>
** Installs and configures Bluetooth core libraries
+
* Installs and configures Bluetooth core libraries
*: <code>sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev</code>
+
: <code>sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev</code>
  
 
=== M2MBridge installation ===
 
=== M2MBridge installation ===
*Clone git repository (https://github.com/AMTechMX/M2MBridge.git)
+
* Clone git repository (https://github.com/AMTechMX/M2MBridge.git)
*Delete at /.../M2MBridge/plugins/xxx unneeded plug-ins (optional)
+
* Delete at /.../M2MBridge/plugins/xxx unneeded plug-ins (optional)
*Install packages for m2mBridge core and plug-ins (https://docs.npmjs.com/cli/install:)
+
* Install packages for m2mBridge core and plug-ins (https://docs.npmjs.com/cli/install:)
*Execute npm install --save at:
+
* Execute npm install --save at:
**M2MBridge directory
+
** M2MBridge directory
**each plug-in directory
+
** Each plug-in directory
  
 
=== M2MBridge execution ===
 
=== M2MBridge execution ===
 
* Customize the bridge configuration [[Edge_Configuration|bridgeConfig,json]], defining the templateId with the bridge instance from DAP to clone [[Cloud Configuration]]
 
* Customize the bridge configuration [[Edge_Configuration|bridgeConfig,json]], defining the templateId with the bridge instance from DAP to clone [[Cloud Configuration]]
 
* Execute node m2mbridge.js (located in the M2MBridge directory)
 
* Execute node m2mbridge.js (located in the M2MBridge directory)

Revision as of 14:03, 6 May 2016

Os and core components

Manual installation of M2MBridge script

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
and then:
sudo apt-get install -y nodejs
  • Allow nodejs program to bind to ports under 1024
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/nodejs
  • Installs and configures Bluetooth core libraries
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

M2MBridge installation

M2MBridge execution

  • Customize the bridge configuration bridgeConfig,json, defining the templateId with the bridge instance from DAP to clone Cloud Configuration
  • Execute node m2mbridge.js (located in the M2MBridge directory)