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

Login:
Pass:
 
 

Page 3 of 3
Topic:
Convert Short Hex IR Codes to Pronto Compatible Hex Codes
This thread has 31 replies. Displaying posts 31 through 32.
OP | Post 31 made on Friday November 22, 2013 at 01:18
Achin
Long Time Member
Joined:
Posts:
August 2013
32
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
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
 
Post 32 made on Friday November 22, 2013 at 11:33
Barf
Long Time Member
Joined:
Posts:
August 2013
300
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);

 
Page 3 of 3

Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse