This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:ibts:power_management_ibts [2019/09/25 15:27] ghi created |
wiki:ibts:power_management_ibts [2020/03/25 17:12] (current) dlr |
||
---|---|---|---|
Line 14: | Line 14: | ||
===== Low power detect ===== | ===== Low power detect ===== | ||
Power loss can be detected by polling the value of the VIN_9V signal. It should fall down near 0V when both, PoE and Aux power, are lost. The first action to take when the VIN_9V value decreases is to stop the LoRa module. This will decrease the consumption so the gateway will have enough time to stop. The voltage value can be obtained with the following methods: | Power loss can be detected by polling the value of the VIN_9V signal. It should fall down near 0V when both, PoE and Aux power, are lost. The first action to take when the VIN_9V value decreases is to stop the LoRa module. This will decrease the consumption so the gateway will have enough time to stop. The voltage value can be obtained with the following methods: | ||
+ | |||
+ | <note important>Note that power loss can be detected only if the gateway is equipped with a backup battery !</note> | ||
+ | |||
+ | ==== Since release 4.2 ==== | ||
+ | |||
+ | Get the value //VIN_POE// with the tool //sensors//: | ||
+ | |||
+ | <code bash> | ||
+ | root@klk-lpbs-0605F5:~# sensors | grep POE | ||
+ | VIN_POE: +52.61 V | ||
+ | </code> | ||
+ | |||
+ | or, in C with [[https://en.wikipedia.org/wiki/Lm_sensors|lmsensors]] library: | ||
+ | |||
+ | <code c> | ||
+ | #include <sensors/sensors.h> | ||
+ | |||
+ | static int get_sensor_voltage(const char * pName, double * pVoltage) | ||
+ | { | ||
+ | const sensors_chip_name *chip; | ||
+ | const sensors_feature *feature; | ||
+ | const sensors_subfeature * subfeature; | ||
+ | int chip_nr, i; | ||
+ | char *label = NULL; | ||
+ | double voltage = 0; | ||
+ | int result = -1; | ||
+ | int ret; | ||
+ | |||
+ | ret = sensors_init(NULL); | ||
+ | if (ret != 0) { | ||
+ | syslog(LOG_ERR, "[%s:%d] err %d in sensors_init\n", __FUNCTION__, __LINE__, ret); | ||
+ | return result; | ||
+ | } | ||
+ | |||
+ | chip_nr = 0; | ||
+ | while ((chip = sensors_get_detected_chips(NULL, &chip_nr))) { | ||
+ | i = 0; | ||
+ | while ((feature = sensors_get_features(chip, &i))) { | ||
+ | label = sensors_get_label(chip, feature); | ||
+ | if (label != NULL) { | ||
+ | subfeature = sensors_get_subfeature(chip, feature, SENSORS_SUBFEATURE_IN_INPUT); | ||
+ | if ((strcmp(pName, label) == 0) && (subfeature != NULL)) { | ||
+ | if (sensors_get_value(chip, subfeature->number, &voltage) == 0) { | ||
+ | *pVoltage = voltage; | ||
+ | result = 0; | ||
+ | } | ||
+ | } | ||
+ | free(label); | ||
+ | label = NULL; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | sensors_cleanup(); | ||
+ | return result; | ||
+ | } | ||
+ | |||
+ | double voltage = 0; | ||
+ | |||
+ | get_sensor_voltage("VIN_POE", &voltage); | ||
+ | |||
+ | </code> | ||
+ | |||
+ | ==== On older releases ==== | ||
+ | |||
+ | ++++On older releases (click to expand)| | ||
+ | |||
+ | Get the value //VIN_9V// with the tool //adc//: | ||
<code bash> | <code bash> | ||
root@klk-lpbs:~# adc 4 | root@klk-lpbs:~# adc 4 | ||
Line 35: | Line 102: | ||
u32_adc_value = ((u32_adc_value* 485) / 15); | u32_adc_value = ((u32_adc_value* 485) / 15); | ||
</code> | </code> | ||
- | <note important>Note that power loss can be detected only if the station is equipped with a backup battery !</note> | ||
+ | ++++ | ||
- | \\ \\ | ||
- | ===== On/Off Button ===== | ||
- | An ON/OFF button is located on the front side of the CPU module. This button is intended to perform a hard reboot, power down and power up of the Wirnet iBTS: | ||
- | * **Hard reboot** - Press the button of the Wirnet iBTS. | ||
- | * **Power down** | ||
- | * Press the button between 1 to 5 seconds to **halt** the Wirnet iBTS. | ||
- | * Wait for the shutdown of the Wirnet iBTS i.e. until the LEDs are switched off. | ||
- | * The shutdown may take up to 30s depending on the current software activity. | ||
- | * **Power on** - Press the button during 1 second to power on the Wirnet iBTS when powered off. | ||
Line 53: | Line 111: | ||
===== Voltage measurement ===== | ===== Voltage measurement ===== | ||
- | All internal voltage measurement can be obtained using the following tool: | + | Since version 4.2, All internal voltage measurement can be obtained using the following tool: |
+ | <code bash> | ||
+ | root@klk-lpbs-0605F5:~# sensors | ||
+ | klk_lpbs_adc-isa-0000 | ||
+ | Adapter: ISA adapter | ||
+ | VDD_CORE: +1.37 V | ||
+ | NVCC_DRAM: +1.35 V | ||
+ | 3V3_FDP: +3.30 V | ||
+ | NVCC_3V3: +3.30 V | ||
+ | VIN_POE: +52.61 V | ||
+ | VCC_5V: +5.03 V | ||
+ | VPOWER: +9.05 V | ||
+ | VPORT_MEAS: +53.19 V | ||
+ | </code> | ||
+ | |||
+ | On all versions, you can also use the following tool: | ||
<code bash> | <code bash> | ||
root@klk-lpbs:~# adc | root@klk-lpbs:~# adc |