LG TV's IP control

George KrietsepisGeorge Krietsepis Junior MemberPosts: 148

Dear All,
I'm trying to find a way to control LG TV's through IP but I have neither found the related protocol
(not the RS232 one which is very known ) nor a module made from AMX.
Can I ask if anyone of you has ever managed to do something about that? Do you have the IP protocol for the LG's?
I very well know that Crestron and Control4 are able to control such TV's through IP modules.



  • ericmedleyericmedley Senior Member - 3709 Posts Posts: 4,118

    Here's the deal...
    The RS232 and IP protocol are the same. So that's not a problem. But, here's the issues:
    1) not all models support IP control. I have yet to find a comprehensive list to let you know which do and which don't. Appart from just going into the menu of the TV and seeing there's really no way I know of knowing ahead of time.
    2) Some TVs feature their "Web Based" control - which allows you to use a smart phone app to control it. This protocol is closed. There are some TVs that support this feature and then turn of the 3rd Part IP control. Some still do both. Here again - trial and error on models...
    3) Now - if you have a TV that does IP control - it will need an additional power on command. You must send it a Wake On LAN before powering it on. You can eaisly Google how to build the WOL command. I'ts pretty simple. You just need to know the MAC Address of each TV you need to control.

    From then on it works fine.


  • ericmedleyericmedley Senior Member - 3709 Posts Posts: 4,118

    Oh, I forgot. It communicates on ports 9760 for network commands and 9761 for general control. Most commands will use 9761.

  • George KrietsepisGeorge Krietsepis Junior Member Posts: 148

    For my case, both ports ( 9760-9761 ) refuse the connection. There is really a smart phone app to control them but it initially needs a key number to pair with TV's.
    Does this mean that they only use a closed protocol ?

  • Reese JacobsReese Jacobs Junior Member Posts: 329

    As Eric noted, not all LG TVs support IP control. For those models that do support it, IP control is DISABLED by default. You will need to enable IP control. The other vendor products that support IP control describe the IP enabling sequence as follows:

    Use the TV’s IR remote to enter the TVs hidden menu as follows to enable IP control for the TV. Note that the LG Magic Remote can not be used. Instead, a non-magic remote or universal remote with LG TV codes must be used.

    a. Power the TV ON and set the input to an unused source such as CATV.
    b. Wait for the TV to display the “snow” no channel static on the screen and all other menus have disappeared.
    c. Press and hold the Settings button (looks like a gear) on the TVs IR remote until the channel number is displayed on the TV then release the settings button.
    d. Press 828 then the OK button to bring up the hidden IP Control Setup Menu.
    e. Set IP Control to ON.

    NOTE: Entering this menu may be tricky and take a few tries. If the TV you are using does not have this menu then it may not support IP control.

  • fogled@mizzou[email protected] h4x354x0r Posts: 483

    OK, I'm having to get my first one of these LG units set up via IP. I've gotten to the point where I can connect to the TV from the controller, but it won't accept any commands, it just disconnects after a timeout, or as soon as I try to send it a power query command.

    Is there a specific connect sequence like the ESC/VP sequence for epson projectors?

  • fogled@mizzou[email protected] h4x354x0r Posts: 483

    Anyone willing to give me another hint? I can't quite crack it.

    Only port 9761 reports as open on the TV. Using terminal commands, I can connect to that port, but it closes as soon as I try to send anything to it. I can't connect to any other port via telnet command.

    I can specify IP ports 6, 7, 9, 9760, or 9761 in my controller code, and the TV will come online with an IP_CLIENT_OPEN request on any of those ports.

    I can send the special "6 x $FF + 16 MacAddr" to any of those opened ports, either immediately after IP_CLIENT_OPEN, or inside a DATA_EVENT - ONLINE event. I've seen it both ways in examples here, but neither one appears to make any difference.

    I can send pretty much any data to whatever port I open on the TV; the "fw 1 01" WOL command, power on, power off, etc., and the controller-opened port stays open, but won't respond. The only way it seems that I can get the port to close when I've opened it via controller command, is to close it via controller command.

    If anyone is willing to give me any more hints about the process here, I'd appreciate it. I'd rather get the IP connection figured out, but if I can't, I'll convert to RS232 and carry on.

  • nickmnickm Blinky Light Aficionado Posts: 151

    I actually ran in to the same thing with a UK6300PUE model last night. Using any terminal client, I can open a socket to port 9761 on the display, but as soon as I send a byte to the display, the socket is closed. I have a request in to LG support and have received an initial response, but will update when I get more info.

  • fogled@mizzou[email protected] h4x354x0r Posts: 483

    When I turned on the IP control in the hidden menu on mine, a 55UK6090PUA, it lit up a "generate keycode" button. I did that, and have the keycode, and am guessing it's got to be used somehow in an initial handshake. I tried the obvious sending just the keycode, auth:keycode, but kinda ran out of gas from there.

  • fogled@mizzou[email protected] h4x354x0r Posts: 483

    Well darn. I think I'm sunk. This particular model doesn't even have a 3.5mm RS232 port, it's only got USB. The manual states explicitly that the USB version only works when TV power is already on.

  • fogled@mizzou[email protected] h4x354x0r Posts: 483

    LG reps say, "IP Control is Only thru the App" for this model. No discreet 3rd party IP control. I'd need to wireshark the app traffic to reverse engineer the protocol. That's kinda out of scope for this project. It was supposed to be a simple little TV addition to an already existing system. Oh well. Not the TV I would have ordered had I been able to order it myself.

Sign In or Register to comment.