diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java
index 154c9cd207..ed4cd590a7 100644
--- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java
+++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.controller.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java
@@ -14,10 +14,6 @@ import java.io.File;
import java.util.UUID;
import java.util.concurrent.ScheduledFuture;
-//import org.wso2.carbon.device.mgt.iot.digitaldisplay.api.transport.CommunicationHandlerException;
-//import org.wso2.carbon.device.mgt.iot.digitaldisplay.api.transport.MQTTCommunicationHandler;
-
-
public class DigitalDisplayMqttCommunicationHandler extends MQTTTransportHandler {
private static Log log = LogFactory.getLog(DigitalDisplayMqttCommunicationHandler.class);
diff --git a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java
index 5c39364b0e..f7b3ec854b 100644
--- a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java
+++ b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java
@@ -76,7 +76,6 @@ public class DroneRealTimeService {
log.error(ex.getMessage() + "\n" + ex);
} catch (InterruptedException e) {
log.error(e.getMessage(), e);
- System.out.println(e.getMessage()+" "+ e);
}
}
@@ -89,7 +88,6 @@ public class DroneRealTimeService {
}
catch (Exception e) {
log.error(e.getMessage() + "\n" + e);
- System.out.println(e.getMessage()+"\n"+ e);
}
log.info("Session " + session.getId() + " has ended");
}
diff --git a/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h b/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h
index 482c410599..d55466d901 100644
--- a/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h
+++ b/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h
@@ -47,13 +47,15 @@
#define DEBUG true
#define CON_DEBUG true
-byte server[4] = {192,168,43,168}; //Ip address of iot server
#define SERVICE_PORT 9763 //http port of iot server
+byte server[4] = {192,168,43,168}; //Ip address of iot server
+byte deviceIP[4] = { 192, 168, 43,11 }; //Ststic ip address of arduino
+
byte dns2[] = { 8, 8, 8, 8 }; //Ststic dns of arduino
byte subnet[] = { 255, 255, 255, 0 }; //Ststic subnet of arduino
byte gateway[] = { 192, 168, 43, 1 }; //Ststic gateway of arduino
-byte deviceIP[4] = { 192, 168, 43,11 }; //Ststic ip address of arduino
+
String host, jsonPayLoad, replyMsg;
String responseMsg, subStrn;
diff --git a/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.hbs b/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.hbs
index 0c04c1ed23..99d85ae112 100644
--- a/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.hbs
+++ b/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.hbs
@@ -158,11 +158,12 @@
the [Download] link above.
02 Unzip the downloaded
- Arduino-Sketch and open the "ArduinoBoardSketch.h"
- file.
+ Arduino Agent and create folder named ArduinoBoardSketch and
+ move all the source files into ArduinoBoardSketch it.
- 03 Provide appropriate values for
- [WLAN_SSID] and [WLAN_PASS] variables according to your network.
+ 03 Open ArduinoBoardSketch.h and
+ Provide appropriate values for
+ [WLAN_SSID],[WLAN_PASS],[SERVICE_PORT],[server] and [deviceIP] variables according to your network.
04 Burn the sketch onto your Arduino
board and let the program run.
diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/DigitalDisplay.zip b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/DigitalDisplay.zip
new file mode 100644
index 0000000000..6444fed552
Binary files /dev/null and b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/DigitalDisplay.zip differ
diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/ReadMe.md b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/ReadMe.md
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/installPackages b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/installPackages
new file mode 100755
index 0000000000..e28e5cfac3
--- /dev/null
+++ b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/installPackages
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+for P in paho-mqtt lxml; do
+ dpkg -s "$P" >/dev/null 2>&1 && {
+ echo "$P is installed."
+ } || {
+ sudo pip install paho-mqtt
+ sudo apt-get install python-lxml
+ }
+done
+
+
+
+
+
diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/start-device.sh b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/start-device.sh
deleted file mode 100755
index e9dd87c48c..0000000000
--- a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/agent/start-device.sh
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/bin/bash
-
-echo "----------------------------------------------------------------"
-echo "| WSO2 IOT Sample "
-echo "| Virtual RaspiAlarm "
-echo "| ---------------- "
-echo "| ....initializing startup-script "
-echo "----------------------------------------------------------------"
-
-#while true; do
-# read -p "What is the network-interface of your device that the Agent should use (find from ifconfig. ex: wlan0,en0,eth0..) > " interface
-#
-# echo "Setting the network-interface to " $interface
-# sed s/^network-interface=.*/network-interface=$interface/ deviceConfig.properties > myTmp
-# mv -f myTmp deviceConfig.properties
-# break;
-#done
-#
-#while true; do
-# read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-IoT-Server (ex: '60' indicates 1 minute) > " interval
-#
-# if [ $interval -eq $interval 2>/dev/null ]
-# then
-# echo "Setting data-push interval to " $interval " seconds."
-# sed s/^push-interval=.*/push-interval=$interval/ deviceConfig.properties > myTmp
-# mv -f myTmp deviceConfig.properties
-# break;
-# else
-# echo "Input needs to be an integer indicating the number seconds between successive data-pushes."
-# fi
-#done
-
-
-#java -jar wso2-firealarm-virtual-agent-advanced.jar
-
-#while true; do
-# read -p "Do you wish to run 'apt-get update' and continue? [Yes/No] " yn
-# case $yn in
-# [Yy]* ) sudo apt-get update;
-# break;;
-# [Nn]* ) echo "Continuing without apt-get update...";
-# break;;
-# * ) echo "Please answer yes or no.";
-# esac
-#done
-#
-#if [ $? -ne 0 ]; then
-# echo "apt-get update failed.... Some dependencies may not get installed"
-# echo "If an already installed version of the package exists, try running:"
-# echo "----------------------------------------------------------------"
-# echo "sudo -i"
-# echo "cd /var/lib/dpkg/info"
-# echo "rm -rf wso2-raspi-alarm*"
-# echo "dpkg --remove --force-remove-reinstreq wso2-raspi-alarm"
-# echo "exit"
-# echo "----------------------------------------------------------------"
-# echo "Retry Installation...."
-# break;
-#fi
-#
-#echo "Installing 'gdebi' package..."
-#sudo apt-get install gdebi # installation of gdebi
-#
-#
-#if [ $? -ne 0 ]; then
-# echo "gdebi installation failed.... dependencies will not be installed without gdebi"
-# read -p "Do you wish to continue without gdebi? [Yes/No] " yn
-# case $yn in
-# [Yy]* ) echo "Continueing without gdebi.....";;
-# [Nn]* ) echo "Try to resolve errors and re-run the script.";
-# exit;;
-# * ) exit;;
-# esac
-#fi
-#
-#
-#for f in ./wso2-raspi-alarm_1.0_armhf.deb; do
-# ## Check if the glob gets expanded to existing files.
-# ## If not, f here will be exactly the pattern above
-# ## and the exists test will evaluate to false.
-# # [ -e "$f" ] && echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing" || echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path"; exit;
-# if [ -e "$f" ]; then
-# echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing now...."
-# else
-# echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path. \nExiting installation...";
-# exit;
-# fi
-# ## This is all we needed to know, so we can break after the first iteration
-# break
-#done
-#
-#echo "Installing the 'wso2-raspi-alarm deb package'"
-#sudo gdebi wso2-raspi-alarm_1.0_armhf.deb
-#
-#if [ $? -ne 0 ]; then
-# echo "Installation Failed...."
-# exit;
-#fi
-
-#sudo killall -9 python
-#
-#for f in ./RaspberryAgent.zip; do
-# ## Check if the glob gets expanded to existing files.
-# ## If not, f here will be exactly the pattern above
-# ## and the exists test will evaluate to false.
-# # [ -e "$f" ] && echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing" || echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path"; exit;
-# if [ -e "$f" ]; then
-# echo "Agent files found......"
-# sudo rm -rf /usr/local/src/RaspberryAgent
-# sudo unzip RaspberryAgent.zip -d /usr/local/src/
-# else
-# echo "'RaspberryAgent.zip' file does not exist in current path. \nInstalling without upgrading agent...";
-# fi
-# ## This is all we needed to know, so we can break after the first iteration
-# break
-#done
-#
-#for f in /usr/local/src/RaspberryAgent/rc.local; do
-# ## Check if the glob gets expanded to existing files.
-# ## If not, f here will be exactly the pattern above
-# ## and the exists test will evaluate to false.
-# if [ -e "$f" ]; then
-# echo "Copying boot script"
-# sudo mv /usr/local/src/RaspberryAgent/rc.local /etc/rc.local
-# sudo chmod +x /etc/rc.local
-# else
-# echo "Unable to set agent statup on boot";
-# fi
-# ## This is all we needed to know, so we can break after the first iteration
-# break
-#done
-#
-#for f in ./deviceConfigs.cfg; do
-# ## Check if the glob gets expanded to existing files.
-# ## If not, f here will be exactly the pattern above
-# ## and the exists test will evaluate to false.
-# if [ -e "$f" ]; then
-# echo "Configuration file found......"
-# else
-# echo "'deviceConfigs.cfg' file does not exist in current path. \nExiting installation...";
-# exit;
-# fi
-# ## This is all we needed to know, so we can break after the first iteration
-# break
-#done
-#
-#echo "Altering Configuration file"
-#sed -i 's|[/,]||g' deviceConfigs.cfg
-#
-#echo "Copying configurations file to /usr/local/src/RaspberryAgent"
-#sudo cp ./deviceConfigs.cfg /usr/local/src/RaspberryAgent/
-#
-#if [ $? -ne 0 ]; then
-# echo "Copying configuration file failed...."
-# exit;
-#fi
-#
-#while true; do
-# read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-DC (ex: '60' indicates 1 minute) > " input
-#
-# if [ $input -eq $input 2>/dev/null ]
-# then
-# echo "Setting data-push interval to $input seconds."
-# echo $input > /usr/local/src/RaspberryAgent/time-interval
-# break;
-# else
-# echo "Input needs to be an integer indicating the number seconds between successive data-pushes."
-# fi
-#done
-#
-#cd /usr/local/src/RaspberryAgent/
-#sudo chmod +x RaspberryStats.py
-#sudo nohup ./RaspberryStats.py -i $input
- 01 Connect a monitor to your
- RaspberryPi via the HDMI cable to get the
- Graphical-User-Interface of the RaspberryPi board.
+ RaspberryPi via the HDMI cable to get the
+ Graphical-User-Interface of the RaspberryPi board.
- 02 Setup the RaspberryPi to connect
- to the internet (via Ethernet or Wifi) and
- note-down its IP_ADDRESS.
+ to the internet (via Ethernet or Wifi) and
+ note-down its IP_ADDRESS.
+
+ - 03 Go ahead and [Download] the
+ Device.
+
+ - 04 Unzip downloaded agent.
+
+ - 05 Start Agent by running wso2Agent.sh
diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs
index c283f6d717..e7ec81c41f 100644
--- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs
+++ b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs
@@ -22,6 +22,9 @@
ITEM 03 An LED Bulb.
+ ITEM 04 A Resister (eg
+ : 470 ohm).
+
GO-TO PREPARE
diff --git a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
index 1d495cc70c..d3ce519108 100644
--- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
+++ b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
@@ -23,7 +23,7 @@
STEP 03 Read the [Try Out] section
to further experiment with the device.
-
+
The device supports MQTT and XMPP Communications. It is configured to use MQTT by default.