ESF Default Configuration

PART 4. Supplementary Documentation
ESF Installation Instructions

 

Overview

ESF v2 Installation

·         Using ESF with Raspberry Pi

·         Obtain ESF software

·         Install ESF

·         Install Java

Run ESF v2

·         ESF Services and Log Files

·         OSGi Console

·         View ESF Web Configuration

 

Overview

This section describes the procedures for installing ESF v2 software on the various supported hardware platforms. 

ESF v2 Installation

Installation instructions will vary slightly depending on what hardware platform you are using.  See ESF Default Configuration for a list of supported hardware platforms and configuration defaults for ESF v2.

 

Using ESF with Raspberry Pi

This section only applies if you are using the Raspberry Pi hardware platform.

 

To use ESF on the Raspberry Pi, you must run the Raspbian operating system.  Download the latest version of Raspbian and install according to their instructions.

 

You must also install a number of packages which are dependencies of ESF.

 

·         hostapd - Services for access point management.

·         bind9 - Services for DNS management.

·         isc-dhcp-server - Set of tools for managing a DHCP server.

·         iw - Set of wireless tools.

·         monit - System monitoring service.

·         dos2unix - Tool for converting files written in Windows to Linux format.

·         telnet - user interface to the TELNET protocol.

 

Each of these packages is available in the Raspbian repository and can be installed via the apt-get program:

 

sudo apt-get install <package_name>

 

Obtain ESF software

To obtain the latest ESF v2 release, visit http://esf.eurotech.com to fill out a free registration form.  After registering, you will receive a confirmation e-mail with login credentials and information on how to download the ESF software.

 

ESF is distributed for supported devices as an archive file of the format:

 

esf-[target device]_[version]_dp_installer.sh

            or

esf-[target device]_[version]-SNAPSHOT.deb

 

where [target device] is the supported device and [version] is the release, such as

 

esf-reliagate-wrl-4.3_2.0.0_dp_installer.sh

            or

esf-raspberry-pi_2.0.0-SNAPSHOT.deb

 

Install ESF

Connect to the target device using SCP or SFTP using an application such as WinSCP, and transfer the ESF archive file to the /tmp/ directory.

 

Next, install ESF v2 using a command similar to the following, depending on the distribution file name:

 

sh /tmp/esf-reliagate-wrl-4.3_2.0.0_dp_installer.sh

            or

sh /tmp/esf-mini-gateway_2.0.0_dp_installer.sh

 

For the Raspberry Pi, use the Debian package installer instead, such as:

 

sudo dpkg -i esf-raspberry-pi_2.0.0-SNAPSHOT.deb

 

Install Java

ESF requires an Oracle JVM to be installed.  To check the Java version currently installed, use the following command:

 

/opt/jvm/bin/java -version

            or

/usr/java/bin/java -version

 

·         If you have Java version 1.7 – you can now use ESF.

·         If you have Java version 1.6 – although ESF will run on version 1.6, it is recommended to uninstall Java JVM version 6 and install version 7.

·         If Java is not present – install Java JVM version 7.

 

To install the JVM, download the latest version of Java SE Embedded version 7 from the following link. 

 

http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html

 

Choose the latest download file based on the hardware platform that you are using.

 

·         For x86  systems such as ReliaGATE, DynaCOR, etc.:

                        use “x86 Linux Small Footprint – Headless” version”

·         For ARM-based systems such as Mini-Gateway, Raspberry Pi, etc.:

                        use “ARMv6/7 Linux - Headless - Client Compiler EABI, VFP, HardFP ABI, Little Endian”

 

            Transfer the JVM file to the /tmp/ directory of the gateway and install it with the following commands:

 

mkdir -p /opt/java

cd /tmp

 

tar xzvf ejre-7u45-fcs-b15-linux-i586-headless-26_sep_2013.tar.gz

            (use the actual .tar.gz filename for the Oracle JVM install that you downloaded)

            This will create a directory in /tmp/ depending on the JVM version, such as “ejre1.7.0_45”.

 

sudo mv ejre1.7.0_45 /opt/java

            (use the actual JVM directory name in place of “ejre1.7.0_21”)

 

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/ejre1.7.0_45/bin/java" 1

 

sudo update-alternatives --set java /opt/java/ejre1.7.0_45/bin/java

 


Run ESF v2

To run ESF v2, simply power cycle the gateway or issue the reboot command.

 

IMPORTANT: Upon first installation, ESF v2 changes the device’s network IP addresses to the settings defined in ESF Default Configuration.  If you don’t have a local VGA/keyboard display connected to the device, set up your local networking to connect to one of the other default interface configurations so you can continue working with the administrative console.

 

ESF Services and Log Files

To view the contents of the ESF log file, use one of the commands below:

 

more /var/log/esf.log (view log file from the beginning)

tail -f /var/log/esf.log      (monitor log file continuously – press Ctrl-c to break)

 

To stop the ESF software, use the following commands:

 

service monit stop

service esf stop

 

To start ESF again after stopping ‘monit’, use the following command:

 

service monit start

 

To restart the ESF software, you can either use the three previous stop/start commands, or use the following command:

 

service esf restart

 

To clear the existing OSGi log file before restarting ESF, use the following command:

 

rm /var/log/esf.log

 

OSGi Console

To control ESF through OSGi, connect to the OSGi console by issuing the following command on the target device:

 

telnet localhost 5002

 

While in the OSGi console, there are many commands available for managing bundles.  The following are a few useful commands:

 

help

Shows help menu of OSGi commands.

getesfloglevel [logger_name]

Shows the ESF log level for all loggers, or for a specific logger if specified.

setesfloglevel (ALL | <logger_name>)  <log_level>

Sets the ESF log level for a given logger, or all loggers ('ALL' is default).  The valid log_level options are: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF.

lb

Lists all installed bundles and IDs.

ss

Lists all installed bundles (short status)

h (list of bundle IDs)

Print bundle headers.

dpa install <package URL>

dpa uninstall <package name>

Install or uninstall deployment packages.

dpa list

dpa list <package ID>

List all deployment packages.

List all bundles belonging to <package ID>.

exit

Exit the OSGi console and stop ESF.

disconnect

Exit the OSGi console, but leave ESF running.

 

View ESF Web Configuration

To view the system configuration page for ESF, open a Web browser and point it to the IP address of the gateway, such as:

 

http://172.16.0.1

 

The username and password are “admin”.  Click on Network to view the network configuration settings, and select one of the available interfaces under Interface Name.  Change any settings that need to be modified, and click the Apply button.  Settings take effect immediately, so be aware that if you are changing network settings of the interface that you are connected on, you may lose your connection.