This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

TCP/IP Protocol - Commands
#1
Hi,

Could some help with writing a TCP/IP protocol command?

I would like to send a command to ip address 1.1.1.1 with port 11.
The command is PWON and the regular expression is <CR>

This is so I can communicate with my Denon AVR.
Also for status I like know how to pull/request a status..?

Anyone?

BR
Mr.D
Reply
#2
(22.01.2018, 17:19)Mr. Danielsen Wrote: Hi,

Could some help with writing a TCP/IP protocol command?

I would like to send a command to ip address 1.1.1.1 with port 11.
The command is PWON and the regular expression is <CR>

This is so I can communicate with my Denon AVR.
Also for status I like know how to pull/request a status..?

Anyone?

BR
Mr.D

Try this:
Code:
nextline = '\r\n'
local socket = require("socket")  
local tcp = assert(socket.tcp())
tcp:settimeout(0.3)
connected,err = tcp:connect('1.1.1,1', '5000')
result,err = tcp:send('PWON'  .. nextline)
local rec,status,partial = tcp:receive('*a')
closing = tcp:close()
Reply
#3
nextline = '\r\n'

What should be filled in for r and n?
Aslo, for the *a?

I tried it as it was, except I changed the IP address and the port to the AVR receiver, but the script did not work...

Br.
Mr.D
Reply
#4
(24.01.2018, 18:12)Mr. Danielsen Wrote: nextline = '\r\n'

What should be filled in for r and n?
Aslo, for the *a?

I tried it as it was, except I changed the IP address and the port to the AVR receiver, but the script did not work...

Br.
Mr.D

The '\r\n' is short for carriage return/newline. Nothing to change.

You should change nothing except the IP address.

This is an extract of a longer script I use to control my Denon.
Are you sure your Denon listens to another port? What port do you use?

BR
Reply
#5
Hi,

I re-did the process. It seems that there was a small error in the script for IP address.
I have used a , instead of . Sad

Now it works Smile
I am using port 23, using port 5000 does not work for me
The Denon I am using is AVR 3313...

How do I collect the status of the AVR?

Thanks for your help Smile
BR,
Mr.D
Reply
#6
(24.01.2018, 18:38)Mr. Danielsen Wrote: Hi,

I re-did the process. It seems that there was a small error in the script for IP address.
I have used a , instead of . Sad

Now it works Smile
I am using port 23, using port 5000 does not work for me
The Denon I am using is AVR 3313...

How do I collect the status of the AVR?

Thanks for your help Smile
BR,
Mr.D

Glad that it works.

So you are using the standard telnet port. I forgot why I am actually using port 5000...
Remember that you can only have one connection at the time.
I have an AVR X2200.

I believe that the response of the AVR is in the 'result' variable. I do nothing with it at the moment...

BR.
Reply
#7
Hi,

Ok Smile Thanks for you help!

BR,
Mr.D
Reply
#8
Hello,

I also have a Denon Receiver.  AVR-X2300W or the AVR-X2100W.  I am trying to send it strings via RS232 and IP but it does not respond.  

To increase the volume, I've tried MVUP, MVUP\r\n, MVUP<CR>, MVUP0x0D, MVUP^M^J (ELK-M1G Carraige Return), but nothing seems to cause a change in the receiver.  

I can connect and then control the receiver via the factory Denon remote while I monitor the strings sent from the receiver.  If I increase the volume from 45 to 45.5 I see MV455.  I send MV46 to change the volume to 46 using all the types of carriage returns and I get nothing.  

Sometimes the receiver will respond to a command out of the blue, but nothing consistent.  

When I use the Denon App on iPhone, I also see the strings leaving the receiver, as I change the volume, so I am pretty sure if my phone can communicate over IP, then I should also be able to as well.  As a test, I deleted the app because I read somewhere that the receiver can only handle one connection at a time.  Still no change.

Any help is appreciated.

Thank You
Reply
#9
Hi,

