Linuxで Matrix Orbital (MX202) を表示させる設定
前提条件:
LCDproc というソフトが必要。
kernel 2.6.8以降 / 2.4でもイケるらしい(パッチ必要)
① USBシリアルコンバータドライバの組み込み
kernel 2.6.13 の場合
cd /usr/src/linux
make mrproper
make menuconfig
Device Drivers --->
USB support --->
USB Serial Converter support --->
USB Serial Converter support
[*] USB Generic Serial Driver
USB FTDI Single Port Serial Driver (EXPERIMENTAL)
とし、コンフィグを保存して終了し、カーネルを再構築する。
make
make install
make modules_install
カーネル再構築したら、Linuxを再起動する。
再起動後、ドライバが読まれているか確認する。
dmesg | grep FTDI
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver
ここでは、デバイスが「ttyUSB0」となったことがわかる。
② lcdprocの最新版(unstable/nightly)をダウンロード
http://lcdproc.sourceforge.net/nightly/
③ lcdprocをダウンロード、メイク、インストールする
tar xfj lcdproc-CVS-current.tar.bz2
cd lcdproc-CVS-current-*
./configure --enable-libusb --enable-drivers=all
make
make install
cp LCDd.conf /etc/.
cp scripts/init-LCDd.rpm /etc/rc.d/init.d/lcdd
cp scripts/init-lcdproc.rpm /etc/rc.d/init.d/lcdproc
インストール完了
④ 設定
vi /etc/LCDd.conf
#----------------------------------------------------------------
[server]
Driver=MtxOrb
#----------------------------------------------------------------# 〜中略〜
#----------------------------------------------------------------
## Matrix Orbital driver ##
[MtxOrb]# Select the output device to use [default: /dev/lcd]
device=/dev/ttyUSB0# Set the display size [default: 20x4]
size=20x2# Switch on the backlight? [default: yes]
# NOTE: The driver will ignore this if the display is a vfd or vkd
# as they crash if the backlight is turned off
enablebacklight=yes# Set the initial contrast [default: 140]
# NOTE: The driver will ignore this if the display
# is a vfd or vkd as they don't have this feature
contrast=420# Set the communication speed [default: 19200; legal: 1200, 2400, 9600, 19200]
speed=19200# Set the display type [default: lcd; legal: lcd, lkd, vfd, vkd]
#type=lkd
type=lcd# The following table translate from MtxOrb Key to Logical Key.
# See [input] section for an explanation of the key mappings
# This is a new implementation in 0.5
LeftKey=A
RightKey=B
EnterKey=C
UpKey=D
DownKey=E
EscapeKey=F# You can find out which key of your display sends which
# character by setting keypad_test_mode to yes and running
# LCDd. LCDd will output all characters it receives.
# Afterwards you can modify the settings above and set
# keypad_set_mode to no again.
keypad_test_mode=no
⑤ LCDに表示させる内容の変更
vi /etc/init.d/lcdproc
SCREENS="P G M D T"
にする。
意味は次の通り。
P=SMPでのCPU使用率
G=グラフ表示
M=メモリ消費
D=ディスク消費
T=日時表示
好みで変更してください。
⑥ サービスに登録
chkconfig --add lcdd
chkconfig --add lcdproc
⑦ 起動させてみる
service lcdd start
service lcdproc start
⑧ LCDに表示されればOK
今後の確認事項。
CPU温度の表示。
ファンの回転数。
が表示できるかどうか。