LG TV USB IR-Hack with Arduino

From Openlgtv
Jump to: navigation, search

What you need

  • Hardware:
  1. An Arduino card (http://arduino.cc) (I used a Duemilanove)
  2. A USB cable
  3. A 100Ohm resistor
  4. An IR led emitter
  • Software:
  1. Arduino software (http://arduino.cc/en/Main/Software)
  2. Excellent IR remote library written by Ken Shirriff (http://arcfn.com/files/IRremote.zip)

Wiring things

As described on Ken Shirriff's blog (http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html), you need to connect one led leg through the resistor to pin 3 of the Arduino, and the other leg to Ground.

Arduino-IR-emiter.png

Upload script to Arduino

Next you just need to upload one of those script to the Arduino using the arduino software.

This one send the "EZ Adjust" command:

#include <IRremote.h>

IRsend irsend;

void setup()
{
Serial.begin(9600);
}

void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendNEC(0x20DFDF20, 32); Send EZ Adjust
delay(100);
}
}
}

This one send "In-Start" command:

#include <IRremote.h>
IRsend irsend;

void setup()
{
Serial.begin(9600);
}

void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendNEC(0x20DFFF00, 32); Send IN-Start
delay(100);
}
}
}

Send IR Code

Once a script is uploaded, place you emitter in front of your TV, launch the "Debug panel" (Ctrl + Shift + M), type a char in the send line, then press Send. The signal has been sent, your TV should ask you a password (for next steps, see the original Wiki step 12).

Sources