Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
LIRCのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
LIRC
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:他のハードウェア]] [[Category:音声/動画]] [[en:LIRC]] {{Related articles start}} {{Related3|LIRC Device Examples|LIRC デバイスサンプル}} {{Related articles end}} この記事ではシリアル・USB 赤外線デバイスを使って [http://lirc.org/ LIRC] "Linux Infrared Remote Control" を設定・使用する方法を説明しています。 ==概要== LIRC はサポートしているリモコンのキーが押されたのをプログラムにあわせてコマンドに変換することができるデーモンです。ここで、「プログラムにあわせて」とは実行しているプログラムによってキーの押下で異なる動作をさせることができることを意味します。 === LIRC の役割 === LIRC を使ってリモコンからの情報がプログラムに流れる過程は以下の通りです: * ユーザーがリモコンのボタンを押すことで IR または RF 信号が送信されます。 * 信号が Linux が入ったパソコンに接続されたレシーバーによって受信されます。 * カーネル (の適切なモジュール) は {{ic|/dev/lirc0}} でレシーバーからのパルス幅の情報をキャラクタライズします。 * {{ic|/usr/bin/lircd}} は {{ic|/etc/lirc/lircd.conf.d/foo.conf}} からの情報でパルス幅をボタンの押下情報に変換します。 * LIRC を使用するプログラムは {{ic|/usr/bin/lircd}} のボタン押下情報を {{ic|~/.lircrc}} によってユーザーが定義した操作に解釈します。 === 必要なファイル === * {{ic|/etc/lirc/lircd.conf.d/foo.conf} - スキャンコード --> キーに変換するシステムレベルの設定。このディレクトリには複数の conf ファイルを入れることができ、それぞれがシステムの各リモートコントローラ・レシーバー固有です。 {{Note|これらはユーザーが作成する設定ファイルであり、パッケージによって直接作られるファイルではありません。}} === 任意のファイル === LIRC を使用するアプリケーションによっては、以下のファイルは任意です。例えば {{Pkg|mplayer}} や {{Pkg|mythtv}} は以下のファイルを使ってキーマップやアクションを定義します。全てのアプリケーションが必要とするわけではありません。例として、{{Pkg|kodi}} は自分の xml ファイルを使ってマッピングを行います。 * {{ic|~/.lircrc}} - プログラムごとの lirc マップ ({{ic|~/.lirc/foo}}, {{ic|~/.lirc/bar}} など) を指定する '''include''' ステートメントを記述するファイル。 * {{ic|~/.lirc/foo}} - キー --> 操作に翻訳するユーザーレベルの設定。各リモコンとアプリケーション foo の固有設定。 ==インストール== [[公式リポジトリ]]にある {{Pkg|lirc}} パッケージを[[インストール]]します。 {{Note|古いリモコンのサポートは公式で上流から落とされています。サポートされていないハードウェアを使用する場合は [[AUR]] のパッケージを検索してモジュールをビルドしてください。}} ==設定== リモコンによっては LIRC がなくても"キーボード"として認識されそのように動作することがあります。このように認識されているとコマンドを二重に実行してしまう可能性があります。シェルやテキストエディタを開いて、リモコンのボタンを押してキーボードとして認識されていないかテストして下さい。文字や数字が打ち込まれたり、物理キーボードの上・下・右・左矢印キーのように動く場合、無効にする必要があります。次に進む前に [[#リモコンがキーボードとして機能する]] を見て下さい。 === LIRC の設定ファイル === LIRC がリモコンを扱えるようにするにはスキャンコードとキーマップの定義が必要です。適当な conf ファイルを {{ic|/etc/lirc/lircd.conf.d}} にコピーすることでマッピングできます。 {{Note|Common configs are provided by {{Pkg|lirc}}, like those bundled with TV cards that can be installed automatically. The primary source of config files is the LIRC homepage. Check the [http://lirc.org/html/table.html official list of supported hardware] to know, which kernel modules and lircd drivers are required.}} ==== 選択肢 1. 上流の設定ファイル ==== 使用するリモコン/レシーバを確認して {{ic|/usr/share/lirc/configs}} に設定済みの設定ファイルが存在しないか見てください。存在したら、デーモンが初期化をできるように、必要な conf を {{ic|/etc/lirc/lircd.conf.d}} にコピーします。 ==== 選択肢 2. ユーザーが作成した設定ファイル ==== Users with unsupported hardware will need to either find a config file someone else has created (i.e. google) or create one. Creating one is fairly straightforward using the included {{ic|/usr/bin/irrecord}} program which guides users along the needed process. If using a detected remote, invoke it like so: irrecord --device=/dev/lirc0 MyRemote The program will ask users to begin hitting keys on the remote in an attempt to learn it. If all goes well, the user will be prompted to map out each key press to a specific scancode LIRC uses to identify that specific key press. The process should take no more than 10 minutes. When finished, save the resulting file to {{ic|/etc/lirc/lircd.conf.d/foo.conf}} and proceed. {{Note|Consider sending the finished config file to the email address mentioned in the program so it can be made available to others.}} == リモコンのテスト == {{ic|lircd.service}} を[[起動]]してブート/シャットダウン時に実行されるように[[有効化]]してください ('''強く推奨''')。 {{ic|/usr/bin/irw}} を使ってリモコンをテストしてください、リモコンのボタンを押した時に LIRC が受信したものを全て標準出力に流します。 例: $ irw 000000037ff07bfe 00 One mceusb 000000037ff07bfd 00 Two mceusb 000000037ff07bfd 01 Two mceusb 000000037ff07bf2 00 Home mceusb 000000037ff07bf2 01 Home mceusb ==プログラムごとの設定 == LIRC has the ability to allow for different programs to use the same keypress and result in unique commands. In other words, mplayer and vlc can respond differently to a given key press. Decide which programs are to use LIRC commands. Common programs include: {{Pkg|mplayer}}, {{Pkg|mythtv}}, {{Pkg|totem}}, {{Pkg|vlc}}, and {{Pkg|kodi}}. {{Note|Kodi は非標準的な方法で LIRC を実装しています。他のプログラムが使用する LIRC の標準ファイルではなく、特別な xml ファイルである {{ic|~/.xbmc/userdata/Lircmap.xml}} を編集する必要があります。Kodi を使用するユーザーは [[Kodi#リモートコントロールの使用]] の記事を読んでください。}} Users should create the expected files showing LIRC where the various program-specific maps reside: $ mkdir ~/.lirc $ touch ~/.lircrc * Populate {{ic|~/.lirc}} with the program specific config files named for each program. Example: $ ls ~/.lirc mplayer mythtv vlc {{Note|Providing an exhaustive listing of keymaps for each program is beyond the scope of this wiki article. Many pre-made files unique to each remote/program are available via googling.}} * Edit {{ic|~/.lircrc}} to contain an '''include''' statement pointing to {{ic|~/.lirc/foo}} and repeat for each program that is to be controlled by LIRC. Example: {{hc|~/.lircrc| include "~/.lirc/mplayer" include "~/.lirc/mythtv" include "~/.lirc/vlc" }} ==トラブルシューティング== === リモコンがキーボードとして機能する === Xorg detects some remotes, such as the Streamzap USB PC Remote, as a Human Interface Device (HID) which means some or all of the keys will show up as key strokes as if entered from the physical keyboard. This behavior will present problems if LIRC is to be used to manage the device. To disable, create the following file and restart X: {{hc|/etc/X11/xorg.conf.d/90-streamzap.conf| Section "InputClass" Identifier "Ignore Streamzap IR" MatchProduct "Streamzap" MatchIsKeyboard "true" Option "Ignore" "true" EndSection}} Don't forget to alter the {{ic|MatchProduct}} property according to one shown in {{ic|Name}} from output of $ cat /proc/bus/input/devices | grep -e IR For example {{ic|WinFast}} for {{ic|<nowiki>N: Name="cx88 IR (WinFast DTV2000 H rev."</nowiki>}} == 参照 == * [http://www.mythtv.org/wiki/Category:Remote_Controls MythTV Wiki:Remotes article] * [http://lirc.org/html/table.html サポートしているハードウェアの公式リスト]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
LIRC
に戻る。
検索
検索
LIRCのソースを表示
話題を追加