I am working on universal remote, i have 40BF30CF IR CODE now please anyone guide me how can I convert that IR code into Pronto hex code in JAVA as the Yamaha Pronto IR Hex Converter converts.in this link [Link: dl.dropboxusercontent.com] for example I put the above IR code into box and click on generates button then i got the Pronto hex code as output I have Pronto Hex Code And I want to convert the above into wave file to and after converting I also want to play the wave file with Medial player and i have device which generates the signal when i connect that to my android phone on 3.5mm jack
First of all, there is no such thing as "short hex ir codes". (Actually, there is, but it is something completely different.) You are likely using the Shirriff library for Arduino, which, if I understand things correctly, provides a something like a partial decode for NEC1 signals and others. This may not be the best place to ask for support for Shiiiff's library... I plan to look into it in the near future. If so, you can use IrMaster (or IrpMaster, from the command line or through Java API), using the protocol nec1-f16: first 8bits for D, next 8 for S, the rest (16) for F; do not forget to prefix the hexadecimal numbers by "0x". Assuming this, the given number corresponds to
hi, thanks for your help, that really helps me, first i will tell you about my hardware you can check this link [Link: righto.com] and to use this we have to download the software also , when i press the any button of my TV this will capture the signal genertaed by the TV remote and on the serial monitor(software for the hardware i'm using) it gives me some hex value like 40BF58A7 and from Yamaha Pronto IR Hex Converter you can check this link [Link: dl.dropboxusercontent.com] i will put that hex value into the box and click the generate button and it gives me Pronto hex code and from, that Pronto hex code i will make a wave file from using your code and when i play that wave file from my mobile which is having a device connected to 3.5 mm jack that will generates the signal and the signal is captured by the serial monitor of arduino but not working on my TV for eg i press the menu button of my sansui tv in front of my device and that gives me this value 40BF30CF and i put this value into Yamaha Pronto IR Hex Converter that gives me the Pronto hex code of this value and using this value i have generates a wav file using your code but when i play this wav file from my mobile (having device which generates the signal) that did not work for my TV , i mean the menu is not opening from this value 40BF30CF , it gives me the following Pronto hex code 0000 006D 0022 0002 0155 00AA 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0040 0015 0040 0015 0040 0015 0015 0015 0040 0015 05ED 0155 0055 0015 0E47 and i have created a wave file from this code try {
}catch(IrpMasterException ex) { Logger.getLogger(IrpMaster.class.getName()).log(Level.SEVERE, null, ex.toString()); } and when i play this from my mobile i did not work and it did not open yhe menu but it is detectable by my hardware i'm using
When using the Yamaha Pronto IR Hex Converter, it is necessary to put a space between the first 2 bytes and the second 2 bytes. Use 40BF 30CF instead of 40BF30CF. The Pronto Hex you generated using 40BF30CF decodes as 0x000080DD, and of course it doesn't work.
It is far better to use instead IrMaster, because it gives you the facility to enter the above bytes and to then decode the generated Pronto Hex to see if it is reasonable. Select NEC1, enter 0x40 into the D field and 0x30 into the F field. leaving S blank. 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 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 05F7 015B 0057 0016 0E6C
We don't need to enter the BF or CF into IrMaster. Note that in your decode 40 and BF add to FF, and 30 and CF add to FF. That's a characteristic of the simplest form of NEC, so IrMaster can calculate the BF and CF values. We ususally describe this as NEC1 device 64, function 48. If the first two bytes don't add to 0xFF, then enter the first byte into D and the second byte into S. Finally if the 3rd and 4th bytes don't add to 0xFF, use NEC1-f16 as Barf described above. Of course you can always use NEC1-f16 if you don't mind typing in all 4 bytes.
thanks for reply, i will explain a bit more first you can see this video and i have sansui tv as you can see in this video he is getting the IR code just pressing the button of remote in-front of the arduino hardware, and i am using the same hardware to detect the IR code for e.g., when i press my sansui TV Power button infront of the device i am getting this code 40BF48B7 and i have converted from this Ir hex code to Pronto hex code and make wav using IrMaster but it is not working. my TV is not getting ON/Off. i have another query , can we convert this 40BF48B7 ir code into pronto hex codes in JAVA , i mean via coding ?
HashMap parameters = new HashMap(); parameters.add("A", Long.ParseLong("40BF48B7", 16)); IrSignal irSignal = new IrSignal("IrpProtocols.ini", "rawnec", parameters);
How to get from an IrSignal to a Wave, I have shown in previous posts.
Or you can use the existing nec1-f16 protocol:
HashMap parameters = new HashMap(); long A = Long.parseLong("40BF48B7", 16); long D = (A & 0xff000000L) >> 24; parameters.add("D", D); long S = (A & 0x00ff0000L) >> 16; parameters.add("S", S); long F = A & 0xffffL; parameters.add("F", F); IrSignal irSignal = new IrSignal("IrpProtocols.ini", "nec1-f16", parameters);
It is really easy!
I will address the wave problems in the other thread.
hi, i will give description of my wave hardware as you asked me in my another thread, you can check in this link about my hardware [Link: rtfms.com] in the 4th picture , i am using the same device, i mean the two LEDs which are connected to 3.5 mm jack. now i have used your above codes and i have some issues - i have sansui TV, and i have capture it's POWER button IR code 40BF48B7 and when i capture it's IR code from different angles of my remote, it gives me 40BF48B7 this IR code , i mean to say whatever be the position of my remote it gives me this 40BF48B7 static value, and using your above code i have created a wav file and when i play this wave in-front of my IR capturing device it gives me different Ir code value from one position,I am not understanding why it is giving me different value from same position and my TV is not getting ON/OFF . i am using the below code , i have used both code
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); IrSignal irSignal = new IrSignal("IrpProtocols.ini", "nec1-f16", parameters);
I took a look at Shirrif's code. It appears that he is incorrectly decoding the NEC IR protocol. NEC defined the custom code (sometimes called the device number) and data codes (sometimes called function numbers) with the least significant bit sent first in each byte. So his decode 40BF48B7 turns into 02FD12ED, also known as NEC device 2, function 18. Try that instead. Even better, post the raw IR capture so we can decode the signal.
ETA: See pages 59 and 60 of this document for a description of the NEC IR protocol (simplest version). You'll see that the least signficant bit is sent first.
thanks for reply here is my raw ir codes for 40BF48B7.(my sansui tv power button code). raw data Freq=38400Hz [9024,-4512,564,-564,564,-564,564,-564,564,-564,564,-564,564,-564,564,-1692,564,-564,564,-1692,564,-1692,564,-1692,564,-1692,564,-1692,564,-1692,564,-564,564,-1692,564,-1692,564,-1692,564,-1692,564,-564,564,-1692,564,-1692,564,-564,564,-1692,564,-564,564,-564,564,-564,564,-1692,564,-564,564,-564,564,-1692,564,-564,564,-39756][9024,-2256,564,-96156][]
The timing list shows that the correct decode is device 0x40, function 0xB7, or device 64, function 183 in decimal. So when calling IrpMaster 40BF48B7 should be changed to 40BFB748.
hi, i have told you about my hardware that only give the Protocol like in this case 40BF48B7 my hardware give that it is nec protocol , but can i need to know which sub type of nec protocol the remote is based on. whether to use nec1, nec2 or nec f16.
i have another thing to ask i have hex code 20DFFF00 and when i play this one in front of my hardware to detect the protocol it some times gives me raw code like Received unknown code, saving as raw m8800 s4450 m350 s750 m450 s600 m450 s1800 m450 s600 m450 s650 m450 s650 m350 s700 m500 s600 m450 s1750 m450 s1750 m450 s650 m450 s1700 m450 s1800 m400 s1750 m500 s1750 m450 s1700 m500 s1750 m450 s1800 m450 s1850 m450 s1800 m450 s1800 m500 s1750 m450 s1850 m450 s1800 m450 s650 m450 s700 m450 s650 m450 s700 m450 s650 m450 s650 m500 s650 m450 s650 m450 Pressed, sending Sent raw Released
and some times gives me Received NEC: 20DFFF00 Pressed, sending Sent NEC 20DFFF00 Pressed, sending Sent NEC repeat Pressed, sending Sent NEC repeat please can you explain this thing, is it something wrong in my detection hardware?
ok, the above helps me and i have found another strange thing as i have told you that when i press my sansui TV power button, on the Serial monitor i got
Received NEC: 40BF48B7
Pressed, sending
Sent NEC 40BF48B7
Pressed, sending
Sent NEC repeat
Pressed, sending
Sent NEC repeat
Pressed, sending
Sent NEC repeat
Pressed, sending
Sent NEC repeat
Pressed, sending
and using the above Hex code 40BF48B7 i have created a wav file and when i play this wav file then in the serial monitor i got
Received NEC: repeat; ignoring.
Pressed, sending
Sent NEC 0
Pressed, sending
Sent NEC repeat
Pressed, sending
Sent NEC repeat
Pressed, sending
Sent NEC repeat and the code i have used is below
HashMap parameters = new HashMap();
long A = Long.parseLong("40BF48B7", 16);//02FD12ED//40BF48B7
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);
IrSignal irSignal = new IrSignal("IrpProtocols.ini", "nec1-f16", parameters);//NEC1-f16(nec1-f16) //NEC1
raw data Freq=38400Hz [9024,-4512,564,-564,564,-564,564,-564,564,-564,564,-564,564,-564,564,-1692,564,-564,564,-1692,564,-1692,564,-1692,564,-1692,564,-1692,564,-1692,564,-564,564,-1692,564,-1692,564,-1692,564,-1692,564,-564,564,-1692,564,-1692,564,-564,564,-1692,564,-564,564,-564,564,-564,564,-1692,564,-564,564,-564,564,-1692,564,-564,564,-39756][9024,-2256,564,-96156][]
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.