How to build a Fake Remote Control?

General Forum for talking area for D series TVs.
Post Reply

Plenz
Posts: 6
Joined: Mon May 29, 2023 5:58 pm

How to build a Fake Remote Control?

Post by Plenz »

I just bought an old UE32D5700 and try to get into the enhanced service menu.
Well, the page of Rainer Ullrich does not work anymore, and also webarchive.org is useless because from there I only get an outdated version. Perhaps it would work if I set the clock of my PC to 2014, but I am quite sure that any network access will turn the clock back to today, so I didn't try it.
But there are other possibilities.
I tried the IR diode on the 3.5 mm jack - it did not work. And I wonder how it should work. Can it be possible to save a 38,000 Hz signal in a file which can save only 44,100 Samples per second?
OK, let's do it with Arduino. There is an awful long sketch with HTTP and whatwever, but I want to use a cheap Arduino Nano. Only for a few special keys like "3Speed" und "Factory".
But I don't understand which pulses I should create. I opened 3SPEED_from_REMOTE_inv.wav in a WAV editor and compared it with the picture on "Ethernet multi-function Interface" -> "IR frames format". They don't match at all. Why not?
Anyway - I made a screenshot of 3SPEED_from_REMOTE_inv.wav, measured the durations of the pulses and wrote a sketch for my Arduino Nano. I tried it with 36000 Hz, 38000 Hz, and 40000 Hz - no result. The red LED of the TV does not flicker. But is does not flicker either if I use other remote controls. Does it only flicker if it receives a valid Samsung code?
Questions upon questions... sorry!
Plenz
Posts: 6
Joined: Mon May 29, 2023 5:58 pm

Re: How to build a Fake Remote Control?

Post by Plenz »

