RemoteMaster: How to enter NEC v1 hex codes directly

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Post Reply
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

RemoteMaster: How to enter NEC v1 hex codes directly

Post by hjgode »

Hello

thanks for this great software tools. I got a RCA RCRP05B and try to enter the hex codes for the missing Blaupunkt IVDP-01 remote.

I have a list with hex codes and the device ID:

Code: Select all

Blaupunkt IVDP-01 NEC1 0x10ef										
Name	Dezimal	Hex		Name	Dezimal	Hex		Name	Dezimal	Hex
Power	208	0xD0	x	Display	116	0x74	x	SetA	28	0x1C
1	72	0x48	x	ILL	0	0x00		SetB	26	0x1A
2	200	0xC8	x	Stop	248	0xF8	x	SkipChp+	56	0x38
3	40	0x28	x	FastForw	60	0x3C	x	SkipChp-	44	0x2C
4	168	0xA8	x	FastRev	156	0x9C	x	FastRev	96	0x60
5	104	0x68	x	Up	44	0x2C	x	Lang	16	0x10
6	232	0xE8	x	Down	188	0xBC	x			0x00
7	24	0x18	x	Subtitle	48	0x30				0x00
8	152	0x98	x	Setup	240	0xF0				0x00
9	88	0x58	x	Menu	132	0x84	x			0x00
0	136	0x88	x	Repeat	8	0x08				0x00
		0x00		Pause	184	0xB8	x			0x00
Left	96	0x60	x	Enter	80	0x50				0x00
Right	160	0xA0	x	Audio	108	0x6C	n			0x00
Mute	180	0xB4	x	Angle		0x00				0x00
		0x00		Skip+	42	0x2A	n			0x00
SlowFor	84	0x54	x	Skip-	32	0x20	n			0x00
SlowRev		0x00	x	NTSC/PAL	52	0x34	n			0x00
Info	114	0x72		Zoom	90	0x5A	n			0x00
Input	128	0x80	x	Multi	50	0x32				0x00
Now I entered these in RM 2.02 within the functions tab. Then I copied the Device Upgrade Code into IR's Devices Tab. Both times I used DVD:4040.

Unfortunately the DVD player does not work with that setup after uploading the update to the RCRP05B.

What do I wrong?

thanks

Josef
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

Arduino code gives wrong hex codes

Post by hjgode »

The arduino code I used to find the hex values accepted by the device uses wrong NEC notation:

http://www.remotecentral.com/cgi-bin/mb ... ad.cgi?196 helped me:

The bits are reversed:
40BF48B7 turns into 02FD12ED

bits:
40=01000000
02=00000010

48=01001000
12=00010010

NEC sends a device ID byte, the 0xFF complement and a command byte and it's complement.

So I have to convert all the found (arduino) bytes and reverse there bits.

Will test...
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

Post by hjgode »

Al the hex codes named by the arduino irSend library are wrong! Reverse bits or not, the DVD player will not accept them.

So I did go the hard way and learned the codes into the RCRP05B sending them with the known values from arduino (the original remote is not available).

Now I got a somewhat working remote for the IVDP01, but some codes result in double execution. In example presseing up or down arrow moves the focus two times up or down.

The UP key as IRP:

Code: Select all

{37.7k,557,msb}<1,-1|1,-3>(16,-8,A:32,1,-17.2m)+{A=$10EF2CD3}; Alt leadout form: ^85m
The Down key as IRP:

Code: Select all

{37.9k,557,msb}<1,-1|1,-3>(16,-8,A:32,1,-17.3m)+{A=$10EFBC43}; Alt leadout form: ^85m
Looking at IR's 'Learned Signals' tab after I downloaded the RCRP05B setup I see some codes are noted with a 'GAP':

Pause key:

Code: Select all

{37.9k,557,msb}<1,-1|1,-3>(A:19,1,-17.3m,(16,-4723u,B:32,1,-17.3m,C:19,1,-17.3m)+){A=$7B847,B=$10EFB847,C=$7B847}
What does this GAP mean and can I eliminate it?

How can I enter the (IRP) codes in RemoteMaster (2.02)?


I would like to re-arrange the learned keys and to enter them in a 'clean' form.

Thanks

Josef
Barf
Expert
Posts: 1523
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Hallo Josef,

let me suggest that you use IrScrutinizer instead for capturing IR signals with the Arduino. Load the sketch scrutinize_receiver from the arduino subdirectory of IrScrutinizer, select Capturing hw -> Arduino, and enter the serial port name where your Arduino sits. Check and possibly adjust the hardware configuration for the Arduino (default pin 11).

People struggling with the Shirriff library are slowly becoming a FAQ here :wink:
3FG
Expert
Posts: 3436
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

Josef,
First, let me recommend that when you have a question, if there is a IR or RMIR file available, upload the file to the Diagnostics Area and post a link here. That way we can see all aspects of the issue.

Anyway, it appears that these signals are NEC device 8. In principle, IR or RMIR or IrScrutinizer should provide that as a decode, including the OBC (function number). However, all three signals you listed have an incorrect leadout time, and that may keep DecodeIR.dll from correctly decoding. Additionally, it seems that the Pause signal was recorded after the signal was started which resulted in recording a fragment of the signal. Perhaps that is in the original Ardunio data. One can see in the IRP B=$10EFB847, and that is the actual signal. We call any signal which varies the only the off time a "gap" signal, and here DecodeIR can't identify the fragments at the beginning and the end of the Pause signal, so it jsut describes it as a generic gap signal.

