This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:peripherals [2018/12/24 11:40] hch [Leds] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Peripherals ====== | ||
- | ===== GPS (Wirnet™ iBTS only) ===== | ||
- | |||
- | ==== Localization ==== | ||
- | |||
- | GPS signal is handled by the kgpsd daemon. By default, this daemon sends the received nmea frames to both virtual ports ''/dev/nmea1'' and ''/dev/nmea2''. Once a program reads a line from a virtual port, this line is deleted. Thus, only one program should read a virtual port at a time. | ||
- | |||
- | By default, the packet forwarder reads the ''/dev/nmea1'' virtual port. | ||
- | |||
- | The number of virtual ports can be increased using the ''/etc/kgpsd.conf'' configuration file. | ||
- | |||
- | To determine whether GPS signal is properly received, NMEA sentences can be monitored using the following command: | ||
- | |||
- | <code bash> | ||
- | cat /dev/nmea2 | ||
- | # ctrl-c to exit | ||
- | </code> | ||
- | |||
- | The GGA sentences contain 2 fields that indicate the quality of the GPS signal. | ||
- | * The number of satellites being tracked. To calculate coordinates at least 4 satellites are required. If less than 4 satellites are being received, then ''0'' is always written. A maximum of 12 satellites can be received at the same time. | ||
- | * The fix quality. Receiving 4 satellites is not enough, a few sets of data are required to calculate coordinates. This sets of data can belong to receive (up to 15 minutes the first time). When the fix quality is equal to 1, it means the data is valid. | ||
- | |||
- | Example of correct GGA sentence: | ||
- | |||
- | ''$GNGGA,194640.00,4530.70229,N,00914.26728,E,<fc #008000>**1,12,**</fc>4.31,184.9,M,47.1,M,,*41'' | ||
- | |||
- | //In this example, the fix quality is OK (<fc #008000>**1**</fc>) and <fc #008000>**12**</fc> satellites are received.// | ||
- | |||
- | Examples of bad GGA sentence: | ||
- | * Frames like the one below, indicates that not enough satellites are received. | ||
- | |||
- | ''$GNGGA,152451.00,,,,,<fc #b22222>**0,00,**</fc>99.99,,,,,,*7E'' | ||
- | |||
- | * Frames like the one below, indicates that the set of data is not valid. | ||
- | |||
- | ''$GNGGA,163411.00,,,,,<fc #b22222>**0,04,**</fc>24.77,,,,,,*7A'' | ||
- | |||
- | In case the number of received satellites is small, the value of the field ''fixed_altitude'' in the ''/etc/kgpsd.conf '' configuration file can be set to ''yes''. | ||
- | |||
- | <code> | ||
- | # 2D/3D Altitude management | ||
- | fixed_altitude=yes | ||
- | </code> | ||
- | |||
- | It will result in losing the altitude, however, only 3 satellites will be necessary to receive correct frames. | ||
- | |||
- | |||
- | ==== Time management ==== | ||
- | * Some NMEA frames contain UTC time. | ||
- | * GPS possesses two signal features: | ||
- | - **PPS (Pulse per second) feature:** It sends a hardware signal to produce a one-hertz clock. Pulse is produced at the beginning of each second. | ||
- | - ** TAI offset information:** It sends current TAI offset and time of next leap second insertion in UTC time (if any insertion is planned). | ||
- | |||
- | ==== Leap second feature configuration ==== | ||
- | |||
- | ''KGPSd'' is the daemon managing hardware GPS component on Wirnet™ iBTS firmware.\\ | ||
- | ''KGPSd'' configuration file is ''/etc/kgpsd.conf''.\\ | ||
- | Configurations concerning leap second features are: | ||
- | * **leap_second_feature:** "yes" means the feature is activated (binary message will be sent sometimes). | ||
- | * **leap_second_file:** Filename where information about leap second will be written (each time a correct answer is received from GPS component). | ||
- | * **leap_second_period:** When daemon starts, for every 10 seconds, leap second information is checked until it is received. | ||
- | |||
- | Example of kgpsd configuration file for this feature: | ||
- | <code> | ||
- | # Leap second management | ||
- | ## no: no leap second information is given, yes: information given | ||
- | leap_second_feature=no | ||
- | ## where leap second information is written (this is not directly usable by NTPd) | ||
- | leap_second_file=/tmp/kgpsd_leap_file.list | ||
- | ## Leap second information is looked for at first GPS fix after daemon start and then after given period | ||
- | leap_second_period=2592000 | ||
- | </code> | ||
- | |||
- | ===== Sensors ===== | ||
- | |||
- | ==== Temperature ==== | ||
- | |||
- | === IMX temperature sensor (Wirnet iBTS only) === | ||
- | |||
- | To get the temperature inside the Wirnet iBTS CPU use the following command: | ||
- | |||
- | <code c> | ||
- | cat /sys/class/hwmon/hwmon1/temp1_input | ||
- | </code> | ||
- | |||
- | It is necessary to divide the result by 1000 to get the temperature in degrees Celsius (°C). | ||
- | |||
- | === CPU temperature sensor === | ||
- | |||
- | To get the temperature inside the gateway casing use the following command: | ||
- | * **Wirnet iBTS**:<code c> | ||
- | cat /sys/class/hwmon/hwmon0/temp1_input | ||
- | </code> | ||
- | |||
- | * **Wirnet iFemtoCell**:<code c> | ||
- | cat /sys/class/hwmon/hwmon0/temp1_input | ||
- | </code> | ||
- | |||
- | It is necessary to divide the result by 1000 to get the temperature in degrees Celsius (°C). | ||
- | |||
- | ==== Light sensor (Wirnet iBTS only) ==== | ||
- | A light sensor can be used to know if the Wirnet™ iBTS casing door is opened or closed.\\ | ||
- | To use the light sensor use the following command: | ||
- | |||
- | <code> | ||
- | # echo "0.1000" > /sys/bus/iio/devices/iio\:device2/in_illuminance_integration_time | ||
- | # cat /sys/bus/iio/devices/iio\:device2/in_illuminance_input | ||
- | 47.240000 => opened casing | ||
- | # cat /sys/bus/iio/devices/iio\:device2/in_illuminance_input | ||
- | 0.880000 => closed casing | ||
- | </code> | ||
- | |||
- | ===== LEDs ===== | ||
- | |||
- | FIXME: Leds iFemto comportement à vérifier avec le CPF | ||
- | |||
- | ++++ | ||
- | Wirnet iBTS | | ||
- | |||
- | The three RJ45 connectors (PoE, LOCAL and debug) integrate 2 LEDs, one Green and one Orange.\\ | ||
- | The behavior of the LEDs is detailed hereafter: | ||
- | |||
- | ^ Connector ^ LED ^ Description ^ | ||
- | ^ LOCAL| **<fc #008000>Green</fc>** | Ethernet data activity| | ||
- | ^ LOCAL| **<fc #ffa500>Orange</fc>** | Ethernet data link| | ||
- | ^ PoE/LAN| **<fc #008000>Green</fc>** | Ethernet data activity| | ||
- | ^ PoE/LAN| **<fc #ffa500>Orange</fc>** | Ethernet data link| | ||
- | ^ DEBUG| **<fc #008000>Green</fc>** | Power status| | ||
- | ^ DEBUG| **<fc #ffa500>Orange</fc>** | Software status / activity| | ||
- | |||
- | \\ | ||
- | Precision on the DEBUG **<fc #ffa500>Orange</fc>** LED behavior: | ||
- | |||
- | ^ State^ DEBUG Orange LED ^ | ||
- | ^ Boot part 1| Fix On| | ||
- | ^ Boot part 2| Heartbeat| | ||
- | ^ Boot part 3| Blink every second| | ||
- | ^ Run time| Blink once every 5 seconds| | ||
- | ^ Update| Blink fast (400 ms) | | ||
- | ^ Restore backup| Blink / 2 seconds| | ||
- | ^ Restore Stock| Blink / 4 seconds| | ||
- | ++++ | ||
- | |||
- | ++++ | ||
- | Wirnet iFemtoCell | | ||
- | |||
- | There are 3 LEDs on the Wirnet iFemtoCell: | ||
- | * LED 1 : Power (left) | ||
- | * LED 2 : Backhaul (center) | ||
- | * LED 3 : LoRa Traffic (right) | ||
- | |||
- | ^ Status ^ Power LED ^ | ||
- | | **Kernel Boot** | <fc #ff0000>Red blinking</fc> | | ||
- | | **System Boot** | <fc #008000>Green blinking</fc> | | ||
- | | **Boot finished** | <fc #008000>Green </fc> | | ||
- | | **Software update over USB: startup (1)** | <fc #ff0000>Red</fc> | | ||
- | | **Software update over USB: ending (1)** | <fc #008000>Green </fc> to <fc #ff0000>Red</fc> fast blinking | | ||
- | |||
- | ^ Status ^ Backhaul LED ^ | ||
- | | **Boot** | <fc #ff0000>Red</fc> | | ||
- | |||
- | ^ Status ^ LoRa traffic ^ | ||
- | | **Boot** | <fc #ff0000>Red</fc> | | ||
- | | **Packet forwarder - Rx (2)** | <fc #008000>Green blinking </fc> | | ||
- | | **Packet forwarder - Tx (2)** | <fc #ff0000>Red blinking </fc> | | ||
- | |||
- | (1): This LEDs behavior is only available with the usb.autorun upgrade script provided on this wiki. \\ | ||
- | (2): This LEDs behavior is only available in the packet forwarder provided on this wiki. | ||
- | |||
- | ++++ |