ImageServer Protocol Connect

I’m trying to connect to the ImageServer (using port 7563 and milestone essential+) in Java but I’m having “connection reset” errors when I’m trying to get the response.

After opening the sockets, I sent the following :

<?xml version="1.0" encoding="UTF-8"?>
<methodcall>
<requestid>1</requestid>
<methodname>connect</methodname>
<username>(username in plaintext)</username>
<password>(password in plaintext)</password>
<cameraid>(guid from the systeminfo.xml)</cameraid><alwaysstdjpeg>yes</alwaysstdjpeg>
</methodcall>

After i convert the xml message into a byte array utf-8, i added in the four bytes: 13 10 13 10 into the back. After sending the byte array, I seem to be getting some sort of response with a length of 352518144(?) but when i try to read it, Im getting errors

Is there any steps i missed? Are we supposed to get a response after the connect request and if so, will it be in string or a byte array etc?

You are using an authentication scheme that is supposed to work for e-code basic users only. See - https://doc.developer.milestonesys.com/html/index.html?base=reference/protocols/imageserver_authenticate.html&tree=tree_3.html

You should not add 13 10 13 10, they should be there in the data marking the end. So it seems you have got some weird data where you should have had none.

Can you please try to explore the TCPVideoViewer sample?

It is C# but uses pure protocol. You can look at the source code and you can trace the communication between that app and the milestone servers..

https://doc.developer.milestonesys.com/html/index.html?base=samples/tcpviewer_sample.html&tree=tree_3.html