The aim of this page is to show how it is possible to electrically disable some services on the gateway.
It could be useful for use cases where the gateway is powered by an off grid supply and you know you won't use all the features of gateways. In all cases, a service exists on the gateway that allow you to set a profile up.
On this profile, you can enable and disable services, permanently or at any at time in the day, week, month and year.
A configuration file allows to handle the activation and deactivation of certain services.
It must be created in the gateway : /etc/keros-powerctl.d/powersaver.conf.
To configure the file, each parameter name are made of 3 components :
ENABLE | DISABLEETH | GSM | LED | USB | WIFIBOOT | CALENDARThe format of parameters is <ACTION>_<DEVICE>_ON_<EVENT>
You can add any parameter as soon as it has valid name.
The file is used to configure energy-saving actions to be triggered either after startup (BOOT) or on a calendar event (CALENDAR).
BOOT: Describes the state of the service after a reboot. Given value defines the time to wait after the event to come. If the value is 0, the action will be taken directy at boot, else the action will be taken after the specified delay
CALENDAR: Describes the specific time when the event will take place. For the syntax, please refer to man page
Regarding DEVICE :
WIFI is present only on iFemtoCell and iFemto-evolution v2USB concerns data connection with a PCGSM is about the cellular modem present on products (except iFemtoCell)Once the profile is set, you need to reload the configuration with the command :
keros-powerctl reload
You may want to check the next activation / deactivation of a service to verify the configuration file. Events are listed with the command :
systemctl list-timers
The example below shows you how to enable or disable at boot and few time after the boot.
# Disable Ethernet at boot
DISABLE_ETH_ON_BOOT=0
# Disable LED 1 hour after the boot
DISABLE_LED_ON_BOOT=1h
# Enable WiFi at boot
ENABLE_WIFI_ON_BOOT=0 # The WiFi is enabled on boot by default, unless it has been disabled on the previous boot
Some actions are persistent, meaning that they are still active over a reboot.
In case, you want to enable a service at every boot for 5 minutes, you can follow the example below.
# Disable ethernet 5 minutes after boot:
ENABLE_ETH_ON_BOOT=0 # Ethernet have persistent actions, so we need to enable it at boot.
# Then disable it after 5 minutes
DISABLE_ETH_ON_BOOT=5m
The example below shows you how to schedule the activation or deactivation of a certain services.
A standard syntax is used to defined the time when the event will be triggered.
# Enable LED from 10a.m. to 4p.m. every working day
ENABLE_LED_ON_CALENDAR="Mon..Fri 10:00"
DISABLE_LED_ON_CALENDAR="Mon..Fri 16:00"
# Enable USB for 2 specific days at your timezone (1st Sept - 3rd Sept)
ENABLE_USB_ON_CALENDAR="09-01 08:00:00 Europe/Paris"
DISABLE_USB_ON_CALENDAR="09-03 19:00:00 Europe/Paris"
# Keep ethernet 5min then enable it every 5min
DISABLE_ETH_ON_BOOT=5m
ENABLE_ETH_ON_CALENDAR="*:00/10:00"
DISABLE_ETH_ON_CALENDAR="*:05,15,25,35,45,55:00"