I don't think it is clear whether the Blaupunkt is expecting NEC1 or NEC2, but it is probably NEC1. So make an upgrade specifying the NEC1 executor with device 8. To get the OBCs, either simply use the values provided in the decode (if one exists, or you can get it from the IRP. NEC signals are described with the least significant bit sent first, and the IRP shows the most significant bit first. So each byte of the IRP needs to be individually bit reversed.

Here's Up:10 EF 2C D3. Note that the second byte is the binary complement of the first, and the 4th is the complement of the third. Expanding 10 to binary gives 0001 0000, and reversing the bits gives 0000 1000 or 8 decimal. That's the device number. The third byte is the OBC, and 2C reverses to 34H or 53 decimal.

If you're still getting double action, we have some other things to try. Incidentally, I think the values shown in the OP are the same as your decodes of the signals as learned by the RCRP05B, so reversing the bits of that data should have worked. If your upgrade doesn't function, post your RMIR file, and we'll try to find out why.
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

Post by hjgode »

Barf wrote:Hallo Josef,

let me suggest that you use IrScrutinizer instead for capturing IR signals with the Arduino. Load the sketch scrutinize_receiver from the arduino subdirectory of IrScrutinizer, select Capturing hw -> Arduino, and enter the serial port name where your Arduino sits. Check and possibly adjust the hardware configuration for the Arduino (default pin 11).

People struggling with the Shirriff library are slowly becoming a FAQ here :wink:
Thanks for the hint, but I have to go the other way. I have working codes sending from Arduino and now somewhat working RCRP05B keys.

Or do you mean I should setup a second arduino to capture the IR codes send from the first arduino?
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

Post by hjgode »

3FG wrote:Josef,
First, let me recommend that when you have a question, if there is a IR or RMIR file available, upload the file to the Diagnostics Area and post a link here. That way we can see all aspects of the issue.
...
Many thanks for the offer. I uploaded the file as https://www.hifi-remote.com/forums/dload ... e_id=12248

There are several files within the zip and a readme with a description and what I tried.

Thanks again and a happy new year
3FG
Expert
Posts: 3436
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

Your learned signals from the Arduino all contain enough information to see the device and functin numbers. As I understand it, these codes (expressed as NEC2) as loaded into the RCRP05B, do control the DVD, but some codes provide double action.

So, in order,
1) Try uploading a revised upgrade to the RCRP05B, specifying the executor as NEC1 instead of NEC2.

2) If that doesn't work, download the "no repeats" protocols.ini entries, and add NEC1 No Repeat to your protocols.ini file. Upload a revised upgrade with that executor.

Please try 1) first, because it will help the community to know if the Blaupunkt is using genuine NEC signals or if it uses non-standard timing.
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

Post by hjgode »

So, in order,
1) Try uploading a revised upgrade to the RCRP05B, specifying the executor as NEC1 instead of NEC2.

2) If that doesn't work, download the "no repeats" protocols.ini entries, and add NEC1 No Repeat to your protocols.ini file. Upload a revised upgrade with that executor.
Thanks for these hints.

Changing the learned/entered NEC codes from NEC2 to NEC1 did not change the behaviour.
I had to use NEC1(norepeats) to get it working witthout repeating up/down signals.

I am OK with the last solution but must state, that the Arduino signals do not match the learned hex codes (except for the sub device number).

Thanks a lot and a happy new 2014
3FG
Expert
Posts: 3436
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

hjgode wrote: I am OK with the last solution but must state, that the Arduino signals do not match the learned hex codes (except for the sub device number)
I'm confused by this statement. Here's my understanding:
You have an Arduino board, and somehow obtained a list of IR codes for the Blaupunkt. Using the Arduino and these codes, you're able to control the Blaupunkt. You were able to teach the RCRP05B from the Arduino, but some functions repeat undesirably. However, by decoding the signals learned by the RCRP05B, you have been able to make an upgrade using the "no repeats" NEC1 executor, and this works correctly.

Which of these signals don't match?
hjgode
Posts: 14
Joined: Mon Dec 23, 2013 12:26 am
Location: germany
Contact:

Post by hjgode »

3FG wrote:
hjgode wrote: I am OK with the last solution but must state, that the Arduino signals do not match the learned hex codes (except for the sub device number)
I'm confused by this statement. Here's my understanding:
You have an Arduino board, and somehow obtained a list of IR codes for the Blaupunkt. Using the Arduino and these codes, you're able to control the Blaupunkt. You were able to teach the RCRP05B from the Arduino, but some functions repeat undesirably. However, by decoding the signals learned by the RCRP05B, you have been able to make an upgrade using the "no repeats" NEC1 executor, and this works correctly.

Which of these signals don't match?
Sorry, I did not want to confuse you.

The learned signals work but there are repeats (ie Up/Down always moves the focus two times).
The hex codes I see in the learned signals are different from what I assembled with the arduino. But this is due to the encoding done by the IRSend code.
Then I tried first by changing from NEC2 to NEC1. The codes work the same to the blaupunkt. But there are still repeated signals.
Then I changed to NEC1(norepeats) and it works correctly. Up/Down only move the cursor one position.

I have uploaded my update at https://www.hifi-remote.com/forums/dload ... e_id=12253 Possibly you can see more than I what changed else. I assigned code 2014 to DVR button of RCRP05B and that works for me. I also changed Ch+/- to issue the DVD/DVR code (not the cable one) as I use Ch+/Ch- for Chapter Skipping.

Let me know what else I can do for you. I would have posted screen shot images here, but there is no upload option. I may post an article at my web site to offer some screen shots.
3FG
Expert
Posts: 3436
Joined: Mon May 18, 2009 11:48 pm

Post by 3FG »

OK, I see what you mean. As we've suspected before, Shirriff displays the device and subdevice as msb, while displaying the OBC as lsb complemented. I'm glad to have that confirmation.
Post Reply