iMON LCD patch (v0.3)

Update (May, 2008): with the release of LIRC 0.8.3 you no longer need the LIRC patch. Additionally, the forums are now the place to discuss development/use of the patches (particularly this post, which has the latest installation instructions). There’s plenty of friendly people there who are more than willing to help out.

It’s been a little while since the last update to the drivers, but I wanted to release this new version which has many updates by Christian Leuschen. The biggest feature is support for the output LCDproc command (which lets us control the icons around the outside of the screen!) and also better shutdown support (so you can have it turn on the built-in clock, for example). You can download the patch below (again, the LIRC patch is the same as the original – there’s a bit of work left to do there, but hopefully not much).

lirc-0.8.2-imonlcd-0.1.patch
lcdproc-0.5.2-imonlcd-0.3.patch

As before, the instructions are on the original page, so follow those to install. Here’s a photo of the newer features in action (sorry, it’s hard to take a photo of an LCD screen at the best of times, and this is at night time to boot…)

iMON LCD

What’s Left?

Now, the LIRC and LCDproc patches are almost done. I believe all the features that are required are already there, there’s just a bit of tidying up to do. Once that’s done, I’ll be submitting the patches to be included in the CVS of the respective projects. Now, I don’t think there’ll be a problem with the LCDproc patch, but from what I see, LIRC is undergoing some major changes to get the kernel-mode components included in the kernel, so we’ll see how we go there.

As for the screen itself, it “mostly” works now with whatever LCDproc client you throw at it (be it lcdproc itself, or mythlcdserver, etc). The only problem is that these clients do not understand any of the output support present in the driver, so they are unable to drive to the icons on the screen.

But the icons are, in my opinion, one of the best features of the screen! So we’ve got to do something about that! I believe Christian mentioned he’d patched VDR to (I assume) make use of the icons, which is great, but it doesn’t help those of us running MythTV :) so I’m kind of undecided how to go.

Should I patch mythlcdserver to include support for the iMON’s icons? Or should I write a totally new client which just controls the icons?

The advantage of the first is that, once you install the latest version of everything, it’ll Just WorkTM. It’s also quite a bit simpler for me to create a patch for an existing project than to start a whole new project! The disadvantage is that it would mean mythlcdserver will now include iMON-specific code, when most people won’t even have an iMON LCD. I guess that’s more of a philosophical question than anything, and you could always control it via a --enable-* option or something.

The advantage of the second option is that it’ll work no matter what PVR software you run, or even if you just use lcdproc (though we’d need to have some special code there to query your PVR software for when it’s watching TV vs a DVD, etc – so maybe that’s not such a big advantage at all, really). The disadvantage is that it’s an extra step for people with the device to install. Additionally, as I mentioned before, I’m quite new at all this Linux stuff and I’ve certainly never started a whole new project before, so I wouldn’t know where to begin…

In the end, I think that patching mythlcdserver would be the most beneficial for most people. Does anyone have thoughts on this? I’m hoping to get started on this patch over the next few weeks…

Anyway, I hope you all enjoy the patch, and please head over to the forums if you have any comments, questions, or suggestions!

Comments, Trackbacks, Pingbacks:

Permalink soehest [Visitor] Email · http://eth0.dk · Thu 27-Sep-2007 07:13
I vote for the second option as i don't use the mythlcdserver, or has any plans to do so. I would like to be able to send custom text from eg. perl or bash script to the display using as few resources as possible :-) cat "hello" > /dev/lcd would be perfect for me, but guess that is not possible, so i would like to see a new client :-) Thanx for your great effort for the linux community in making this happen!

Regards
Daniel
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Thu 27-Sep-2007 14:04
soehest: I would have liked to be able to support cat "hello" > /dev/lcd0 as well, but the device does not have an ASCII protocol. Much of the code in the LCDproc driver is basically for converting text strings into bitmaps and sending them to the device. I wouldn't feel comfortable moving that code into the kernel to support the cat "hello" > /dev/lcd0 usage...

Mind you, there's no reason why someone couldn't implement something similar if they really felt it was nessecary. ;) Also, over on the forums, Christian mentioned some technical reasons why it's not easy to have more than one client anyway, so it looks like putting the code into mythlcdserver is going to be the way to go anyway.
Permalink Jose [Visitor] Email · Thu 27-Sep-2007 17:54

