Setups
General information
Wirnet™ iBTS information
Wirnet™ iFemtoCell information
Wirnet™ iFemtoCell-evolution information
Wirnet™ iStation information
System management
Network management
LoRa Features
KerOS customization
Support and resources
Setups
General information
Wirnet™ iBTS information
Wirnet™ iFemtoCell information
Wirnet™ iFemtoCell-evolution information
Wirnet™ iStation information
System management
Network management
LoRa Features
KerOS customization
Support and resources
This is an old revision of the document!
When configuring the gateway or when something unusual happens, most of the time, to understand the behaviour of the gateway it is advised to consult the logs. Here is the list of the most useful logs:
/var/log/messages*: These files are the main logs, they gather the traces of the firmware. They contain the boot traces, the network events, the hardware events, and many other traces./var/log/lora.log*: Theses files contains the traces of the common packet forwarder (lorad and lorafwd). If you encounter LoRa issues, this is a good way to start. The verbosity of this log can be increased/decreased. Refer to the log managment section./tmp/board_info.json: This file contains information about the hardware of the gateway. It is generated at each boot time./tmp/calib_loraloc.json (for Wirnet iBTS): This file contains the calibration values specific to this gateway. It is generated at boot time./tmp/calib_rf.json (for Wirnet iFemtoCell): This file contains the calibration values specific to this gateway. It is generated at boot time./dev/nmea* (Wirnet iBTS only): These devices receive nmea frames (GPS) every seconds. It can be monitored with the cat command. Since Kerlink gateways use a Unix system, most current commands are available (ifconfig, route, ps, iptables, …).
KerOS specific commands:
gsmdiag.py: generates a status of the modem.connmanctl: used to configure/monitor the network manager.opkg list-installed: lists the installed packages.monit status: displays the status of the monitored processes.
The bootcount value is counting the number of reboots since the last power cycle.
At each power loss the counter is reset to 0. The maximum value of this counter is 65535.
The bootcount value can be checked in the file /tmp/board_info.json:
# cat /tmp/board_info.json | grep bootcount "bootcount": 1,
When a gateway is started/restarted, U-Boot displays the boot cause.
The possible reasons are:
This information is transmitted to initrd and to applications with the kernel argument « bootcause ».
The information is then provided in the bootcause parameter in the file /proc/cmdline.
Example:
# cat /proc/cmdline console=ttymxc0,115200 bootmode=nominal bootcause=SW bootcount=5 bootfail=0
In case you need assistance to troubleshoot your gateway, Kerlink's support team will help you if:
If the gateway does not satisfy this requirement, please contact sales@kerlink.fr. Our Sales team will make you an offer to get assistance.
Otherwise, contact support@kerlink.fr to get assistance. Our support team will open you an account in Kerlink's ticketing tool.
When contacting the support team, to improve and speed up the resolution of your issue, please provide them:
To simplify the log gathering process, two scripts are available. These scripts generate an archive containing many logs and commands results.
To gather the logs from shell:
dos2unix gather_logs.sh.chmod 755 gather_logs.sh../gather_logs.sh. The execution of the script takes about 1-2 minutes./tmp.#!/bin/sh # get the name and the MAC of the board reg=$(cat /sys/fsl_otp/HW_OCOTP_GP1) serial=$(printf "%X\n" $reg) shortmac=$(cat /sys/class/net/eth0/address | awk -F: '{print $5$6}') NAME="Logs_${serial}_${shortmac}_$(date "+%Y%m%d-%H%M%S")" tmpdir="/tmp/${NAME}" # generate a temporary directory mkdir -p ${tmpdir}/ { # get general information { uname -a; echo; date; echo; uptime; } > ${tmpdir}/status.txt ps ww > ${tmpdir}/ps.log # get /var/log logs mkdir -p ${tmpdir}/var/log/ cp -a /var/log/* ${tmpdir}/var/log/ # get packet forwarder logs/configuration shopt -s extglob mkdir -p ${tmpdir}/packet_forwarder/ cp -a /user/!(rootfs_rw)/var/log/* ${tmpdir}/packet_forwarder/ cp -a /user/!(rootfs_rw)/etc/* ${tmpdir}/packet_forwarder/ # get /tmp files cp /tmp/sys_startup_status.json ${tmpdir}/ cp /tmp/calib_loraloc.json ${tmpdir}/ cp /tmp/gps_vers.txt ${tmpdir}/ # get user configuration mkdir -p ${tmpdir}/config/ cp -a /user/rootfs_rw/etc/* ${tmpdir}/config/ # get network information ifconfig -a > ${tmpdir}/ifconfig.log route > ${tmpdir}/route.log iptables -L > ${tmpdir}/iptables.log netstat > ${tmpdir}/netstat.log { echo 'connmanctl technologies' connmanctl technologies echo echo 'connmanctl services' connmanctl services } > ${tmpdir}/connmanctl.log # get GSM information gsmdiag.py ; cp /tmp/gsmdiag.txt ${tmpdir}/ { echo 'qmicli -d /dev/cdc-wdm0 --dms-get-ids' qmicli -d /dev/cdc-wdm0 --dms-get-ids echo echo 'qmicli -d /dev/cdc-wdm0 --nas-get-serving-system' qmicli -d /dev/cdc-wdm0 --nas-get-serving-system echo echo 'qmicli -d /dev/cdc-wdm0 --nas-get-system-selection-preference' qmicli -d /dev/cdc-wdm0 --nas-get-system-selection-preference echo echo 'qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode' qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode } > ${tmpdir}/qmicli_0.log # get GPS info timeout -t 10 cat /dev/nmea2 > /dev/null head -n 50 /dev/nmea2 > ${tmpdir}/nmea2.log # get LoRa information loraloc_info > ${tmpdir}/loraloc_info.log # get miscellaneous information find /user/ > ${tmpdir}/user_file_list.txt opkg list-installed > ${tmpdir}/installed-packages.log monit status > ${tmpdir}/monit_status.log } > ${tmpdir}/gather_logs.log 2>&1 tar -C /tmp -czf /tmp/${NAME}.tar.gz ${NAME} echo "/tmp/${NAME}.tar.gz created"
Gathering logs from USB (no commands required)
To gather logs from a USB without typing any command:
usbkey.txt file on the USB key as described here.#!/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 0x44 0x45" # # Check platform we are running on # get_platform() { for hwversion in ${HW_IBTS} do if [ "$(cat /sys/fsl_otp/HW_OCOTP_GP1 | grep ${hwversion})" != "" ]; then platform="IBTS" echo ${platform} return fi done for hwversion in ${HW_IFEMTO} do if [ "$(cat /sys/fsl_otp/HW_OCOTP_GP1 | grep ${hwversion})" != "" ]; then platform="IFEMTO" echo ${platform} return fi done echo "Hardware platform not supported with code : $(cat /var/tmp/version)" platform="NOT_SUPPORTED" 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 } get_logs() { NAME="Logs_${serial}_${shortmac}_$(date "+%Y%m%d-%H%M%S")" tmpdir="/tmp/${NAME}" mkdir -p ${tmpdir}/ { # get general information { uname -a; echo; date; echo; uptime; } > ${tmpdir}/status.txt ps ww > ${tmpdir}/ps.log # get /var/log logs mkdir -p ${tmpdir}/var/log/ cp -a /var/log/* ${tmpdir}/var/log/ # get packet forwarder logs/configuration shopt -s extglob mkdir -p ${tmpdir}/packet_forwarder/ cp -a /user/!(rootfs_rw)/var/log/* ${tmpdir}/packet_forwarder/ cp -a /user/!(rootfs_rw)/etc/* ${tmpdir}/packet_forwarder/ # get /tmp files cp /tmp/sys_startup_status.json ${tmpdir}/ cp /tmp/calib_loraloc.json ${tmpdir}/ cp /tmp/gps_vers.txt ${tmpdir}/ # get user configuration mkdir -p ${tmpdir}/config/ cp -a /user/rootfs_rw/etc/* ${tmpdir}/config/ # get network information ifconfig -a > ${tmpdir}/ifconfig.log route > ${tmpdir}/route.log iptables -L > ${tmpdir}/iptables.log netstat > ${tmpdir}/netstat.log { echo 'connmanctl technologies' connmanctl technologies echo echo 'connmanctl services' connmanctl services } > ${tmpdir}/connmanctl.log # get GSM information gsmdiag.py ; cp /tmp/gsmdiag.txt ${tmpdir}/ { echo 'qmicli -d /dev/cdc-wdm0 --dms-get-ids' qmicli -d /dev/cdc-wdm0 --dms-get-ids echo echo 'qmicli -d /dev/cdc-wdm0 --nas-get-serving-system' qmicli -d /dev/cdc-wdm0 --nas-get-serving-system echo echo 'qmicli -d /dev/cdc-wdm0 --nas-get-system-selection-preference' qmicli -d /dev/cdc-wdm0 --nas-get-system-selection-preference echo echo 'qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode' qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode } > ${tmpdir}/qmicli_0.log # get GPS info timeout -t 10 cat /dev/nmea2 > /dev/null head -n 50 /dev/nmea2 > ${tmpdir}/nmea2.log # get LoRa information loraloc_info > ${tmpdir}/loraloc_info.log cp /user/rootfs_rw/orbiwise/gwdaemon.log.?.gz ${tmpdir}/orbiwise/ # get miscellaneous information find /user/ > ${tmpdir}/user_file_list.txt opkg list-installed > ${tmpdir}/installed-packages.log monit status > ${tmpdir}/monit_status.log } > ${tmpdir}/gather_logs.log 2>&1 tar -C /tmp -czf ${1}/${NAME}.tar.gz ${NAME} echo "${1}/${NAME}.tar.gz created" sync rm -rf $tmpdir } ##################### # MAIN ##################### platform=$(get_platform) reg=$(cat /sys/fsl_otp/HW_OCOTP_GP1) serial=$(printf "%X\n" $reg) shortmac=$(cat /sys/class/net/eth0/address | awk -F: '{print $5$6}') if [ ${platform} == "IBTS" ]; then SYSLEDPATH=${SYSLEDPATH_IBTS} elif [ ${platform} == "IFEMTO" ]; then SYSLEDPATH=${SYSLEDPATH_IFEMTO} fi # Set led On set_led none 1 # Get logs get_logs ${USBDIR} # Prepare reboot after USB unplug cat > /tmp/usbkey_remove << EOF # Switch off Led echo "none" > ${SYSLEDPATH}/trigger EOF # All is right, make Led blinking fast to notify User set_led timer 100 100