1

I want to try to open my (old) car (who have an IR receptor) with a simple app.

On the electronic board in the key I have a paper with a code (Exemple : 06495 167.5 ) I think that the code in this exemple is only 06495, based on this source : http://farancullas.blogspot.fr/2012/10/recodificacion-receptor-infrarojo.html

On android you have to send a HEX code converted to dec ? This is a part of my code (working because no exeption, and blue led on my note 3).

I Just need some help to proper format the IR_CODE variable. I can send any string it seems to work because the led is flashing. Have you and idea to format this code ? I think It's something like hex2dec("195F") ? 195F is 6495 in hex

It can be : IR_CODE=hex2dec(Integer.toHexString(Integer.decode(IR_CODE))); Based on this source : https://github.com/rngtng/IrDude/blob/master/src/com/rngtng/irdude/MainActivity.java , but I'm not sure, and I can't test the app too much.

String IR_CODE="06495";
Class irClass = irService.getClass();
Class params[] = new Class[1];
params[0] = String.class;
try {
    Method sendIR = irClass.getMethod("write_irsend", params);

for(int i=0;i<2;i++)
    sendIR.invoke(irService, IR_CODE);
}

Can you help me to format IR_CODE ? Thank you !

neoteknic
  • 1,930
  • 16
  • 32
  • I don't believe you will be able to do this without knowing the actual encoding format utilized by the keyless entry system, either from documentation or by "recording" it with something. Are you sure it is even IR and not RF? – Chris Stratton Feb 26 '14 at 20:05
  • It's IR. This is some doc : http://johnjohn1.free.fr/Citroen_ZX/Philips_plip_IR/OM1058_plip_IR/OM1058.pdf you can find how to program this kind or chip here : http://laurent.deschamps.free.fr/plip/plip.htm You have a 5 digit code + 3 digit/letters code. I just have to translate this to IR HEX code and it's done. There is no good documentation to do that, so I think it's not really possible without a "IR HEX code learner" device. – neoteknic Feb 27 '14 at 12:34
  • I dont have the HTC one, it have an IR receptor, maybe it's possible to find a cheap USB IR learner ? I could use it to get the codes for every devices (cars(old cars because new one have RF key), toys, robot cleaner, etc ... – neoteknic Feb 27 '14 at 12:47
  • Try the answer from this question: http://stackoverflow.com/a/28934938/1042362 – Dwebtron May 22 '15 at 20:16

1 Answers1

1

Actually, its not that easy. The "IR HEX" its NOT an HEX number its a STRING of several hex values which encodes the frequeancy and a ON/OFF pattern,

So, your "06495" example, its minigless, you had to get an IR learning device to know the actual IR pattern.

I use an IR TOY as hardware and AnalysIR as software, this give you the "IR HEX" of any IR blaster (like in your remote).

Then, with the "IR HEX" string, you can use the hex2dec function.