It would be great to see mythlcdserver using the Imon LCD since I use MythTV and I plan to a new Silverstone GD01-MX for that purpose.
Dean, really, big thanks for the effort you placed in developing the support for the LCD.
Permalink Mike Alexander [Visitor] · Sun 30-Sep-2007 11:23
Dean -- fantastic! I spent one night of frustration thinking I'd lost my mind after following your instructions on my MythTV system so I'll add the single pointer that if you ALREADY HAVE a lirc_imon module for the kernel to load and it's NOT in the same place as the 'make install' goes to put it, you can get into a situation where everything looks like it should be working, but the display never changes.

For documentation's sake, I'm using the Antec Fusion Black case with a PVR card and running MythDora 4 with updated mythtv to get at SD.

To answer your Q - I like the idea of patching mythlcdserver, but it might be interesting to see what the broader myth community thinks (specifically, will they take it?) I've not looked at that code at all so I don't know how many "options" it might have.

Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Sun 30-Sep-2007 20:16
Mike: good point, thanks for that.

After a bit of investigation, I believe a patch for mythlcdserver would be required anyway. The current behaviour for mythlcdserver is that it outputs a mask of the tuners that are currently recording via the "output" LCDproc command (which I'm not sure why it does that, "output" is very device-specific). So I'd *at least* need to disable that in order to get anything else working. I figure I may as well do the rest at that point as well...
Permalink busta [Visitor] Email · Tue 02-Oct-2007 03:54
hi and thanks!

i have the 'antec fusion black', and i run VDR on debian 4.0 i386. The LCD is working, but after it has been running for a day or two, it freezes and the logs get fills up with this:

kernel: /root/lirc-0.8.2/drivers/lirc_imon/lirc_imon.c: send_packet: packet tx failed (-32)

Also the IR isn't working. I haven't had the time to investigate further, but i will do that and send more debug-info. Just wanted to let you know.
Permalink Xe Yieang [Visitor] Email · Tue 02-Oct-2007 04:21
> Mike Alexander:
>
> if you ALREADY HAVE a lirc_imon module for the kernel to load and it's NOT
> in the same place as the 'make install' goes to put it, you can get into a
> situation where everything looks like it should be working, but the display
> never changes.

I also have Antec Fusion Black ... I have hopefully the same problem, but I do not really understand your comment. You mean, if I have unpatched lirc_imon and it might happen that patched imon_lirc does not overwrite the old unpatched version?

thanks
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Tue 02-Oct-2007 10:21
busta: if you look on the forums (http://codeka.com/forums/viewtopic.php?f=3&t=4), you're not the only one with that problem. I am fairly sure it's a hardware fault, but in that post I also linked to a new imonlcd.c file that will automatically reset the connection when it starts to get those errors. Hopefully that'll fix your problems as well...

Xe Yieang: From what I can see from your other comments, you've got the right LIRC patch in place. About the only thing I can suggest at this point would be to try and get your hands on a Windows box and plug the screen in there to see if works... not sure what that means if it does work, though..!
Permalink busta [Visitor] Email · Tue 02-Oct-2007 20:47
dean: thanks man! sorry, i didn't even look in forums, will do!
Permalink S!XEr [Visitor] Email · Wed 03-Oct-2007 03:16
>i have the 'antec fusion black', and i run VDR on debian 4.0 i386. The LCD is working, but after it has been >unning for a day or two, it freezes and the logs get fills up with this:

>kernel: /root/lirc-0.8.2/drivers/lirc_imon/lirc_imon.c: send_packet: packet tx failed (-32)

>Also the IR isn't working. I haven't had the time to investigate further, but i will do that and send more >debug-info. Just wanted to let you know.

Hallo,
same problem here with a antec fusion v2 black.
display works sometime and then comes the error

ir doesnt work, the device receives no signal from remote control

Permalink S!XEr [Visitor] Email · Wed 03-Oct-2007 03:22
hello,
same problem like busta with a antec fusion v2 black.
ir doesnt work,no signals recives from a remote control, the knob on the case works.
Permalink Mike Alexander [Visitor] Email · Fri 05-Oct-2007 12:41
Xe Yieang: My situation was that I had installed mythdora which provided an lirc_imon module (unpatched for the Fusion Black's particular display and following Dean's instructions resulted in me creating the appropriate kernel module.. However, initially I was telling it to modprobe lirc_imon and it was picking up the shipped with MythDora one vs. the one i'd just built and installed. I could have realized this if I was explicitly loading the module using insmod, but I wasn't that smart.

By these instructions the kernel module gets dropped (on my system at least) in the [kernel_lib]/misc directory and the one that modprobe loads is in [kernel_lib]/drivers/lirc directory. As I'm the only one doing anything with this test installation, I just backed up the one modprobe was finding and put a copy of my newly patched module there. Next time I did modprobe it loaded the right one and all of a sudden things started working right.

Hope that helps.
Permalink sebrock [Visitor] Email · Sun 14-Oct-2007 04:01
I would go for a patching of mythlcdserver. Would simply be great for us that uses this LCD. I'm thinking the Silverstone ML02 would be THE killer frontend for MythTV!

Great stuff anyway Dean! Keep up the good work!
Permalink Andy [Visitor] Email · Fri 26-Oct-2007 21:38
Great work on the patch, appears to work fine on my Fusion Black v2 - with one odd problem.
When LCDd starts on my machine, the load average steadily rises to 1 and then stays there. Top doesnt show anything using loads of CPU, and the machine is still responsive, its just a bit wierd!

Any suggestions on how I can keep the load average reporting sensible? Anyone know what causes this?

Other than that, does anyone know how to make the bottom line of the network stats screen in LCDproc scroll? It scrolls the top line, but the one containing the speed only shows the upload speed because download is off the right of the screen. Maybe this is related to the set screen size? (i got the floating point error until i #ed out the size line)

Thanks again for some great work!
Permalink Lofty [Visitor] Email · Wed 31-Oct-2007 00:43
Just a quick note to say thanks for all your work.. Minimyth has jus added support for this LCD and it looks great! Thanks again.
Permalink pejcao [Visitor] Email · Fri 02-Nov-2007 13:32
Hi,
Seems funny to me that someone who sais "I’m quite new at all this Linux stuff" actually makes "THE" patch long awaited for many! ;)
Does your work also adds/fixes functionality over the older VDFs or Lirc's PAD?...or is this "older" stuff considered closed/stable by the venky dude?

Nice work man! You are the "quite new" tux's little helper ;)
Permalink Mekare [Visitor] Email · Sat 03-Nov-2007 12:42
It work on ubuntu Gutsy Gibbon, and a Antec Fusion Black ! Very good !
I had to comment the line "Size=16x2" to get it work and I had to put Contrast=100 in LCDd.conf to view what is written on screen.

But I've got a problem with french characters like é, è, à... they are not displayed while I use the lcd plugin for Freevo. Do you know where is the problem from ?

Other thing, I have done Ubuntu Gutsy Gibbon packages for i386, you can download them from : http://www.jaulent.fr/imonlcd/
Warning : this package were done with checkinstall, and with default install directory. Then it's like if you compil from source but without braking your apt database (there is no /etc/init.d/lircd and /etc/init.d/LCDd)

Bye
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Sat 03-Nov-2007 20:35
Mekare: I haven't written support for extended latin characters yet, due to some problems with encoding and so on. I hope to work on that and get it working in the future, though :-)
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Sat 03-Nov-2007 20:37
pejcao: Well, programming in general is not problem for me; it's just Linux that I'm new to!

I have not changed any of the features of the other VFDs/remotes, since I don't have any hardware to test with :-)
Permalink Mekare [Visitor] Email · Sat 03-Nov-2007 21:49
I forget to tell for those who want to use my package : they are for kernel "Linux version 2.6.22-14-generic", you can verify your one by typing cat /proc/version
I hope I will do a HowTo in french too for those who do not speak english, soon on http://www.jaulent.fr/wiki/index.php?title=Freevo

Bye
Permalink seb [Visitor] Email · Sat 01-Dec-2007 02:53
How is the development going. I really wish I could contribute in any way. I'm so eager for something to patch the mythlcdserver with. :D Would love to see those icons running on my ML02
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Mon 03-Dec-2007 08:59
Actually, I'm on holidays at the moment, but I plan to get back to it when I come home. I think the first step will probably be to get the current patches included into CVS for LIRC and LCDproc. Once that's done, we can look at mythlcdserver -- though from my initial investigation, it looks like there's plenty of changes that'll need to happen, which is rather unfortunate...
Permalink steve [Visitor] Email · Fri 14-Dec-2007 14:54
hi folks,
I downloaded and install the debian packages from Mekare above.
I am running gutsy with the same kernel so I though life would be swell.
however when I run the LCDd I get:
/home/azazel/Install/lirc-0.8.2/drivers/lirc_imon/lirc_imon.c: lcd_write: invalid payload size: 32 (expecting 8)
every 1/10th of a second. in dmesg and /var/log/syslog
also when I try lcdproc I dont get anything on the lcd.
any thoughts?

thanks much.
Permalink steve [Visitor] Email · Sat 15-Dec-2007 10:01
followup to my previous problem of the dmesg output.
so I just grabbed the source for the 2 software packages and
your 2 patchs and did things the old fashioned way. I compiled it.
which helped greatly. the things works perfectly.
mythlcdserver also works perfectly (aside from icons).
thanks
Permalink Harry Waye [Visitor] Email · Sat 15-Dec-2007 20:23
Would be nice to see this merged with the kernel tree. Any plans for this? Also, do you know if the imon pad patches are in the kernel?
Permalink seb [Visitor] Email · Sun 16-Dec-2007 01:03
Oh, well enjoy them holidays then!

I just wonder, in what way are LCDproc and LIRC connected? I dont understand why both needs patching?
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Mon 17-Dec-2007 08:29
The connection comes because LIRC provides the kernel modules that LCDproc needs to communicate with the device. I could have release the kernel module separately, but a) that'd be a lot more work, and b) you need LIRC anyway to get the IR receiver working, so it seemed like the best idea to just integrate the required changes into LIRC.

On another note, I'm back from holidays now, and I'm hoping to get this code integrated with the main LCDproc/LIRC releases. As for getting the kernel modules integrated into the Linux kernel itself, that's something that the LIRC people are working on and I'm personally going to leave it to them, since I got no clue as to how to start with that :-)
Permalink seb [Visitor] Email · Tue 18-Dec-2007 01:41
Welcome back! Hope things are well and so forth... any plans on a server for the icons with myth?
Permalink seb [Visitor] Email · Tue 18-Dec-2007 01:42
Right, I'm stupid. I forgot to ask what I was supposed to ask in the first place. The LIRC patch, is it working on the iMON PAD? As I have had some trouble in getting the actual PAD to work as LEFT/RIGHT/UP/DOWN functions?
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Tue 18-Dec-2007 09:30
I've never tried it with the iMON PAD remote. I assume it works, though, because it seems to work with the older drivers (see the URL I'm pasting at the bottom).

