LCDd causes "lcd_write: send packet failed!" errors in syslog
#1
I have an Antec Fusion Max Remote case, in which I have an AMD AM2 Athlon 64 X2 6000+ CPU, on a M3A/H-HDMI Mobo. It's running Ubuntu 8.04 LTS, fully patched. I've been struggling with the remote control and the LCD, and I'm pretty much stuck with the LCD

After what seems like hundreds of rebuilds and different software combinations, I found

http://forum.xbmc.org/showthread.php?tid=40290

which showed a way forward using a mixture of older code and Ron Fraziers patches that worked, and for the last few weeks I have had a fully functional lirc using the RM200 remote control. Result! In my set-up, there are two lirc devices, two lirc configuration files, but everything works just fine.

However, using the information at the URL above I have been working on getting the LCD working. No problems with direct writes or screen-clears of the LCD, so the hardware seems OK, and when I follow the steps to install and configure the software, it all seems to go according to plan.

However, once the software is installed, things start to go wrong. The problem seems to start right at the point when I start LCDd. To get a decent amount of debug info, I start it with the following command:

"LCDd -f -r 6"

And get the following:

"LCDd 0.5.2, LCDproc Protocol 0.3
Part of the LCDproc suite
Copyright © 1998-2007 William Ferrell, Scott Scriven
and many other contributors

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

imonlcd: sending command: 8800000000000040"

At this point the program appears to hang, but when "tail"ing syslog (tail -f /var/log/syslog) I see the following start immediately I issue the LCDd command:

Mar 17 19:48:47 BlakesTV kernel: [ 1468.321191]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c: VFD port opened Mar 17 19:48:47 BlakesTV kernel: [ 1468.366494]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
send_packet: packet tx failed(-32)
Mar 17 19:48:47 BlakesTV kernel: [ 1468.366500]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
lcd_write: send packet failed!
Mar 17 19:48:47 BlakesTV kernel: [ 1468.378448]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
send_packet: packet tx failed(-32)
Mar 17 19:48:47 BlakesTV kernel: [ 1468.378452]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
lcd_write: send packet failed!
Mar 17 19:48:47 BlakesTV kernel: [ 1468.384425]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
send_packet: packet tx failed(-32)
Mar 17 19:48:47 BlakesTV kernel: [ 1468.384429]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
lcd_write: send packet failed!

<<Repeated lines deleted>>

Mar 17 19:48:59 BlakesTV kernel: [ 1480.204756]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
send_packet: packet tx failed(-32)
Mar 17 19:48:59 BlakesTV kernel: [ 1480.204761]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
lcd_write: send packet failed!
Mar 17 19:48:59 BlakesTV kernel: [ 1480.210732]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
send_packet: packet tx failed(-32)
Mar 17 19:48:59 BlakesTV kernel: [ 1480.210737]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c:
lcd_write: send packet failed!
Mar 17 19:48:59 BlakesTV kernel: [ 1480.214717]
/var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c: VFD port closed

The last entry, VFD port closed, corresponds with me hitting <cntl-C> to get out of LCDd

This is before I try to start lcdproc, so I think its an issue with the interaction of the LCDd process with the iMON LCD hardware. When I start lcdproc, it seems to interact with LCDd OK, but because of the issues above, nothing ever appears on the screen.

I also tried

"chmod 777 /dev/lcd0"

and

"LCDd -f -r 4"

But it made no difference Sad

So, in summary, lcdproc patches and installs without error, LCDd starts OK, but then, on what I believe to be an initialising write to clear the LCD, it fails and hangs up the whole LCDd process

Any help on this one would be appreciated!

Thanks

Jim
Reply
#2
lcdproc sends the packets too fast. I had the same issue. You have to edit the file server/drivers/imonlcd.c of the lcdproc daemon.

Change the function send_byte_data() from:
Code:
static void send_byte_data(unsigned char data[], int fd)
{
    write(fd, data, 8);
}

to:
Code:
static void send_byte_data(unsigned char data[], int fd)
{
    write(fd, data, 8);
    usleep(2000);
}

and recompile the daemon. If you still get the error, increase the delay.

Temar
Reply
#3
Smile 
At Last!!!....HAHAHAHA (that's maniac laughter, in case you wondered!) I have had this case and the accompanying remote and LCD since November last year, and have been fighting with it all this time, and now you, Temar, have given me the last piece of the jigsaw....Damn! That feels good!

I now have a working LCD and Remote. The rest of the build is old ground, so should present no serious challenges (where have you heard that before?), so Thank you once again Temar, you Rock!

Jim
Reply

Logout Mark Read Team Forum Stats Members Help
LCDd causes "lcd_write: send packet failed!" errors in syslog0