User Tools

Site Tools


wiki:spn_installation

This is an old revision of the document!


SPN installation

By default, the SPN firmware is not installed. SPN can only be installed from Wirnet iFemtocell version 3.1.14, Wirnet iFemtocell Evo and Wirnet iStation firmwares version 4.2.2.

Therefore, to install the SPN the following steps are required:

  • Connect to the station using SSH.
  • Check the firmware version of the gateway.
  • If the firmware is not the right one, upgrade it.
  • Update the firmware either via SSH or via USB.

After SPN installation:

  • SSH accesses will be disabled by the SPN firmware.
  • SPN will be configurable through its web interface and the other services.

SSH Connection

Gateway has no default IP address, the gateway needs to be connected to a network using a DHCP server. To access the gateway, you first need to retrieve its IP address. Contact your network administrator, he/she will be able to find it.

  1. Start an ssh client (for example: TeraTerm or Putty on Windows).
  2. Connect to the station with the following configuration:
    • address : IP of your gateway
    • port: 22
    • login: root
    • password: pdmk-$serialno

The password is built using the last 6 characters of the board ID. For example, if a gateway has 704BEc03002E as board ID, then the root password will be pdmk-03002E (case sensitive).

Firmware version check

Once connected to the station, use the command hereunder to get your firmware version

cat /tmp/sys_startup_status.json | grep "sw_version"

An output similar to the following will be displayed:

For iFemtocell:

"sw_version": "3.1.14_20171019161710"

For iFemtocell Evo and iStation:

"sw_version": "4.2.2_20200128094335"

If the firmware is not the right one, upgrade it. To do so, refer to the iFemtoCell wiki (if you cannot access it, contact support@kerlink.fr)

SPN Firmware installation

The firmware update can be done either over network or over USB

Licences can be opened with a text editor:

  • Licenses look like that:
-----BEGIN SIGNATURE-----
q3JqyX09evkx8B3hrdS+5tEgOoViHR+zqn2fgcFwXZQmdps0D6wcMKUlWyKftUW2
QgBXl2JgtfNKrYRQbgw7SPbmjrwPBIcVxrzlaqjIKLNc8DIDZ504ctwuakffgb45
+XWiWA9X8q0jTcuG7KWkDyHSQHbMlGAX599mIKXx35/6hlkESKV1WU9ujHTZqBN3
6uVm8UQJh8lJi1nU9SNuCydthYbwqPApkOT9ueoAcGg+zSJFXxeVnwGBnR0g1TSr
mb2Y/Iu1C6oHECrqOh7w0ZZV8ZxSylkIjZaLJ72nqMkHMLxfw0Rcl80FrdcoRCFU
xmqKfWh95tinNCB/K7oCDA==
-----END SIGNATURE-----
-----BEGIN LICENSE-----
[license]
hardware_serial_number = 3901010E
expiration_date = -1
gateways_max_number = 1
end_devices_max_number = -1
-----END LICENSE-----

Over Network

  1. Download the firmware from the resources page
  2. Create the directory .updates under /user :
    mkdir /user/.updates

  3. Transfer the liveburner_x.y.z-spn_klkgw-signed.ipk package previously downloaded in this directory:

    # From a computer:
    scp liveburner_x.y.z-spn_klkgw-signed.ipk root@<ip_address>:/user/.updates/

  4. Trigger Update for next reboot:

    kerosd -u 

  5. Restart :

    reboot

The upgrade process will take a few minutes and will reboot the gateway multiple times (SSH access will be lost). The web interface will be up and running when the left LED will be lit in green. If SSH access is still available, then the installation failed.

Over USB

Overview

  1. Download the firmware from the resources page.
  2. Prepare a USB key with the following files (see next section to get the files):
    • usb.autorun: Auto executable script
    • usbkey.txt: USB password file
    • liveburner_x.y.z-spn_klkgw-signed.ipk: the SPN installation package
  3. Plug the USB key on the iFemtoCell. After a few seconds a led will start blinking from green to red.
  4. Unplug the USB key.The upgrade process will take a few minutes and will reboot the gateway multiple times (SSH access will be lost). The web interface will be up and running when the left LED will be lit in green. If SSH access is still available, then the installation failed.

Specific files

usbkey.txt

usbkey.txt is a security file. It includes the password of “usbuser” user.
Default “usbuser” password is USBklkPassword

In case of consecutive updates on multiple boards, usbkey.txt file can include multiple passwords (100 maximum)(One password per line).

Here is an example of this file for 4 different boards ( 010001 / 020056 / 040001 / 092356):
First board has a generic password and 3 others have a “serial-based” modified password (“<serial>_usbkey”)

usbkey.txt
USBklkPassword
# Support for modified passwords
020056_usbkey
040001_usbkey
092356_usbkey
usb.autorun

usb.autorun is a script automatically executed by the board if the usbkey.txt file includes a correct password. The following script is used to deploy the SPN firmware. Copy this script in a file named usb.autorun.

usb.autorun
#!/bin/sh
 
USBDIR="`dirname $0`"
 
SYSLEDPATH_IFEMTO="/sys/class/leds/led1:red:power/"
#
# Set default led behavior
# $1: trigger
#
#    if trigger = timer : $2 = delay_on, $3 = delay_off
#
set_led() {
	trigger="${1}"
	on="$2"
	off="$3"
 
	if [ -d "${SYSLEDPATH}" ]; then
		echo $trigger > "${SYSLEDPATH}/trigger"
		case "$trigger" in
			"timer")
				echo ${on:=500} > "${SYSLEDPATH}/delay_on"
				echo ${off:=500} > "${SYSLEDPATH}/delay_off"
				;;
			"none")
				echo ${on:=0} > "${SYSLEDPATH}/brightness"
				;;
			*)
				# Nothing to do
				;;
		esac
	fi
}
 
 
deploy_packages()
{
	mkdir -p /user/.updates
	for pkg in ${USBDIR}/*.ipk
	do
		cp ${pkg} /user/.updates/
	done
	sync
}
 
#
# Trigger update and reboot in $1 minutes (or 'now')
#
trigger_update()
{
	REBOOT_TIMEOUT=$1
 
	kerosd -u
	[ ${REBOOT_TIMEOUT:=0} -ne 0 ] && shutdown -r ${REBOOT_TIMEOUT}
}
 
 
#####################
#     MAIN
#####################
SYSLEDPATH=${SYSLEDPATH_IFEMTO}
 
# Set led On
set_led none 1
 
# Deploy packages
deploy_packages
 
# Trigger Update
trigger_update
 
# Prepare reboot after USB unplug
cat > /tmp/usbkey_remove << EOF
 
# Switch off Led
echo "none" > ${SYSLEDPATH}/trigger
 
# Reboot Now to get Update
reboot
EOF
 
# All is right, make Led blinking fast to notify User
set_led timer 100 100

SPN License installation

Once the SPN firmware is running, the license file need to be installed in order to configure and use the SPN software. The Quick Start page will guide you through these steps.

wiki/spn_installation.1582301306.txt.gz · Last modified: 2020/02/21 17:08 by ghi