この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
mae3xx_ope:led_examples:start [2015/12/02 12:09] admin |
mae3xx_ope:led_examples:start [2023/07/12 05:15] (現在) admin [3G/LTE Module LED] |
||
---|---|---|---|
ライン 1: | ライン 1: | ||
+ | ====== 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| <color #01df01>緑</color> | 消灯 |電源OFF|PowerLED| | ||
+ | |:::|:::| @#01df01:<color black>点灯</color> |電源ON|:::| | ||
+ | |:::| <color red>赤</color> | 消灯 | |power-stat:r| | ||
+ | |:::|:::| @#ff0000:<color black>点灯</color> |SDカード拡張領域利用中(([[mae3xx_ope:extend_by_sd:start]]))|:::| | ||
+ | |STATUS-1| <color #01df01>緑</color> | 消灯 | |system-status1:g| | ||
+ | |:::|:::| @#01df01:<color black>点灯</color> |ブートローダー起動|:::| | ||
+ | |:::|:::| @#088a08:<color white>点滅</color> |ブートローダー 入力待ち状態(プロンプト/メニュー)|:::| | ||
+ | |:::|:::| @#088a08:<color white>Fade In/Out</color> |Suspend状態 (version 2.1.0以降)|:::| | ||
+ | |:::| <color red>赤</color> | 消灯 | |system-status1:r| | ||
+ | |:::|:::| @#8a0808:<color white>ハートビート</color> |Kernel動作中|:::| | ||
+ | |STATUS-2| <color #01df01>緑</color> | 消灯 | |system-status2:g| | ||
+ | |:::|:::| @#01df01:<color black>点灯</color> | |:::| | ||
+ | |:::| <color red>赤</color> | 消灯 | |system-status2:r| | ||
+ | |:::|:::| @#ff0000:<color black>点灯</color> | |:::| | ||
+ | |STATUS-3| <color #01df01>緑</color> | 消灯 | |system-status3:g| | ||
+ | |:::|:::| @#01df01:<color black>点灯</color> |出荷状態での起動(([[mae3xx_ope:cleanboot:start]]))|:::| | ||
+ | |:::| <color red>赤</color> | 消灯 | |system-status3:r| | ||
+ | |:::|:::| @#ff0000:<color black>点灯</color> | |:::| | ||
+ | |:::|:::| @#8a0808:<color white>点滅</color> |シャットダウン処理中|:::| | ||
+ | |||
+ | 全てのLEDは LED class driver(([[https://www.kernel.org/doc/Documentation/leds/leds-class.txt]])) での実装となっていますので、 | ||
+ | sysfs(([[http://ja.wikipedia.org/wiki/Sysfs]])) I/F により任意の動作に変更が可能です。 | ||
+ | |||
+ | <code> | ||
+ | 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 | ||
+ | </code> | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== 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:<color black>点灯</color> | 消灯 | - | | | ||
+ | |:::| 1 | @#01df01:<color black>点灯</color> | 消灯 | - | | | ||
+ | |:::| 2 | 消灯 | @#01df01:<color black>点灯</color> | - | | | ||
+ | |:::| 3 | @#01df01:<color black>点灯</color> | @#01df01:<color black>点灯</color> | - | | | ||
+ | | 切断 | - | - | - | 消灯 | | | ||
+ | | 接続中((Demand で待機中含む)) | - | - | - | @#01df01:<color black>点灯</color> | | | ||
+ | | SIM 抜け | - | - | - | @#ff0000:<color black>点灯((v5.5.0 以降))</color> |認識されていた 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 のトリガー設定を確認 | ||
+ | |||
+ | <code> | ||
+ | root@plum:/sys/class/leds/system-status2:r# cat trigger | ||
+ | [none] nand-disk mmc0 timer timer-suspend oneshot heartbeat gpio cpu0 default-on transient | ||
+ | </code> | ||
+ | |||
+ | * "heartbeat" に変更 | ||
+ | |||
+ | <code> | ||
+ | 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 | ||
+ | </code> | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== On/Off (brightness) ==== | ||
+ | |||
+ | * system-status2:r LED の On/Off 状態を確認 | ||
+ | |||
+ | <code> | ||
+ | root@plum:/sys/class/leds/system-status2:r# cat brightness | ||
+ | 0 | ||
+ | </code> | ||
+ | |||
+ | * On に変更 | ||
+ | |||
+ | <code> | ||
+ | root@plum:/sys/class/leds/system-status2:r# echo 255 > brightness | ||
+ | root@plum:/sys/class/leds/system-status2:r# cat brightness | ||
+ | 255 | ||
+ | </code> | ||
+ | |||
+ | |||
+ | \\ | ||