Having issues with ImageServer TCP Socket Connect

I managed to get the token from the Management Server using basic credentials and am now trying to connect to the ImageServer. My XML message is as below:

<?xml version="1.0" encoding="UTF-8"?>
<methodcall>
<requestid>1</requestid>
<methodname>Connect</methodname>
<username>dummy</username>
<password>dummy</password>
<cameraid>(camera guid)</cameraid>
<alwaysstdjpeg>yes</alwaysstdjpeg>
<connectparam>id=(camera guid)&amp;connectiontoken=TOKEN#677d2185-c4e4-4caa-a30e-09229399b38e#(host name)//ServerConnector#</connectparam>
</methodcall>

Before converting it into a byte array, I added the “\r\n\r\n” as per the documentation.

I open the socket connection like this:

Socket clientSocket = new Socket("(ip address)", 7563);

No error came up when I open the connection and send the byte array message but when I try to get the response, I get an error. It seems that the server is not giving back a response so I am not sure if there is something wrong with my url, XML message or how I am sending the message

EDIT: I’m using Milestone Essential btw

Try to compare to the TCPVideoViewer sample.

Perhaps you can see it right away, perhaps you can trace the communication (Wireshark or similar) and figure out what happens.

<methodname>Connect</methodname>

Basically, “Connect” should be lower-case.

Can’t believe I missed that