can we transmit raw ir code tru this app?
Could you please elaborate on what you mean exactly by "raw ir code"
Can you show me that code you have in mind?
RAW code from what I understand are code that got learned, see
http://www.remotecentral.com/features/irdisp2.htm
and
http://www.codeproject.com/Articles/6786/C-Remote-Control-using-the-Audio-Port
There are many formats out there the most commonly used is the PRONTO format.
RemoteGate supports only (currently ) pronto format, that is if you find your code(s) on remotecentral or any other place, you can enter/paste it in the DEVICE DB and blast it / link it to UI buttons (activity/remote screen you design yourself).
RemoteGate also supports converting LIRC.CONF remote codes file to PRONTO HEX using
LIRC2XML
see
http://www.bengt-martensson.de/harc/lirc2xml.html
This is done in remotegate transparently by going to LIRC database and search remote that match yours.
So here is how it works in remotegate when blasting pronto raw code to the GS4 blaster:
PRONTO RAW HEX FORMAT SHARP TV POWER OFF
"The first number is always a zero (0000) it indicates that the IR pattern is raw data, which means it was learned. "
0000 006c 0000 0020 000a 0046 000a 001e 000a 001e 000a 001e 000a 001e 000a 001e 000a 0046 000a 0046 000a 001e 000a 0046 000a 001e 000a 001e 000a 001e 000a 0046 000a 001e 000a 06d7 000a 0046 000a 001e 000a 001e 000a 001e 000a 001e 000a 0046 000a 001e 000a 001e 000a 0046 000a 001e 000a 0046 000a 0046 000a 0046 000a 001e 000a 0046 000a 06d7
==>converted from pronto Hex to decimal (see irData bellow )to blast on the GS4
38380,10,70,10,30,10,30,10,30,10,30,10,30,10,70,10,70,10,30,10,70,10,30,10,30,10,30,10,70,10,30,10,1751,10,70,10,30,10,30,10,30,10,30,10,70,10,30,10,30,10,70,10,30,10,70,10,70,10,70,10,30,10,70,10,1751
IF this is what you mean by RAW IR then, sure I could allow passing such code in the DEVICE DB and blast it directly
So I'm currently using this code (credit to IrDude )
https://github.com/rngtng/IrDude/blob/master/src/com/rngtng/irdude/MainActivity.java
protected String hex2dec(String irData) {
List<String> list = new ArrayList<String>(Arrays.asList(irData
.split(" ")));
list.remove(0); // dummy
int frequency = Integer.parseInt(list.remove(0), 16); // frequency
list.remove(0); // seq1
list.remove(0); // seq2
for (int i = 0; i < list.size(); i++) {
list.set(i, Integer.toString(Integer.parseInt(list.get(i), 16)));
}
frequency = (int) (1000000 / (frequency * 0.241246));
list.add(0, Integer.toString(frequency));
irData = "";
for (String s : list) {
irData += s + ",";
}
return irData;
}
I believe also on android 4.4 ( KitKat ) there is now an official API to blast IR CODE , not sure about learning which our GS4 device does not support anyway.
It is possible that the code from IrDude no longer will function on KitKat and app using it would need to update using the official API.
Will see if I update my device to KitKat ( using OMEGA 21 , but like many I’m not a fan of knox …)
If anyone uses android 4.4 and remotegate I would be curious to know if it still works.