Prepare Your Device to Use the JavaScript Client Software Library

Ensure that the hardware and software prerequisites are met prior to installing the Oracle IoT Cloud Service Client Library Software for the JavaScript platform on your device. You need to configure your device with the supported operating system and the latest version of the required software.

  1. Make sure the hardware prerequisites are met before you install the JavaScript client software library on your device. For a list of supported platforms, see Oracle IoT Cloud Service Client Software Certified System Configurations.
  2. Install npm and Node.js.
  3. Download and install gradle.
  4. Run this command to install the debug module: npm install -g debug.
  5. Run this command to install the sqlite3 module: npm install -g sqlite3.
  6. Run this command to install the node-forge module: npm install -g node-forge.
  7. To optionally build documentation from sources, run this command: npm install -g jsdoc.
  8. Run this command to set the NODE_PATH environment variable: SET NODE_PATH “%C:\username\AppData\Roaming\npm\node_modules%”.
  9. Run this command to move to the node-forge directory: cd C:\Users\username\AppData\Roaming\npm\node_modules\node-forge.
    If you have trouble running the npm run bundle command in a Windows environment, run this command: node node_modules\requirejs\bin\r.js -o minify.js optimize=none out=js/forge.bundle.js
  10. Run this command to move to the js directory: cd C:\Users\username\Documents\iot\csl\js.
  11. Create a new folder named External.
  12. Copy the file forge.bundle.js from C:\Users\username\AppData\Roaming\npm\node_modules\node-forge\js to C:\Users\username\Documents\iot\csl\js\external directory.
  13. Copy the provisioning file that you downloaded in Set Up Your Development Environment to Use the JavaScript Client Software Libraries to the C:\Users\username\Documents\iot\csl\js\external directory.
  14. Open a text editor and the open the EnterpriseClient.html file located at this path: C:\Users\username\Documents\iot\csl\js\samples.
  15. Locate the iotcs.oracle.iot.tam.storePassword value and enter the password used to protect the provisioning file you downloaded when you registered the device.
  16. Locate the src value and make sure the value is "../modules/enterprise-library.web.js".
  17. Save and close the EnterpriseClient.html file.
  18. Continue with either Run the Sample JavaScript Directly Connected Device Applications or Run the Sample JavaScript Enterprise Applications.