Difference between revisions of "IoTGateway/WiseSnail Simulator"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
 
== Download source code and install required modules ==
 
== Download source code and install required modules ==
  
*Install nodejs: [https://nodejs.org/en/download/package-manager/ https://nodejs.org/en/download/package-manager/]
+
1. Install nodejs: [https://nodejs.org/en/download/package-manager/ https://nodejs.org/en/download/package-manager/]
*Checkout SVN source code: [https://172.20.2.44/svn/essrisc/IoT/source/Projects/WiseSnail_simulator https://172.20.2.44/svn/essrisc/IoT/source/Projects/WiseSnail_simulator]
+
 
*Enter the directroy '''WiseSnail_simulator''' and use '''npm''' tool to install '''mqtt''' and '''keypress''' modules.
+
2. Checkout SVN source code: [https://172.20.2.44/svn/essrisc/IoT/source/Projects/WiseSnail_simulator https://172.20.2.44/svn/essrisc/IoT/source/Projects/WiseSnail_simulator]
 +
 
 +
3. Enter the directroy '''WiseSnail_simulator''' and use '''npm''' tool to install '''mqtt''' and '''keypress''' modules.
 
<pre>$ cd  ./WiseSnail_simulator
 
<pre>$ cd  ./WiseSnail_simulator
 
$ npm install mqtt --save
 
$ npm install mqtt --save
Line 11: Line 13:
 
== Folder/File mapping introduction ==
 
== Folder/File mapping introduction ==
  
*In '''WiseSnail_simulator''' directory, you can find '''wisesnail'''
+
1. In '''WiseSnail_simulator''' directory, you can find '''wisesnail'''
*This '''Simulator''' read '''wisesnail''' directory to send WiseSnail packet to MQTT broker.
+
 
*Below is folder/file mapping introduction
+
2. This '''Simulator''' read '''wisesnail''' directory to send WiseSnail packet to MQTT broker.
[[File:20161011_nodejs_wisesnail_3.png]]
+
 
 +
3. Below is folder/file mapping introduction
 +
 
 +
[[File:20161011 nodejs wisesnail 3.png|RTENOTITLE]]
  
 
== How to test ==
 
== How to test ==
* add device by adding folder and files.(or you can use default folder wisesnail)
+
 
* modify MQTT broker address in mqtt_server.conf
+
1. add device by adding folder and files.(or you can use default folder wisesnail)
* Launch wisesnail, then check RMM server.
+
 
<pre>
+
2. modify MQTT broker address in mqtt_server.conf
$node wisesnail.js
+
 
 +
3. Launch wisesnail, then check RMM server.
 +
 
 +
<pre>$node wisesnail.js
 
</pre>
 
</pre>
*Ctrl+C to disconnect device from RMM server
+
 
 +
4. Ctrl+C to disconnect device from RMM server

Revision as of 11:44, 11 October 2016

Download source code and install required modules

1. Install nodejs: https://nodejs.org/en/download/package-manager/

2. Checkout SVN source code: https://172.20.2.44/svn/essrisc/IoT/source/Projects/WiseSnail_simulator

3. Enter the directroy WiseSnail_simulator and use npm tool to install mqtt and keypress modules.

$ cd  ./WiseSnail_simulator
$ npm install mqtt --save
$ npm install keypress -- save

Folder/File mapping introduction

1. In WiseSnail_simulator directory, you can find wisesnail

2. This Simulator read wisesnail directory to send WiseSnail packet to MQTT broker.

3. Below is folder/file mapping introduction

RTENOTITLE

How to test

1. add device by adding folder and files.(or you can use default folder wisesnail)

2. modify MQTT broker address in mqtt_server.conf

3. Launch wisesnail, then check RMM server.

$node wisesnail.js

4. Ctrl+C to disconnect device from RMM server