User Tools

Site Tools


wiki:firmware:installation

This is an old revision of the document!


Wanesy SPN firmware installation

By default, Wanesy SPN firmware is not installed on Kerlink gateways. Wanesy SPN can be installed from these versions of KerOS:

Gateway model KerOS version
Wirnet iFemtoCell 3.1.14 and above
Wirnet iStation 4.1.6 and above
Wirnet iFemtoCell-evolution 4.2.1 and above

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

  1. Connect to the gateway using SSH
  2. Check the firmware version of the gateway
  3. If the firmware is not the expected one, upgrade it
  4. Upgrade firmware via SSH or via USB

Once Wanesy SPN firmware installed, gateway can be configured with web user interface (recommended) or other interfaces

SSH connection

Gateway has no default IP address. It is recommended to connect the gateway to a network using a DHCP server. Gateway IP address is needed to connect to it. (Contact your network administrator to get gateway IP address).

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

Where XXXXXX are the last 6 digits of board id.

For example, if a gateway has 704BEc03002E as board ID, root password is pdmk-03002E (case sensitive). Board ID can be retrieved on gateway case

KerOS firmware version check

Once connected to the gateway, use the command below to get your firmware version:

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

An output similar to the following will be displayed:

Gateway model KerOS version check
Wirnet iFemtoCell “sw_version”: “3.1.14_20171019161710”
Wirnet iStation “sw_version”: “4.1.6_20190829151113”
Wirnet iFemtoCell-evolution “sw_version”: “4.2.1_20191209105655”

If the firmware is not the expected one, upgrade it. (Refer to Wirnet Productline wiki. Contact support@kerlink.fr to get access if needed)

Wanesy SPN firmware installation

The firmware update can be done via SSH or USB

SSH

  1. Download the firmware from the resources page
  2. Create the directory /user/.updates (if it does not exist):
    mkdir /user/.updates

  3. Transfer 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 on next reboot:

    kerosd -u

  5. Restart:

    reboot

Upgrade process will take a few minutes and reboot the gateway multiple times. Web user interface will be up and running when the left LED will be lit in green

USB

Overview

  1. Download the firmware from 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: Wanesy SPN firmware package
  3. Plug USB key on the iFemtoCell. After a few seconds a led will start blinking from green to red
  4. Unplug USB key

Upgrade process will take a few minutes and reboot the gateway multiple times. Web user interface will be up and running when the left LED will be lit in green

Specific files

usbkey.txt

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

To update multiple boards, usbkey.txt file can include multiple passwords (100 maximum, 1 password per line).

Here is an example of this file for 4 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 Wanesy SPN firmware. Copy this script in a file named usb.autorun.

usb.autorun
#!/bin/sh
 
USBDIR="`dirname $0`"
 
SYSLEDPATH_4_0_IBTS="/sys/class/leds/yellow:debug"
SYSLEDPATH_4_0_IFEMTO="/sys/class/leds/led1:red:power"
SYSLEDPATH="/sys/class/leds/status"
 
led_path="/do/not/exist"
if [ -e "${SYSLEDPATH}" ]; then
	led_path="${SYSLEDPATH}"
elif [ -e "${SYSLEDPATH_4_0_IBTS}" ]; then
	led_path="${SYSLEDPATH_4_0_IBTS}"
elif [ -e "${SYSLEDPATH_4_0_IFEMTO}" ]; then
	led_path="${SYSLEDPATH_4_0_IFEMTO}"
fi
 
#
# Set default led behavior
# $1: trigger
#
#    if trigger = timer : $2 = delay_on, $3 = delay_off
#
set_led() {
	trigger="${1}"
	on="$2"
	off="$3"
 
	if [ -e "${led_path}" ]; then
		echo $trigger > "${led_path}/trigger"
		case "$trigger" in
			"timer")
				echo ${on:=500} > "${led_path}/delay_on"
				echo ${off:=500} > "${led_path}/delay_off"
				;;
			"none")
				echo ${on:=0} > "${led_path}/brightness"
				;;
			*)
				# Nothing to do
				;;
		esac
	fi
}
 
 
deploy_packages()
{
	mkdir -p /user/.updates
	for pkg in ${USBDIR}/*.ipk
	do
		cp ${pkg} /user/.updates/
	done
	sync
}
 
#
# Force the system to put the packages immediately in backup
#
force_backup()
{
	touch /user/.updates/force_backup
	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
#####################
 
# Set led On
set_led none 1
 
# Deploy packages
deploy_packages
 
# Trigger Update
trigger_update
 
# Optional: Force the system to put the packages immediately in backup
#force_backup
 
# Prepare reboot after USB unplug
cat > /tmp/usbkey_remove << EOF
# Switch off Led
echo "none" > ${led_path}/trigger
 
# Reboot Now to get Update
reboot
EOF
 
# All is right, make Led blinking fast to notify User
set_led "timer" 100 100

Wanesy SPN License installation

Once the Wanesy SPN firmware is running, the license file needs to be installed in order to configure and use the SPN software. The quick start page will guide you through these steps.

wiki/firmware/installation.1584110036.txt.gz · Last modified: 2020/03/13 15:33 by ghi