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 software version 3.0.0. Therefore, to install the SPN the following steps are required:

  • Connect to the station using SSH.
  • Check the firmware version of the iFemtoCell.
  • 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

iFemtocell has no default IP adress, 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 an iFemtoCell 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:

"sw_version": "3.1.3_20170412141132"

SPN can only be installed on firmware 3.0.0 and upper. 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

Over Network

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

  3. Transfer the keros_x.x.x-spn_klk-wifc.ipk package previously downloaded in this directory:

    # From a computer:
    scp liveburner_x.x.x-spn_klk-wifc.ipk root@<ip_address>:/user/.updates/

  4. Ensure file is correctly written:

    sync 

  5. Trigger Update for next reboot:

    kerosd -u 

  6. 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 last 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.x.x-spn_klk-wifc.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_IBTS="/sys/class/leds/yellow:debug/"
SYSLEDPATH_IFEMTO="/sys/class/leds/led1:red:power/"
 
HW_IBTS="0x2e"
HW_IFEMTO="0x39"
 
#
# Check platform we are running on
#
get_platform() {
	if [ "$(cat /sys/fsl_otp/HW_OCOTP_GP1 | grep ${HW_IBTS})" != "" ]; then
                platform="IBTS"
	elif [ "$(cat /sys/fsl_otp/HW_OCOTP_GP1 | grep ${HW_IFEMTO})" != "" ]; then
		platform="IFEMTO"
	else
		echo "Hardware platform not supported with code : $(cat /sys/fsl_otp/HW_OCOTP_GP1)"
		platform="NOT_SUPPORTED"
	fi
	echo ${platform}
}
 
 
#
# 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
#####################
 
platform=$(get_platform)
 
if [ ${platform} == "IBTS" ]; then
	SYSLEDPATH=${SYSLEDPATH_IBTS}
elif [ ${platform} == "IFEMTO" ]; then
	SYSLEDPATH=${SYSLEDPATH_IFEMTO}
fi
 
# 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.1512118546.txt.gz · Last modified: 2020/02/21 11:53 (external edit)