Home AMX User Forum AMX Technical Discussion
Options

AMX and Global Cache: Connection drop

Hi everyone,

I'm working on a project with several global cache and after a short time (2-3 min) the connections between the Master and the GC are closed, any idea?
For the moment I'm just re-opening the connection after each deconnection, which is not a really good solution.

I'm opening two connections to the GC, one on the port 4998 to user relay and the other one on the port 4999 to use the first RS-232 port for the projector.

I've open the two ports directly from my laptop to test the relay and send some commands to the projector and I didn't loose the connection, is there any timeout I need to configure?

Here is my code for one GC:
dvGC_Classroom_1	=		0:5:0
dvProj_Classroom_1	=		0:13:0

(...)

DEFINE_START

IP_CLIENT_OPEN(dvGC_Classroom_1.PORT,'163.183.245.10',4998,TCP_IP)
IP_CLIENT_OPEN(dvProj_Classroom_1.PORT,'163.183.245.10',4999,TCP_IP)

(....)

DATA_EVENT[dvGC_Classroom_1]
{
    ONLINE:
    {
	SEND_STRING 0,"'CONNEX OK AU GC CLASSROOM 1'"
    }
    OFFLINE:
    {	
	SEND_STRING 0,"'********************* GC CLASSROOM 1 OFFLINE *******************************'"	
	WAIT 2
	{
	    IP_CLIENT_OPEN(dvGC_Classroom_1.PORT,'163.183.245.10',4998,TCP_IP)
	}
    }
}

DATA_EVENT[dvProj_Classroom_1]
{
    ONLINE:
    {
	SEND_STRING 0,"'CONNEX OK AU GC PROJO CLASSROOM 1'"
    }
    OFFLINE:
    {
	SEND_STRING 0,"'**************** GC PROJO CLASSROOM 1 OFFLINE**********************'"	
	WAIT 2
	{
	    IP_CLIENT_OPEN(dvProj_Classroom_1.PORT,'163.183.245.10',4999,TCP_IP)
	}
    }

    (.....)
}

FYI: I am using the same network of the company but on a separate VLAN, I didn't create it myself so I don't know the settings

Thanks in advance for your help,
Seb

Comments

  • Options
    HedbergHedberg Posts: 671
    I don't know from Global Cache, but you may be experiencing the implementation of the keepalive tcp feature as implemented by AMX tcp sockets. see:http://www.amxforums.com/showthread.php?t=6180&highlight=extron+alive for a discussion of the AMX socket being closed on an Extron device. If you need to verify that this is what you are seeing, use Wireshark to watch the traffic to a tcp server that doesn't get it's socket closed and then watch the traffic to the Global Cache server and see what happens.

    In any event, you may be able to keep the connections open by querying the GC and/or projector for some status every 45 to 60 seconds.
  • Options
    Thanks for the link!
    It seems to be the same problem I'm facing, I guess that the GC is not responding to the keep alive. I'll do some testing with wireshark but the best solution will probably be to keep alive the connection myself.

    Thanks again,
    Seb
  • Options
    I've written an extensive module for Global Cache and the trick is to send the Query string to the Global Cache device before the connection closes (~ every 20 Secs.). The query string requests device info from the Global Cache device and will keep the connection alive. Use a timeline.
Sign In or Register to comment.