234 views, zero answers :(

Well - I succeeded now to build a remote control with an Arduino Nano which can send INFO, MENU, MUTE, POWER, 3SPEED, and FACTORY.
I found out that I have to work with 40.000 Hz and for me it is quite logical that the WAV samples don't work. Anyway, the WAV samples gave me the durations of the pulses, and so I succeeded.
If somebody is interested of informations about my hardware and software, please let me know.
User avatar
Byung
Posts: 3
Joined: Tue Feb 27, 2018 4:52 pm

Re: How to build a Fake Remote Control?

Post by Byung »

> 234 views, zero answers :(

Hi Plenz,
I'm interested, hoping you still have the infos after all this time.
Having the sketch and the Nano hookup would be great!
Plenz
Posts: 6
Joined: Mon May 29, 2023 5:58 pm

Re: How to build a Fake Remote Control?

Post by Plenz »

I am sorry, it's too long ago, I don't remember any detail of the hardware. I also don't remember which kind of IR diode I used.
But I still have the program with some German comments, and I think you can figure the hardware out by yourself if you know how Arduino Nano works.

Code: Select all

int LEDi = 4;  // Infrarot-LED
int LEDw = 13; // LED weiß
int IRdelay = 12;    // für 40 kHz (eigentlich 12,5)
int i;
int k;
int m;
int w;
unsigned int d;

int del[]        = {16, 48, 120, 1400};
int allOn[]      = {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int infoOff[]    = {3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1};
int menuOff[]    = {3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1};
int muteOff[]    = {3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
int powerOff[]   = {3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1};
int speed3Off[]  = {3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1};
int factoryOff[] = {3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1};

/////////////////////////////////////////////////////////////////////////////////////////////////

void setup() {
  pinMode(LEDi, OUTPUT);
  pinMode(LEDw, OUTPUT);
  digitalWrite(LEDi, LOW);
  digitalWrite(LEDw, LOW);
  pinMode(5, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  pinMode(7, INPUT_PULLUP);
  pinMode(8, INPUT_PULLUP);
  pinMode(9, INPUT_PULLUP);
  pinMode(10, INPUT_PULLUP);
  
  for (i = 0; i < 34; i++) {
    allOn[i]      = del[allOn[i]];
    infoOff[i]    = del[infoOff[i]];
    menuOff[i]    = del[menuOff[i]];
    muteOff[i]    = del[muteOff[i]];
    powerOff[i]   = del[powerOff[i]];
    speed3Off[i]  = del[speed3Off[i]];
    factoryOff[i] = del[factoryOff[i]];
  }
}


void loop() {
  k = 0;
  if (digitalRead(5)  < 1) {k =  5;}
  if (digitalRead(6)  < 1) {k =  6;}
  if (digitalRead(7)  < 1) {k =  7;}
  if (digitalRead(8)  < 1) {k =  8;}
  if (digitalRead(9)  < 1) {k =  9;}
  if (digitalRead(10) < 1) {k = 10;}
  if (k > 0) {
    for (w = 0; w < 10; w++) {
      sendCode(k);
    }
  }
}


void sendCode(int k) {
  digitalWrite(LEDw, HIGH);
  pulse(infoOff[0], LOW);
  digitalWrite(LEDw, LOW);
  pulse(allOn[0], HIGH);
  if (k == 5) {
    for (i = 1; i < 34; i++) {
      pulse(infoOff[i], LOW);
      pulse(allOn[i], HIGH);
    }
  }
  if (k == 6) {
    for (i = 1; i < 34; i++) {
      pulse(menuOff[i], LOW);
      pulse(allOn[i], HIGH);
    }
  }
  if (k == 7) {
    for (i = 1; i < 34; i++) {
      pulse(muteOff[i], LOW);
      pulse(allOn[i], HIGH);
    }
  }
  if (k == 8) {
    for (i = 1; i < 34; i++) {
      pulse(powerOff[i], LOW);
      pulse(allOn[i], HIGH);
    }
  }
  if (k == 9) {
    for (i = 1; i < 34; i++) {
      pulse(speed3Off[i], LOW);
      pulse(allOn[i], HIGH);
    }
  }
  if (k == 10) {
    for (i = 1; i < 34; i++) {
      pulse(factoryOff[i], LOW);
      pulse(allOn[i], HIGH);
    }
  }
}


void pulse ( int anz, int onoff ) {
  for (int i = 0; i < anz; i++) {
    digitalWrite(LEDi, onoff);
    delayMicroseconds(IRdelay);
    digitalWrite(LEDi, LOW);
    delayMicroseconds(IRdelay);
  }
}
User avatar
Byung
Posts: 3
Joined: Tue Feb 27, 2018 4:52 pm

Re: How to build a Fake Remote Control?

Post by Byung »

Thank you Plenz!

On my side I did build an Arduino ir remore control for Samsung TV
by using an Arduino Uno, a 4 by 4 keypad, and a emmiting ir led,
very cheap to buy on the net.

Here is the code...

ArduinoKeypadIrToSamsungTv.ino

Code: Select all

// from arduino 4 x 4 keypad to arduino uno with ir led to tv samsung
// the goal is to get Extended Service Menu options on a samsung tv
// so need to send, FACTORY and 3SPEED while being in service menu

// you can easily enter Service menu by pressing INFO & FACTORY when the TV is on

// Samsung TV code
// https://github.com/FarInHeight/Samsung-IR-Receiver-on-Bare-Metal-Pi/blob/main/lookup_table.f
// 0xE0E040BF "POWER ON/OFF"     // 0xE0E0F00F "MUTE"          // 0xE0E028D7 "GREEN"
// 0xE0E0807F "SOURCE"           // 0xE0E0D629 "CHANNEL LIST"  // 0xE0E0A857 "YELLOW"
// 0xE0E0D12E "HDMI"             // 0xE0E048B7 "CHANNEL UP"    // 0xE0E06897 "BLUE"
// 0xE0E020DF "ONE"              // 0xE0E008F7 "CHANNEL DOWN"  // 0xE0E0639C "FAMILY STORY"
// 0xE0E0A05F "TWO"              // 0xE0E09E61 "SMART MODE"    // 0xE0E0CE31 "SEARCH"
// 0xE0E0609F "THREE"            // 0xE0E0F20D "GUIDE"         // 0xE0E0F906 "3D"
// 0xE0E010EF "FOUR"             // 0xE0E058A7 "MENU"          // 0xE0E0FC03 "SUPPORT"
// 0xE0E0906F "FIVE"             // 0xE0E0D22D "TOOLS"         // 0xE0E0F10E "D (WHAT IS IT?
// 0xE0E050AF "SIX"              // 0xE0E0F807 "INFO"          // 0xE0E0A45B "AD/SUBT."
// 0xE0E030CF "SEVEN"            // 0xE0E006F9 "UP"            // 0xE0E0A25D "PREVIOUS TRACK
// 0xE0E0B04F "EIGHT"            // 0xE0E08679 "DOWN"          // 0xE0E012ED "NEXT TRACK"
// 0xE0E0708F "NINE"             // 0xE0E0A659 "LEFT"          // 0xE0E0926D "RECORD"
// 0xE0E08877 "ZERO"             // 0xE0E046B9 "RIGHT"         // 0xE0E0E21D "PLAY"
// 0xE0E034CB "TTX/MIX"          // 0xE0E016E9 "OK/ENTER"      // 0xE0E052AD "PAUSE"
// 0xE0E0C837 "PREVIOUS CHANNEL" // 0xE0E0B44B "EXIT"          // 0xE0E0629D "STOP"
// 0xE0E0E01F "VOLUME UP"        // 0xE0E01AE5 "RETURN"
// 0xE0E0D02F "VOLUME DOWN"      // 0xE0E036C9 "RED"
// Samsung FACTORY: E0E0 DC23 NEC-Protocol
// Samsung 3SPEED:  E0E0 3CC3 NEC-Protocol

// ------------------------------------
// Soft Arduino ide 1.8.19
// "nhDuino Uno" Micro-USB 
// Programmer: "ArduinoISP.org" 
// ------------------------------------

// infrared led
// Gnd        
// +5
// IR Out Arduino Uno Pin 3 

// https://docs.arduino.cc/libraries/simplekeypad/
#include <SimpleKeypad.h>
const byte nb_rows = 4;              // four rows
const byte nb_cols = 4;              // four columns
char key_chars[nb_rows][nb_cols] = { // the symbols of the keys
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};
// keep pin 13 free to use LED_BUILTIN
byte rowPins[nb_rows] = {12, 11, 10, 9}; // The pins where the rows are connected
byte colPins[nb_cols] = {8, 7, 6, 5};    // The pins where the columns are connected
SimpleKeypad kp1((char*)key_chars, rowPins, colPins, nb_rows, nb_cols); 

#include <IRLibAll.h> // ir library not sure if url is good: https://github.com/cyborg5/IRLib2/blob/master/IRLib2/IRLibAll.h
IRsend mySender;      // uno pin #2
IRdecode myDecoder;   // create a decoder object 

// ____________________________________________________________________________________

void setup() {
  
  pinMode(LED_BUILTIN, OUTPUT); // initialize the onboard LED pin as an output

  Serial.begin(9600); // for serial monitor

  Serial.println("Setup done: keypad in, ir out"); 
}
// ____________________________________________________________________________________

void loop() {
  char key = kp1.getKey(); // the getKey function scans the keypad every 10 ms and returns a key only one time, when you start pressing it
  if (key) {               // if getKey returned any key
    Serial.println(key);   // it is printed on the serial monitor
    switch(key) { //
      case '1': // INFO                                                                INFO
        digitalWrite(LED_BUILTIN, HIGH);  // turn the led on
        Serial.println("info");
        mySender.send(NEC,0xE0E0F807,20); // send info to samsung tv
        delay(250);
        digitalWrite(LED_BUILTIN, LOW);   // turn the led off 
        break; 
      case '2': // FACTORY                                                             FACTORY
        digitalWrite(LED_BUILTIN, HIGH);  // turn the led on
        Serial.println("FACTORY");
        mySender.send(NEC,0xE0E0DC23,20); // send factory to samsung tv 
        delay(250);
        digitalWrite(LED_BUILTIN, LOW);   // turn the led off 
        break;
      case '3': // 3SPEED                                                              3SPEED
        digitalWrite(LED_BUILTIN, HIGH);  // turn the led on
        Serial.println("3SPEED");
        mySender.send(NEC,0xE0E03CC3,20); // send 3speed to samsung tv
        delay(250);
        digitalWrite(LED_BUILTIN, LOW);   // Turn the led off 
        break;
      case '4': // ON/OFF                                                               ON/OFF 
        digitalWrite(LED_BUILTIN, HIGH);  // turn the led on
        Serial.println("ON/OFF");
        mySender.send(NEC,0xE0E040BF,20); // send on/off to samsung tv
        delay(250);
        digitalWrite(LED_BUILTIN, LOW);   // turn the led off 
        break; 
      default:
        break;
    }  
  }
}
// ____________________________________________________________________________________
// eof

Post Reply

Return to “[D] General”