As for the icons, they're actually going to be tougher than I first thought. mythlcdserver (which drives the LCD from MythTV) does not actually get enough information from MythTV in order to display the icons. I'd have to make fairly extensive changes all over MythTV in order to communicate the required information to mythlcdserver. So I'm not sure what'll happen there...

In the meantime, my priority for now is to get the patches included in the main source for LIRC and LCDproc. We can work from there.

[http://www.mythtv.org/wiki/index.php/Imon#iMON_PAD_Remote_Control]
Permalink Basile Starynkevitch [Visitor] Email · http://starynkevitch.net/Basile/ · Sat 22-Dec-2007 00:37
Hello All,

I am quite fluent with Linux

I just built a Mozart SZ thermaltake box with AMD64 BE 2350 on ASUS M2N-MX SE motherboard (microATX) running Debian/lenny (=testing) AMD64 (I also tried Ubuntu 7.10 AMD64).

It does not have a LCD mini screen, but a VFD one, with a USB port.

lsusb gives
Bus 002 Device 004: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller


I patched and compiled both lirc & lcdproc as suggested.

I understood that I should use the imon (not imonlcd) driver.

Permalink Adrian Saul [Visitor] Email · Sat 22-Dec-2007 22:03
Thanks for these patches! I got it to work on my silverstone GD01-MX without any hassle at all.
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Sat 29-Dec-2007 14:11
Basile: I believe you are correct. Unpatched LIRC/LCDproc should be all that is required for you.
Permalink sebrock [Visitor] Email · Sun 30-Dec-2007 20:24
Hi again,

are you sure that the mythlcdserver does not provide the information. I thougt it was pretty verbose, however I have not yet looked into it. Could you post a list of the actual triggers that you need and I'll have a look at it. If its not to much hassle. Happy holidays anyway!

Regards
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Mon 31-Dec-2007 06:50
I could possibly do a couple of the icons, but we don't get enough information to know when it's playing a recording vs. Live TV vs. a DVD vs. a video file, etc. That's the sort of stuff I'd be looking for.

Basically, the way mythlcdserver works is MythTV just passes it the text to display, an option progress indicator and so on.

Anyway, I'm just in the process of getting the code tidied up a bit so that I can submit the patches to LCDproc and LIRC. Once it's in CVS, I can look at mythlcdserver...
Permalink Stefan Frank [Visitor] · Sun 13-Jan-2008 23:18
Hi, i just set up Ubuntu Gutsy Gibbon AMD64 on my new htpc and had some troubles creating a patched lcdproc package.

After patching Makefile.in and disabling the irman driver it all worked.
I didn't create a patched lirc package but simply replaced lirc_imon with a locally compiled one (for Ubuntu Kernel 2.6.22-14-generic)

The lcdproc package & lirc_imon kernel module are available at http://sfr.mythwiki.de/ubuntu/gutsy/

Bye, Stefan
Permalink Tomas Hektor [Visitor] Email · Wed 20-Feb-2008 03:39
Hi

I just tried to install the drivers to the imonlcd on my Antec Fusion Black. I run a mythbuntu 7.10 os. I followed the instructions on the v0.1-page and everything seemed to work. But when i try the command
~/lcdproc-0.5.2$ sudo LCDd -f -r 4
the terminal displays something like:
Could not open driver module /usr/local/lib/lcdproc/imonlcd.se: /usr/local/lib/lcdproc/imonlcd.se: cannot open shared object file: No such file or directory.

A quick check in /usr/local/lib/lcdproc/ indeed shows that the file does not exist. What could I have done wrong? I have the build-essential automake and autoconf packages installed.

bye
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Thu 21-Feb-2008 12:38
Tomas: Please check out the instructions on the forums, they're kept more up-to-date and accurate: http://codeka.com/forums/viewtopic.php?f=3&t=22
Permalink Cliff [Visitor] Email · Fri 14-Mar-2008 02:42
I'm running Mythbuntu 7.10 and have an Antec 430 Fusion Black. I ended up figuring how to get the IR part running including the Volume control knobs using the default lirc-0.8.2 installed in Mythbuntu. If you configure your own lircd.conf file with the irrecord tool you can also spin the knob in each direction per button recording. It detects the knob turning like pressing in button on the remote. I've posted this setup bit for Mythbuntu 7.10 on the ubuntu forum.

http://ubuntuforums.org/showthread.php?t=723003

Hope this helps. I still haven't gotten the LCD to work yet though. I might give this LCD patch one more try first.

Cheers!
Permalink Zugol [Visitor] Email · Fri 11-Apr-2008 04:21
Hi,

I own a Silverstone LC16 (15c2:ffdc) and i only have 8 digits working with "sometimes" scrolling text (unable to read what). I have an error message "invalid display size"...

Any idea ?

Thanks & regards,

Zugol
(...and sorry for my English !)

Permalink Ryan [Visitor] Email · Tue 06-May-2008 02:53
It's now May and I'm wondering if the steam has run out of this project or if progress is still being made. I am very glad to have found this since my LCD has been blank for over a year. I thought that nobody was working on this and only did a google search by chance.

Anyway, I'd appreciate an update.
Permalink Doug [Visitor] Email · Fri 23-May-2008 22:46
Hi All,
Looks like lirc 0.8.3 has a working is_lcd option for lirc_imon so you just have to
load via "modprobe lirc_imon is_lcd=1" to get the lcd version of the driver working.

No need to patch.

Cheers,

Doug
Permalink Dean Harding [Member] Email · http://codeka.com/blogs · Wed 28-May-2008 10:40
Hi guys, I've updated the post with a pointer to the forums. That's where most of the discussion is happening now. I'm going to close comments on these posts, because all new discussion should be happening on the forums, where there are plenty more people willing to help you out. Thanks for the support!

Trackback address for this post:

http://codeka.com/blogs/htsrv/trackback.php/218

Comments are closed for this post.