The command to retrieve firmware version is
cat /etc/os-release
Documentation can be consulted here
A set of environment variables is available on the firmware.
Several commands can be used to retrieved them:
env
/proc/cmdline.cat /proc/cmdline
It is automatically parsed by systemd and available into /run/boardinfo.env:
root@klk-wifc-030336:~# cat /run/boardinfo.env
export ARCH="39"
export HWVERSION="3"
export SERIAL="39030336"
export EUI64="7276FF0039030336"
export CODENAME="wifc"
export FAMILY="klk6sx"
export SECURE_BOOT="false"
export HWRADIO="f868"
These information are then available through environment variable to all process started by systemd (including the current shell):
root@klk-wifc-030336:~# echo $EUI64
7276FF0039030336
root@klk-wifc-030336:~# echo $SERIAL
39030336
root@klk-wifc-030336:~# echo $CODENAME
wifc
root@klk-wifc-030336:~# echo $HWRADIO
f868
On Wirnet™ iBTS, modules plugged to the CPU are also exported as environment variables. These specific variables are available in the file /run/ibts-discovery/ibts-discovery.env
root@klk-lpbs-0504b4:~# cat /run/ibts-discovery/ibts-discovery.env
export IBTS_WAN_SLOTS="1"
export HAS_WAN="true"
export IBTS_LORA_SLOTS="2"
export HWRADIO="f868"
This allow to know on which slot module are plugged and if they are correctly detected.