(29.11.2021, 08:23)admin Wrote: If you get false, nil it means that the socket connection was established but there's an error on the protocol level. Check what is the connect callback result:Hi, I'm getting the below response
Code:local function M_connect_to_C3_cb(size, data_arr)
log('connect_to_C3_cb', size, data_arr)
if size == 4 then
sessionID[1] = data_arr[2] --Second byte is MSB
sessionID[2] = data_arr[1] --First byte is LSB
connected = true
end
return connected
end
Should you want a remote access, I have anydesk installed
Thanks
Lai
(29.11.2021, 13:02)Keough Wrote:(29.11.2021, 08:23)admin Wrote: If you get false, nil it means that the socket connection was established but there's an error on the protocol level. Check what is the connect callback result:Hi, I'm getting the below response
Code:local function M_connect_to_C3_cb(size, data_arr)
log('connect_to_C3_cb', size, data_arr)
if size == 4 then
sessionID[1] = data_arr[2] --Second byte is MSB
sessionID[2] = data_arr[1] --First byte is LSB
connected = true
end
return connected
end
Should you want a remote access, I have anydesk installed
Btw, I have checked the code that increase the size at below and i have inserted a log viewing.
local function M_get_message_header(data_arr)
local command = nil
local size = 0
if #data_arr >= 5 then
if data_arr[1] == consts.C3_MESSAGE_START and
data_arr[2] == consts.C3_PROTOCOL_VERSION then
log('M_get_message_header1',command, size, data_arr)
command = data_arr[3]
size = (data_arr[5] * 255) + data_arr[4]
log('M_get_message_header2',command, size, data_arr)
end
end
return command, size
end
Thanks
Lai