When
a device as a client, the interval between connection servers is 1~3 minutes,
and in extreme cases 11~13 minutes.
The
flow chart is shown below:(Please disable all virtual NICs, otherwise LocalSetting may not be able to find the device.)
The transmission protocol version negotiation consists of two aspects: the upper computer sends the protocol version request to the lower computer; the lower computer sends the return protocol version response to the upper computer.
Request
Field |
packet length |
command |
Version |
byte |
2 |
2 |
4 |
value |
8 |
kSDKServiceAsk |
LOCAL_TCP_VERSION |
Respond
Field |
packet length |
command |
Version |
byte |
2 |
2 |
4 |
value |
8 |
kSDKServiceAnswer |
(current version) |
SDK protocol version negotiation uses "SDK protocol interaction" for communication. The upper computer sends the "SDK protocol version request" to the lower computer then the lower computer sends the "SDK protocol version response" to the upper computer.
The SDK protocol interaction consists of two aspects: the upper computer sends the "SDK interface request" to the lower computer, and the lower computer sends the "SDK interface response" to the upper computer.
Field |
packet length |
command |
XmlData |
index |
XmlData |
byte |
2 |
2 |
4 |
4 |
N |
value |
kSDKCmdAsk |
1.
packet length: 2+2+4+4+N;
2.
XmlData
3. index:The index position of XmlData in the current data packet in the SDK interface data.
4. XmlData:SDK interface data content; XmlData has a maximum length of 9*1024 – (2 + 2 + 4 + 4) bytes in the current packet.
SDK interface response
Field |
packet length |
command |
XmlData |
index |
XmlData |
byte |
2 |
2 |
4 |
4 |
N |
value |
kSDKCmdAnswer |
Same as the SDK interface request
description.
1.The packet format is a normal UDP packet.
2.
Use only udp packets to search for devices on the LAN, and
TCP is used in all other cases.
Use UDP to send broadcast data to find LAN devices, not required.
A、
Field |
Version |
Command
|
byte |
4 |
2 |
value |
LOCAL_UDP_VERSION |
kSearchDeviceAsk
|
B、
Field
| Version |
Command | Device ID | |
byte | 4 | 2 |
15 |
4 |
value |
LOCAL_UDP_VERSION
|
kSearchDeviceAnswer |
ID |
change |
Description:
a)
When the device ID string is less than 15 bytes, the
remaining bytes are filled with '\0'.
b) The field change flag indicates a device information change flag. When the device information in the control card changes, the value is automatically incremented by one, and the initial value of change is 0.