Linux MX2xx USB Howto

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
archimede
LCD?
Posts: 5
Joined: Thu Oct 02, 2003 8:59 am

Linux MX2xx USB Howto

Post by archimede »

Matrix Orbital MX2** USB Linux Howto

this Howto Describes how to install MX2xx usb series lcd display.

Since I don't have a working Java environment I cant test the lcdtester yet. So there is no support to my knowledge for the "on-board" fan and temperature sensors.

Many many regards to wayn3 for his patch!!

Step 1: Patching your kernel.


Unfortunately for Linux users, there is no support for the MX2 USB in the default linux kernels. All you get is the default Matrix Orbital screen.
You don't get an entry in /dev/usb/ ... or at least I don't.

You need to be familiar with recompiling your kernel before you proceed here.
You can find many howtos depending on your distribution out there on the net.
I found this patch to work with kernels 2.4.22-ac4 2.6.0-test6 & test7 until bk3

Browse to http://www.webbastards.com/projects/LK2 ... 4-USB.html
and copy and paste the code on that page into a file called for example "lcdpatch.diff"

Now as a superuser patch your kernel with the appropriate command ie:

Code: Select all

cd /usr/src/linux
patch -p1 < /path to patch/lcdpatch.diff
as long as this get this output, ignore other errors:

Code: Select all

Hunk #1 succeeded at 87 with fuzz 2 (offset 70 lines).
When you recompile your kernel make sure you choose

Code: Select all

USB Support----->
	USB Serial Converter Support------>
          < > USB Serial Converter Verbose Debug (DONT Select this!)
          <x> USB Serial Converter Support
          <x> USB Generic Serial Driver
          <x> USB FTDI Single Port Serial Driver
these could be chosen as modules as well i supose.
Now Reboot, and if everything goes well you should see output like this on boot:

Code: Select all

drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
drivers/usb/core/usb.c: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI SIO
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI 8U232AM Compati
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT232BM Compati
drivers/usb/serial/usb-serial.c: USB Serial support registered for USB-UIRT Infrared Re drivers/usb/serial/usb-serial.c: USB Serial support registered for Home-Electronics TIR
drivers/usb/core/usb.c: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.0:USB FTDI Serial Converters Driver
And also

Code: Select all

usbserial 1-3:1.0: FTDI FT232BM Compatible converter detected
usb 1-3: FTDI FT232BM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
may not be exactly the same, the important is to actually get an entry in your /dev/ directory.


Step 2: Installing LCDd (server part of lcdproc)



I've had trouble with different versions of lcdproc but apparently this one works with our display
lcdproc-CVS-stable-0-4-4-20031003
Get this from sourceforge: http://sourceforge.net/projects/lcdproc/
extract the file to a directory, type do "make" and "make install".


You should now have a file called LCDd.conf usually installe in /etc/
You need to change this file to fit your configuration. ie:
make sure the "device=" fits to where your device is installed.
These are the key settings on my device, I suppose they could differ on yours.

Code: Select all

#Driver=none
Driver=MtxOrb
[MtxOrb]
# Matrix Orbital driver
# Select the output device to use [/dev/lcd]
device=/dev/usb/tts/0 
# Set the display size [20x4]
size=20x2
# Switch on the backlight? [yes]
# NOTE: The driver will ignore this if the display
#       is a vfd or vfd as they crash if the backlight
#       is turned off
enablebacklight=yes
# Set the initial contrast [140]
# NOTE: The driver will ignore this if the display
#       is a vfd or vfd as they don't have this feature
contrast=800
# Set the communication speed [19200]
speed=19200
# Set the display type [lcd]
# Possible settings: lcd, lkd, vfd, vkd
type=lcd
# See [input] section for an explanation of the key mappings
PauseKey=L
BackKey=R
ForwardKey=F
MainMenuKey=J
# 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
You may now test the daemon by launching it. It's usually installed in /usr/local/sbin.
./LCDd
Yay you should see some stuff on your display!
ctrl-z to kill it and it should say "Thank You for using lcdproc and linux"

Here is a startup on boot script for the daemon. this depends on your distribution. i'm using Gentoo.

Code: Select all

#/etc/init.d/LCDd
# -i is for silent mode
depend() {
	need net
}

start() {
	ebegin "Starting LCDd"
	start-stop-daemon --start --quiet -m --pidfile /var/run/LCDd.pid \
		--background --exec /usr/local/sbin/LCDd -- -i -s -f -c /etc/LCDd.conf
	sleep 1
	eend $?
}

stop() {
	ebegin "Stopping LCDd"
	start-stop-daemon --stop --quiet --pidfile /var/run/LCDd.pid
	eend $?
}
guess what, when you installed the lcdproc package, it not only installed LCDd but also a couple more clients, especially lcdproc. give it a try. This time lcdproc is in /usr/local/bin/ and its config file is /etc/lcproc.conf.
Adapt the above script to have it start on boot.
Not all screens work, these are the ones i have found to work:
[C]pu [G]raph [T]ime [M]emory [X]load proc_izes ptime [A]bout
With the keys you can cycle forward and backwards the screens, and enter the LCDd options menu (contrast and such ... brightness doesn't work!)

Step 3: Installing other clients for LCDd
I currently am able to work an xmms plugin, a network bandwidth monitor and a cpu sensors screens (from motherboard i2c).

The xmms plugin i found to work immediately is here:
http://linux.bydg.org/~witwili/Programy ... /index.php
its pretty simple and you can probably find a more advanced one on sourceforge.

I'm playing around with lcdnet, a network bandwidth monitor, which was designed for 20*4 displays. I have it working in 20*2 mode, but i still have to clean up some code.
I'm working on my own sensors client (for cpu and fans) because the one i found to work is buggy and written in perl :P

Well I hope this helps other linux users out there!
Cheers.
Last edited by archimede on Thu Oct 16, 2003 5:26 am, edited 1 time in total.

Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Hello...

Thanks for the post...this definitely will help lead people in the right direction. We may have to make this post into a "sticky"!!! :D
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital

archimede
LCD?
Posts: 5
Joined: Thu Oct 02, 2003 8:59 am

Post by archimede »

Hello,
I'm glad for your appreciation, I hope we get many more linux users out there to share their experience with this lcd display.

tux rules!

Basem
LCD?
Posts: 2
Joined: Thu Dec 11, 2003 1:08 am
Location: Jordan

Re: Linux MX2xx USB Howto

Post by Basem »

Hi all
Just to note you don't need any patch for kernel 2.6 I used MX2xx on a 2.6.0-test9 without any patch worked with LCDd as a charm :)

I didn't test with 2.4 kernels.

so for 2.6.x just configure as above and compile and configure LCDd and run ... etc and enjoy :)

Cool 8)

Basem Narmok

AJB2K3
LCD!
Posts: 15
Joined: Sun Jan 15, 2006 2:27 am
Location: Around Here.
Contact:

Re: Linux MX2xx USB Howto

Post by AJB2K3 »

Basem wrote:Hi all
Just to note you don't need any patch for kernel 2.6 I used MX2xx on a 2.6.0-test9 without any patch worked with LCDd as a charm :)

I didn't test with 2.4 kernels.

so for 2.6.x just configure as above and compile and configure LCDd and run ... etc and enjoy :)

Cool 8)

Basem Narmok
I think im running kernal 1.2.10? but its not doing anything and im not getting the /dev/lcd entry.
Im a linux noob, can you offer help?

Post Reply