LinuxMCE Forums

General => Users => Topic started by: gdowrey on December 23, 2008, 05:19:40 am

Title: LG 42LG50 rs232 control
Post by: gdowrey on December 23, 2008, 05:19:40 am
Has anyone developed a device template implimenting control of an LG 42LG50 LCD TV?  It has an rs232 port on the back.
Title: Re: LG 42LG50 rs232 control
Post by: tkmedia on December 23, 2008, 08:37:51 pm
http://wiki.linuxmce.org/index.php/LG_42LB5D


Wiki and google are your friend


Tim
Title: Re: LG 42LG50 rs232 control
Post by: Afkpuz on December 31, 2008, 12:00:03 am
I'm not positive, but I believe that LG has the same protocols for most of it's TVs.  So, you should try using another one of the LG templates to control your TV.  I actually have access to one of these tvs and am going to see if I can get LMCE to control it.  It's just that since I can't permanently use the tv, it hasn't been high on my priorities.
Title: Re: LG 42LG50 rs232 control
Post by: totallymaxed on December 31, 2008, 11:40:05 am
I'm not positive, but I believe that LG has the same protocols for most of it's TVs.  So, you should try using another one of the LG templates to control your TV.  I actually have access to one of these tvs and am going to see if I can get LMCE to control it.  It's just that since I can't permanently use the tv, it hasn't been high on my priorities.

Thats correct all current LG models share the same control codes.

Andrew
Title: Re: LG 42LG50 rs232 control
Post by: krys on January 10, 2009, 07:20:45 am
Hey guys, I followed this wiki as best I could, but i keep getting this in the error log when I try to send command from the admin site.

"Ruby was unable to handle the command in a reasonable amount of time"

This is a new 37LG30. Any clues as to what the problem could be?
Title: Re: LG 42LG50 rs232 control
Post by: bulek on January 10, 2009, 08:40:14 am
Hi,

mybe you have already done this, but I always check everything before from laptop with some rs232 terminal to see it working. Then I start debugging in LMCE, cause it's harder to find error in there.

HTH,
regards,

bulek.


Title: Re: LG 42LG50 rs232 control
Post by: krys on January 10, 2009, 05:11:49 pm
is there a wiki or some instructions somewhere on using a terminal?
Title: Re: LG 42LG50 rs232 control
Post by: krys on January 10, 2009, 05:13:28 pm
oh, and I have two serial ports on the back of this MD, is there an easy way to identify which is sd0 and which is sd1?
Title: Re: LG 42LG50 rs232 control
Post by: bulek on January 10, 2009, 06:45:54 pm
Hi,

I won't be of much help, but will probably help you in another way...

LMCE is just a smart "all under one roof" collection of various open source applications that do their job at best. And when you have problems, you can also search another "application oriented" resources.

For case of rs232, you connect your cable to either your win laptop and search for some programs that will let you to send commands for your tv. And you'll easily see if TV responds...

Under Linux I can't help you much, but if you searched a Wiki a bit you could find this :
http://wiki.linuxmce.org/index.php/Serial_Port_debugging (http://wiki.linuxmce.org/index.php/Serial_Port_debugging)
and also I think there is a utility for serial port testing under LMCE here "/usr/pluto/bin/TestSerialPort" ...

Don't get me wrong, but try to search a bit first....

Regards,

Bulek.
Title: Re: LG 42LG50 rs232 control
Post by: krys on January 10, 2009, 09:24:51 pm
Well i might have found the first of my problems... the manual for the LCD says that I need a crossed cable and using my multimeter I have determined that mine is straight (i think). My pin labeled #2 on one side goes to the one labeled#2 on the other. From what I found on the net, #2 should go to #3 on a crossed cable.
Now I guess I have to order a cable and wait.
Title: Re: LG 42LG50 rs232 control
Post by: krys on January 11, 2009, 12:57:44 am
I bought the proper cable today, but that hasnt improved my results yet. I have been trying to test the serial ports out with minicom on the KDE desktop but having no experience with mini com that is not going well either. Is anyone familiar with this program that could give me some help? I have all the settings configured but when I type my commands nothing happens at the command prompt, is the program supposed to give you any feedback?
I would like to run terminal in windows, but I my windows laptop doesnt have a serial port.
I think this is all probably pointless because I know others have their LG working with LMCE, I have a feeling my problem really lies within the admin site.
Now that I have the new cable when I tried to send a command the log says device not found.
Title: Re: LG 42LG50 rs232 control
Post by: krys on January 19, 2009, 09:44:13 pm
http://wiki.linuxmce.org/index.php/LG_42LB5D


Wiki and google are your friend


Tim

anyone using the internal commands listed on this wiki page, the ones for process initialize etc...
Title: Re: LG 42LG50 rs232 control
Post by: commsbyte on January 22, 2009, 04:01:50 pm
Hi,

I have followed same guide for LG LCD TV. Its pretty good guide.
The learning curve was finding out some codes are slightly different for the LG7000 series TV inputs, need to use xb instead of kb and had to convert the binary to HEX values. Some of the legacy codes still work for inputs 1-6 using kb, but to get the HDMI inputs you really need to use the correct xb command.

Best thing to do is connect your cable and test from the konsole
/usr/pluto/bin/TestSerialPort -p /dev/ttyS0 -P N81 -b 9600 -t "ka 00 01\r"
this should at least power the TV on. and you get a result 01 OK01

Now my problem is it works from konsole, but from LMCE im still getting error
Ruby was unable to handle the command in reasonable amount of time <0x40800950>

I have set the video pipes etc, but MD not powering on TV,

If anyone has suggestion, would appreciate it.
Title: Re: LG 42LG50 rs232 control
Post by: krys on January 22, 2009, 08:48:28 pm
the issue I ran into when I followed the wiki was LMCE did not like a few of the commands (the ones listed under ruby internal commands) and when it tried to initailize the device it would time out. So i ditched those commands, whittled the codes down to the bare minimum, ie got rid of the "log sending" part.
After that my device worked from the orbiter
Title: Re: LG 42LG50 rs232 control
Post by: Zaerc on January 22, 2009, 11:02:39 pm
the issue I ran into when I followed the wiki was LMCE did not like a few of the commands (the ones listed under ruby internal commands) and when it tried to initailize the device it would time out. So i ditched those commands, whittled the codes down to the bare minimum, ie got rid of the "log sending" part.
After that my device worked from the orbiter

Please update the wiki page accordingly (if you haven't done so already of course).