Issue using IRremote to send code to Marantz receiver

Hello again,

It’s been a couple years since I last posted, back when I was making a touchscreen remote to control my home theater (a successful project, btw, thanks to all the hard work put into IRremote and the help of this community).

Now I’m back at it again, only this time I modified a SNES controller (aftermarket wireless version) to be my “universal” remote, and I’m almost at the finish line…meaning I have total control over my JVC projector and the same is mostly true with my Marantz receiver, except for just two buttons.

These two buttons are part of the SOUND MODE group of buttons, of which there are a total of four: MOVIE, MUSIC, GAME, and PURE. For my purposes, we can ignore GAME and PURE as I only use the first two.

The button names, except for PURE, are actually superficial in that you can map them to whichever decoding scheme you choose. So for example, you can map MOVIE to “Dolby Digital” and map MUSIC to “Multi-channel Stereo”…or you can map both buttons to Dolby Digital or map to DTS, etc.

The way you program this using the remote is very interesting, because I can’t seem to make sense of it based on the dumps shown using IRrecvDumpV2. Here’s how it works from the user’s perspective:

  1. If I press MOVIE, it opens the SOUND MODE menu, which lists out the various sound modes (Dolby Digital, DTS, Stereo, etc), and correctly shows “Dolby Digital” as the selected sound mode. If I do nothing, the menu disappears, so if the sound mode was already set to Dolby Digital then the end result is no change, just a presentation of the current sound mode.

  2. If I then press MUSIC, it will again open the SOUND MODE menu and correctly show “Multi-channel Stereo” as the selected option (and of course it is actually changing the sound mode to Multi-channel Music if it wasn’t already enabled).

  3. If I press either button to open the SOUND MODE menu, then press the same button again, repeatedly, the selected sound mode will cycle through the list, allowing you to re-map the button to a new sound mode / decoding scheme. The next time I press that sound mode button, it will open the SOUND MODE menu and show the newly selected sound mode.

So as you would expect, pressing MOVIE switches to Dolby Digital and pressing Music goes to stereo. It is a great design from a programming perspective because only one button is involved per sound mode you want to map to and it works intuitively so it’s simple for the end-user.

But here’s where it gets confusing…

When looking at the IR dump after pressing the MUSIC button, I see that it alternates between THE SAME two codes as it does for the MOVIE button! Both buttons share the same two codes. One is interpreted as a RC5 code and the other uses an unknown protocol. If I press and hold the button, then a third code is repeated, but I don’t think that matters for my purposes as I don’t intend on depressing a sound mode button (and depending on whether RC5 or UNKNOWN was used last, either that third code will repeat or the same RC5 code will).

If what I’m seeing in the dumps represents the entire picture, then how does my receiver know to select Dolby Digital vs Multi-channel Stereo when it’s getting the same code from the remote? For example, using the Marantz remote, I can send my receiver the RC5 code by pressing the MUSIC button (let’s assume that’s the one it sent), point the remote away from the receiver and press the button again so that it sends the UNKNOWN code, then point the remote back at the receiver and press the MOVIE button knowing it will send the same RC5 code and yet the receiver shows the correct sound mode is selected in the SOUND MODE menu.

The only way I can see this as being possible is if there is 2-way communication going on or if the mechanism I’m using to capture signals from the remote (Arduino Uno plus IRrecvDumpV2) isn’t good enough to capture all the data and so I’m missing some other codes being sent. No matter what I send to the receiver, whether it’s just the RC5 code, just the UNKNOWN code, or some combination of the two, the receiver doesn’t respond in any way. So I’m stuck and hoping the smarter minds on this forum can help me once again!

Here are the two alternating codes that the remote sends (again this is for both the MUSIC and MOVIE buttons, and pressing one button and then pressing the other doesn’t change the fact that the remote ALWAYS alternates between these two codes and never sends the same one twice in a row):

Encoding  : RC5
Code      : 30 (6 bits)
    + 900, - 850     + 900, - 850     + 900, - 850     +1750, - 850
    + 900, - 900     + 850, - 850     + 900
unsigned int  rawData[13] = {900,850, 900,850, 900,850, 1750,850, 900,900, 850,850, 900};  // RC5 30
unsigned int  data = 0x30;

Encoding  : UNKNOWN
Code      : C3064C42 (32 bits)
    + 900, - 850     +1800, -1700     +1800, - 850     + 900, - 850
    + 900, - 850     + 900
unsigned int  rawData[11] = {900,850, 1800,1700, 1800,850, 900,850, 900,850, 900};  // UNKNOWN C3064C42

I also attached a pic of the remote showing the SOUND MODE button group, in case it helps. Here is the link to my receiver’s manual:

Since my sketch works in every other regard I don’t think there is a problem with my code per-se, however I’m including it as a way of contributing back in case someone else finds it to be useful. It’s running on a Teensy 2.0 and this is the controller:



Codes.txt (3.02 KB)

Sketch.txt (9.88 KB)

I figured it out. After doing a deep dive into RC5 I began to suspect that the remote is actually using RC5 Extended. I was then fortunate enough to come across an Excel doc Marantz publishes every couple years or so that lists all the IR codes for most of its products and that confirmed my receiver uses RC5 Extended. The hunt was then on for some code that implements that encoding scheme and I came across this code, which worked!