Author Topic: LG 42LG50 rs232 control  (Read 9193 times)

gdowrey

  • Making baby steps
  • Posts: 3
    • View Profile
LG 42LG50 rs232 control
« 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.

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: LG 42LG50 rs232 control
« Reply #1 on: December 23, 2008, 08:37:51 pm »
http://wiki.linuxmce.org/index.php/LG_42LB5D


Wiki and google are your friend


Tim
My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

Afkpuz

  • Guru
  • ****
  • Posts: 211
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #2 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.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: LG 42LG50 rs232 control
« Reply #3 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
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #4 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?

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #5 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.


Thanks in advance,

regards,

Bulek.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #6 on: January 10, 2009, 05:11:49 pm »
is there a wiki or some instructions somewhere on using a terminal?

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #7 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?

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #8 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
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.
Thanks in advance,

regards,

Bulek.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #9 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.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #10 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.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #11 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...

commsbyte

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #12 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.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #13 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

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: LG 42LG50 rs232 control
« Reply #14 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).
"Change is inevitable. Progress is optional."
-- Anonymous