Hello,
I have a Kerlink Wirnet Station that I am trying to bring up for connection with TheThingsStack, unfortunately without much success.
Issues
I believe that my main issue is that the bash shell seems to be “broken” on the station (with the newest image fetched from the Kerlink site). I could not find a way to fix it, and any help will be greatly appreciated.
I cannot do the Provisioning stage, as it is described in the setup guide.
The provision steps require downloading a script from GitHub and running it on the station with specific parameters according to the station and TheThingsStack account.
According to the documentation there, the script should be fetched using the curl command. This command does not exist on my station (which seemed weird to me, as it has the newest image from Kerlink), so I downloaded the file to my PC and sent it to the station over SCP.
The next step should be running the script with the right parameters, which failed when I tried it.
The script requires a bash version that is above 4.3. However, I could not find what version of bash the system is currently running.
According to all the information I found online, the bash version should be saved in the environment variable of BASH_VERSINFO
, however, this environment variable does not exist on the station’s system. I couldn’t find any information online about this problem (not having this environment variable).
The script fails when it tries to run the function
command, saying it was not found. This again makes me think that something is wrong with the bash executable in the system.
The Kerlink wiki has some information about installing newer Debian packages on the system (here). I tried to follow their instructions for installing a newer bash, which didn’t work. According to their instructions, the pre-compiled Debian packages are zips of tars, but all the Debian packages I have downloaded did not conform to the zip format. I have tried various archiving tools (WinRar, zip, tar), and all reported that the files are not valid archive files. I have downloaded bash armhf and armel packages (as I wasn’t sure which one is the right one), but both of them were not valid archives (I had made sure the MD5 of the files I got is indeed the expected MD5).
There aren’t any standard package updater on the system, which according to Kerlink wiki is by-design.
More Information
The station I am using is quite old, and it was not in use for some years before I got it. It originally run FW version 2.2 which I upgraded to the newest Kerlink version (3.6). I did the upgrade following this guide.
I confirmed that the update worked (by reading the FW version). I have also made sure the HW version of the station supports the new SW (by making sure the station is 27dBm capable).
I am communicating with the station over ssh, which seems to work as expected (I have the user-name and password according to this documentation, and it changed as expected when upgrading from version 2.2 to 3.6).
I know this type of device has gone end-of-life, but this is the HW I currently have, and it still should be supported according to all the information I found both on Kerlink and TheThingsStack sites.
Logs
These are some logs that might help anyone understand what the issue might be, or help solve it.
If any more information is needed, please let me know and I’ll provide it.
# Running the script
[root@Wirnet_080E0CDD ~]> bash # Go into bash shell
~ > cd /tmp/provisioning/ # Move to script directory
/tmp/provisioning > ./provision.sh <all needed parameters> # Script failure.
./provision.sh: line 6: cant open 4: no such file
./provision.sh: line 6: BASH_VERSINFO[0]: not found
./provision.sh: line 6: BASH_VERSINFO[0]: not found
./provision.sh: line 27: function: not found
# Print environment variables - BASH_VERSINFO does not exist
/tmp/provisioning > export
export DISPLAY='localhost:10.0'
export EDITOR='/bin/vi'
export HOME='/root'
export IVEHOME='/usr/lib/jvm/ojec1.1.1/'
export JAVA_HOME='/usr/lib/jvm/ojec1.1.1/'
export LD_LIBRARY_PATH=':/usr/lib/jvm/ojec1.1.1//bin'
export LOGNAME='root'
export OLDPWD='/root'
export PAGER='/bin/more '
export PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/lib/jvm/ojec1.1.1//bin'
export PWD='/tmp/provisioning'
export SHELL='/bin/sh'
export SHLVL='2'
export SSH_CLIENT='172.16.6.163 64300 22'
export SSH_CONNECTION='172.16.6.163 64300 172.16.6.142 22'
export SSH_TTY='/dev/pts/2'
export TERM='xterm'
export USER='root'
# Print current shell - make sure bash is the one running
/tmp/provisioning > echo $0
bash
# Print version information for the station - version is 3.6 as expected, HW supports 27dBm
/tmp/provisioning > get_version -u -v
KERNEL_VER=3.10.104-3.10.104-klk7
PIC_VER=8.3
BOOTSTRAP_VER=""
UBOOT_VER="U-Boot 2009.03-2009.03-klk1 (Feb 25 2019 - 18:10:47)"
SCRIPT_VER=v1.0
INITRAMFS_VER=v1.3
FILESYSTEM_VER=2016.05v1.13
KNETD_VER="wirma2_v4.10 WAN_3.16 (Dec 21 2018-15:52:45)"
PROD_FW=wirmaV2_wirnet_v3.6
LORABOARD_MANUFACTURER=00
LORABOARD_TYPE="868-27dBm"
LORABOARD_HWVERSION=05
LORABOARD_SERIALNO=001154
************************ Update log ************************
2021.11.17-09:31:47 -- Produsb
************************************************************
Any help will be greatly appreciated.
With Kind Regards,
Omri