Your Universal Remote Control Center
RemoteCentral.com
General Pro Remotes Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 32 made on Friday November 22, 2013 at 11:33
Barf
Long Time Member
Joined:
Posts:
August 2013
350
On November 22, 2013 at 01:18, Achin said...
hi, i have buy this hardware [Link: ebay.com]. and i am using Event ghost software with this hardware to get the Pronto directly from remote 
and for power button it is giving me this code 
0000 006E 0000 0024 0159 00AA 0017 0015 0017 003E 0017 0015 0017 0015 0017 0015 0017 0015 0017 0015 0017 0015 0017 0040 0017 0015 0017 0040 0017 0040 0017 003E 0017 0040 0017 0040 0017 003E 0017 0015 0017 003E 0017 0015 0017 0015 0017 0040 0017 0015 0017 0015 0017 0015 0017 003E 0017 0015 0017 003E 0017 0040 0017 0015 0017 0040 0017 0040 0017 003E 0017 05F1 0159 0055 0017 0E9C
having protocol = NEC1, device = 2, obc = 18

If it is NEC1 the third and forth numbers should be 0022 and 0002 respectively. But it is often that a capture gets this wrong.

but the ken shirriff ir library is giving me this hex code 40BF48B7 when i make |wave file using IrpMasters libraray by using this code it is giving me different pronto code this one which one is right ?
HashMap parameters = new HashMap();
 long A = Long.parseLong("40BF48B7",16);
       long D = (A & 0xff000000L) >> 24;
        parameters.put("D", D);
       
        long S = (A & 0x00ff0000L) >> 16;
       parameters.put("S", S);                                           
        
        long F = A & 0xffffL;
       parameters.put("F", F);
            
           
     long F = 0x40BF48B7L;
           
      parameters.put("F", F);
        
        IrSignal irSignal = new IrSignal("IrpProtocols.ini", "nec1", parameters);
     
        System.out.println("raw data "+irSignal);
        System.out.println("Pronto "+irSignal.ccfString());
        
        ModulatedIrSequence modulatedIrSequence = irSignal.toModulatedIrSequence(1);
        Wave wave = new Wave(modulatedIrSequence, 48000, 8, 1, false, false, true, false);
        wave.export(new File("sansuipowerbutton.wav"));

pronto code 
protocol = NEC1, device = 64, obc = 183


0000 006C 0022 0002 015B 00AD 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0041 0016 0016 0016 05F7 015B 0057 0016 0E6C
 

No way! That code does not compile, and when fixed for compiling it, throws a DomainViolationException, which is correct since you are using an invalid valid for F. Shirriff, as pointed out in previous messages, appears to interpret the NEC coding different from the rest of the world, I think 3FG said that he got the bitorder wrong. Taking that into account, the following code works, and produces the same result.


private static HashMap<String,Long> shirriffToNecParameters(long A) {
HashMap<String,Long> parameters = new HashMap<String,Long>();
long D = Long.reverse((A & 0xff000000L) >> 24) >>> 56;
parameters.put("D", D);

long S = Long.reverse((A & 0x00ff0000L) >> 16) >>> 56;
parameters.put("S", S);

long F = Long.reverse((A & 0xff00L) >> 8) >>> 56;
parameters.put("F", F);
return parameters;
}


HashMap<String,Long> parameters = shirriffToNecParameters(0x40BF48B7L);
IrSignal irSignal = new IrSignal("IrpProtocols.ini", "nec1", parameters);

 


Hosting Services by ipHouse