Have you tried this sample already? (not sure if it is also for your device)

http://openrb.com/example-use-lm2-as-tcp...e-theater/

BR,

Erwin
Reply
#10
(11.06.2018, 21:47)Erwin van der Zwart Wrote: Hi,

Have you tried this sample already? (not sure if it is also for your device)

http://openrb.com/example-use-lm2-as-tcp...e-theater/

BR,

Erwin

That could be where I am having issues.  All I am doing is connecting to the IP Address of my Denon on Port 23.  I am then sending individual commands.  MVUP<CR> for example.  After some more research, I cannot remember where, it said that the Denon is looking for a "packet" of information and it must be received in 40ms.  I am only sending the single string.

What I am trying to accomplish is this...  I have an M1G Security System with an M1XEP Ethernet Expander.  I can send IP strings from the M1XEP to another IP Address and Port (hopefully the Denon Receiver).  When I disarm the alarm, I want the M1XEP to send strings to the Denon to turn on, go to a specific source, and raise the volume to 45.  I have accomplished this with an older Integra Receiver with no issues, so I am baffled by this on the Denon. 

ELK Products also makes an M1XSP Serial Expander that I could connect straight serial to the Denon, but so far testing with my computer and a USB-Serial cable is not working either.  The M1XSP also works with the Integra receiver.

This may also be the wrong community, but I am hoping some of this knowledge is transferable.
Reply
#11
(12.06.2018, 15:02)NLCarrII Wrote:
(11.06.2018, 21:47)Erwin van der Zwart Wrote: Hi,

Have you tried this sample already? (not sure if it is also for your device)

http://openrb.com/example-use-lm2-as-tcp...e-theater/

BR,

Erwin

That could be where I am having issues.  All I am doing is connecting to the IP Address of my Denon on Port 23.  I am then sending individual commands.  MVUP<CR> for example.  After some more research, I cannot remember where, it said that the Denon is looking for a "packet" of information and it must be received in 40ms.  I am only sending the single string.

What I am trying to accomplish is this...  I have an M1G Security System with an M1XEP Ethernet Expander.  I can send IP strings from the M1XEP to another IP Address and Port (hopefully the Denon Receiver).  When I disarm the alarm, I want the M1XEP to send strings to the Denon to turn on, go to a specific source, and raise the volume to 45.  I have accomplished this with an older Integra Receiver with no issues, so I am baffled by this on the Denon. 

ELK Products also makes an M1XSP Serial Expander that I could connect straight serial to the Denon, but so far testing with my computer and a USB-Serial cable is not working either.  The M1XSP also works with the Integra receiver.

This may also be the wrong community, but I am hoping some of this knowledge is transferable.

When you first send the command to turn the Denon ON (PWON) , you have to wait 1 second before sending the next command.
Reply
#12
Thanks everyone for your help.  I tried more this morning and still had no luck.  Just to be sure...  Do I need a Carriage Return, or can I just send PWON? 

I downloaded a program named Hercules HW and connected to the Denon on Port 23, and again I can see all the traffic.  When I power on with the remote, I get something similar to PWON ZMON and when I power off with the remote, I get PWSTANDBY ZMOFF.  I have tried sending the same commands in the same order with no luck.

I can post a screenshot of all the feedback I am receiving or sending, if needed.
Reply
#13
CR (\r) is required for the device to distinguish each command
Reply
#14
(14.06.2018, 05:58)admin Wrote: CR (\r) is required for the device to distinguish each command

OK.  I will try sending PWON\r instead of PWON\r\n and go from there.  Thank You.

Also... Does the Denon App for iPhone connect on Port 23 or on a different port, or would it create a conflict with the messages I am trying to send?

Last night my receiver requested I do a FW Update and I thought this may fix it if something is jammed up in the memory. After the update, no change. Found out how to do a Factory Default, still no change. I am going to try and contact Denon Technical Support. Maybe I am missing something glaringly obvious that they can point out to me.
Reply


Forum Jump: