Connection lost
George Krietsepis
Posts: 284
Dear All,
for some reason, the connection between a Denon receiver and an NX master is lost ( after it has been established for 1-2 days ).
I'm using the below function to get back the error when the Denon is going offline:
define_function char[100] GetIpError (long iErrorCode)
{
char iReturn[100];
switch(iErrorCode) { case 2 : iReturn = "'General failure (out of memory)'"; case 4 : iReturn = "'Unknown host'"; case 6 : iReturn = "'Connection refused'"; case 7 : iReturn = "'Connection timed out'"; case 8 : iReturn = "'Unknown connection error'"; case 9 : iReturn = "'Already closed'"; case 10 : iReturn = "'Binding error'"; case 11 : iReturn = "'Listening error'"; case 14 : iReturn = "'Local port already used'"; case 15 : iReturn = "'UDP socket already listening'"; case 16 : iReturn = "'Too many open sockets'"; case 17 : iReturn = "'Local port not open'"; default : iReturn = "'(',itoa(iErrorCode),') Undefined'"; } return iReturn;
}
The error code I'm getting back is the 8 "Unknown connection error".
What does this mean exactly ?
Please also note that the Denon mobile app is still working even if the connection with the master has been lost.
But NX is established a connection with Denon over the telnet port 23 while the app is using port 80 ( I think...)
Any ideas please ?
Thanks,
George
0
Comments
Can't say for sure what your seeing, but port 80 (web, typically) is generally a stateless "connection" that results in a transient relationship - request/response/readiness - while telnet on 23 is a standing connection whose relationship is ongoing, whether data is flowing or not. "Logged in" on telnet. "Authenticated" on web.
In my own experience with Denon/Marantz control on IP (port 23), I've juggled timing repeatedly to try to keep apparently continuous control. Our code creates a new connection if a command fails (due to a telnet control session timing out, or simply not responding), or if more than "x" seconds (configurable) have elapsed since data was present on a standing connection. I get better results if x>60 seconds, worse if x<30 or x>200 seconds or if the reconnect on data silence is defeated altogether. I haven't found a combination yet that I like... seems that if a data timeout is in progress, commands are buffered in the Netlinx until a new telnet is established, which results in enough down time to notice and react with repeated pushes (typically volume) which catch up all at once with a volume spike.