|
|
|
Philips Pronto Professional Forum - View Post
|
|
|
|
|
|
|
The following page was printed from RemoteCentral.com:
Post 6 made on Wednesday August 26, 2020 at 11:38 |
mpg7321 Regular Member |
Joined: Posts: | June 2020 111 |
|
|
So did a system print and came back with an error,
System.setDebugMask(9); var socket_GlobalRS232; var buffer_GlobalRS232 = ""; var CR_GlobalRS232 = "\x0D"; function onSocketConnect() { } function onSocketData() { var temp,first; buffer_GlobalRS232+=socket_GlobalRS232.read(); first = buffer_GlobalRS232.indexOf(CR_GlobalRS232); while (first >= 0) { temp = buffer_GlobalRS232.substring(0, first); buffer_GlobalRS232 = buffer_GlobalRS232.substring(first + 1); notifyMessageReceived(temp); first = buffer_GlobalRS232.indexOf(CR_GlobalRS232); }} function onSocketIOError(e) { System.print("sock IO Error error:" + e); } function notifyMessageReceived(message) { System.print("Received:"); System.print(message); } function closeSocket() { if (socket_GlobalRS232) { if (socket_GlobalRS232.connected) socket_GlobalRS232.close; socket_GlobalRS232 = null; }} function resetSocket() { closeSocket(); socket_GlobalRS232 = new TCPSocket(false); buffer_GlobalRS232 = ""; socket_GlobalRS232.onConnect = onSocketConnect; socket_GlobalRS232.onData = onSocketData; socket_GlobalRS232.onIOError = onSocketIOError; } function GlobalRS232(command) { if (socket_GlobalRS232) socket_GlobalRS232.write(command + CR_GlobalRS232); } resetSocket(); socket_GlobalRS232.connect("192.168.1.6",4999,10000);
error is with line;
if (socket_GlobalRS232) socket_GlobalRS232.write(command + CR_GlobalRS232);
hard to read the entire error but says "socket not ready" offending line is pointing to the one listed above.
|
|
|
|
|
|
|