RS232 communication using Max232 for a Denon AVR

Hi,

I have a Denon receiver, who refuses functioning properly within the Lan-Network with my FritzBox. So I decided to communicate using a RS232 connection.
I bought a Max232 module including resistors, capacitors and so on, f.e.see this ebay link
3,3 - 5V operation range.

I started with an ESP32 (as it has several hardware RX TX ports), checked if communication is fine with an Arduino Nano. Then, after connecting to the RS232, I get the "system messages" of the AVR if I f.e. change the volume.

Problem is: I cannot send.

Here you can see the Denon datasheet of RS232 /Lan interface

I have set up a 9600 SERIAL_8N1 connection, as required.

Now I am searching for hours, with no conclusion. All I found was a dutch(?) conversation about connecting to a Maranz AVR, which is same company as Denon. Close to the end, it says

void setup() {
  Serial.begin(9600);
}

void loop() {
   //POWER OFF
  Serial.write("@");
  Serial.print("VOL:1");
  Serial.write("\r\n");
  delay(1000);
}

works fine for him. According to the Maranz Code List the string is different, the @ is added, however, carriage return is also necessary.
So I tried a lot:

		Ser2.print("MVUP");
		delay(1000);
		Ser2.print("MVUP\r");
		delay(1000);
		Ser2.print("MVUP\r\n");
		delay(1000);
		Ser2.write("MVUP");
		delay(1000);
		Ser2.write("MVUP\r");
		delay(1000);
		Ser2.write("MVUP\r\n");
		delay(1000);
		Ser2.println("MVUP");
		delay(1000);
		Ser2.println("MVUP\r");
		delay(1000);
		Ser2.println("MVUP\r\n");
		delay(1000);

and much more (also according to the example of the Maranz user) - zero effect.

Also, to ensure the problem is not ESP-related (3,3V f.e.), I have set up an Nano with the same code snippet. Again, the AVR does nothing.

Has anyone a Denon himself or sees what I am doing wrong here?

Right off the bat, I see that the Denon has start and stop bit.
Have you configured your ESP-32 to have that?
I don't see any configuration.

ieee488:
Right off the bat, I see that the Denon has start and stop bit.
Have you configured your ESP-32 to have that?
I don't see any configuration.

Good Question, as far as I have read, "SERIAL_8N1" (which is also the default for Arduinos serial) means 8 bit, no parity, 1 stop bit.
Also the start bit seems to be sended by default, there is no way to configure the start bit separate on ESP or Arduino.

It's too bad you don't have a USB-RS232 adapter so you can use Putty or something like that to try to talk to the Denon directly.

void loop() {
   //POWER OFF
  Serial.write("@");        //one character: why not Serial.print('@'); or Serial.write('@');
  Serial.print("VOL:1");  
  Serial.write("\r\n"); //2 characters: why not Serial.print("\r\n"); 
  delay(1000);
}

GolamMostafa:

void loop() {

//POWER OFF
  Serial.write("@");        //one character: why not Serial.print('@'); or Serial.write('@');
  Serial.print("VOL:1"); 
  Serial.write("\r\n"); //2 characters: why not Serial.print("\r\n");
  delay(1000);
}

This is the code of the dutch conversation from start of 2017, and he said this works for Maranz. As it is the same company, i copied it here to show what runs on other arduinos. I am not aware of why he did what, I was just happy to find a single post on the internet which said someone is able to control a receiver of D&M company. All other are discussing, with no code showing how it works :wink:

For the Denon the @ is not needed, this is Maranz-specific. Denon off is
PWSTANDBY
, volume up is
MVUP
and so on.

My questions were just out-of curiosity; they don't carry much technical weight. It was just to interact with you that you read the comments. The codes are correct (to the level of my understanding) both syntactically and semantically.