====== LEDの割り当てと表示パターン、使用例 ====== ===== LEDの割り当て ===== ==== Status LED ==== MA-E3xxには、2色(赤/緑)LED が4個(POWER, STATUS-1〜3)実装されています。 {{:mae3xx_ope:boot_select:mae3xx_front_00.jpg|}} \\ それぞれのデフォルトでの割り当ては下記のようになっています。 ^ LED ^ Color ^ 状態 ^ 意味 ^ sysfs以下 相対PATH | |POWER| | 消灯 |電源OFF|PowerLED| |:::|:::| @#01df01:点灯 |電源ON|:::| |:::| | 消灯 | |power-stat:r| |:::|:::| @#ff0000:点灯 |SDカード拡張領域利用中(([[mae3xx_ope:extend_by_sd:start]]))|:::| |STATUS-1| | 消灯 | |system-status1:g| |:::|:::| @#01df01:点灯 |ブートローダー起動|:::| |:::|:::| @#088a08:点滅 |ブートローダー 入力待ち状態(プロンプト/メニュー)|:::| |:::|:::| @#088a08:Fade In/Out |Suspend状態 (version 2.1.0以降)|:::| |:::| | 消灯 | |system-status1:r| |:::|:::| @#8a0808:ハートビート |Kernel動作中|:::| |STATUS-2| | 消灯 | |system-status2:g| |:::|:::| @#01df01:点灯 | |:::| |:::| | 消灯 | |system-status2:r| |:::|:::| @#ff0000:点灯 | |:::| |STATUS-3| | 消灯 | |system-status3:g| |:::|:::| @#01df01:点灯 |出荷状態での起動(([[mae3xx_ope:cleanboot:start]]))|:::| |:::| | 消灯 | |system-status3:r| |:::|:::| @#ff0000:点灯 | |:::| |:::|:::| @#8a0808:点滅 |シャットダウン処理中|:::| 全てのLEDは LED class driver(([[https://www.kernel.org/doc/Documentation/leds/leds-class.txt]])) での実装となっていますので、 sysfs(([[http://ja.wikipedia.org/wiki/Sysfs]])) I/F により任意の動作に変更が可能です。 root@plum:~# ls -l /sys/class/leds/ total 0 lrwxrwxrwx 1 root root 0 Mar 24 10:21 PowerLED -> ../../devices/leds_foma.5/leds/PowerLED lrwxrwxrwx 1 root root 0 Mar 24 10:21 power-stat:r -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/power-stat:r lrwxrwxrwx 1 root root 0 Mar 24 10:21 system-status1:g -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/system-status1:g lrwxrwxrwx 1 root root 0 Mar 24 10:21 system-status1:r -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/system-status1:r lrwxrwxrwx 1 root root 0 Mar 24 10:21 system-status2:g -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/system-status2:g lrwxrwxrwx 1 root root 0 Mar 24 10:21 system-status2:r -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/system-status2:r lrwxrwxrwx 1 root root 0 Mar 24 10:21 system-status3:g -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/system-status3:g lrwxrwxrwx 1 root root 0 Mar 24 10:21 system-status3:r -> ../../devices/ocp.3/44e0b000.i2c/i2c-0/0-0045/leds/system-status3:r \\ ==== 3G/LTE Module LED ==== 3G/LTE モジュールが搭載された機種には、 * アンテナレベル (0 〜 3) * 回線接続状態 を表す LED が実装されています。 {{:mae3xx_ope:connect_ppp:mae35x_led_00.jpg|}} \\ 3G/LTE モジュールのアンテナレベル及び回線への接続状態により、点灯パターンが変化します。 ^ 接続状態 ^ アンテナレベル ^ LED ^^^ Note | ^:::^:::^ ANT I ^ ANT II ^ MOBILE ^:::| | - | 0 | @#ff0000:点灯 | 消灯 | - | | |:::| 1 | @#01df01:点灯 | 消灯 | - | | |:::| 2 | 消灯 | @#01df01:点灯 | - | | |:::| 3 | @#01df01:点灯 | @#01df01:点灯 | - | | | 切断 | - | - | - | 消灯 | | | 接続中((Demand で待機中含む)) | - | - | - | @#01df01:点灯 | | | SIM 抜け | - | - | - | @#ff0000:点灯((v5.5.0 以降)) |認識されていた SIM が抜かれ、使用できない状態 | | モジュール電源OFF | - | 消灯 | 消灯 | 消灯 | | \\ ===== LED表示パターン ===== ==== 電源ON から Linux起動まで ==== {{:mae3xx_ope:led_examples:linux_boot_from_power_on.mp4|}} \\ ^ SequenceNo. ^ Event ^ Info | ^ 1|LED全消灯状態|電源OFF中| ^ 2|LED POWER 緑点灯|電源ON| ^ 3|LED1 緑点灯|ブートローダー起動| ^ 4|LED1 緑消灯|Linux Kernel起動開始| ^ 5|LED1 赤点滅開始|Kernel起動完了、init処理開始| \\ ==== 出荷状態での起動 ==== INITスイッチを押下しながら電源を投入した場合です。 {{:mae3xx_ope:led_examples:boot_with_initialstate.mp4|}} \\ ^ SequenceNo. ^ Event ^ Info | ^ 1|LED全消灯状態|電源OFF中| ^ 2|LED POWER 緑点灯|電源ON| ^ 3|LED1 緑点灯|ブートローダー起動| ^ 4|LED3 緑点灯|『出荷状態での起動』受付| ^ 5|LED1/3 緑消灯|Linux Kernel起動開始| ^ 6|LED1 赤点滅開始|Kernel起動完了、init処理開始| \\ ==== ハートビート (Linux起動中、CPU動作中) ==== {{:mae3xx_ope:led_examples:heartbeat.mp4|}} \\ ==== INITSW押下によるシャットダウン ==== {{:mae3xx_ope:led_examples:shutdown_by_initsw.mp4|}} \\ ==== Suspend/Resume ==== Suspend状態へ遷移後、10秒後に RTC Alarm により Wakeup します。 {{:mae3xx_ope:power_management:standby_rtcwakeup.mp4|}} \\ ===== LED の変更 ===== 前述したとおり、sysfs(([[http://ja.wikipedia.org/wiki/Sysfs]])) I/F により任意の動作に変更が可能です。\\ 使用例を示します。 \\ ==== トリガー ==== * system-status2:r LED のトリガー設定を確認 root@plum:/sys/class/leds/system-status2:r# cat trigger [none] nand-disk mmc0 timer timer-suspend oneshot heartbeat gpio cpu0 default-on transient * "heartbeat" に変更 root@plum:/sys/class/leds/system-status2:r# echo heartbeat > trigger root@plum:/sys/class/leds/system-status2:r# cat trigger none nand-disk mmc0 timer timer-suspend oneshot [heartbeat] gpio cpu0 default-on transient \\ ==== On/Off (brightness) ==== * system-status2:r LED の On/Off 状態を確認 root@plum:/sys/class/leds/system-status2:r# cat brightness 0 * On に変更 root@plum:/sys/class/leds/system-status2:r# echo 255 > brightness root@plum:/sys/class/leds/system-status2:r# cat brightness 255 \\