Closed tresf closed 9 years ago
I'll look at it in the morning.
On Tue, Nov 25, 2014 at 11:42 PM, Tres Finocchiaro <notifications@github.com
wrote:
Assigned #1 https://github.com/qzind/qz-print/issues/1 to @robertcasto https://github.com/robertcasto.
Reply to this email directly or view it on GitHub https://github.com/qzind/qz-print/issues/1#event-198722468.
Robert Casto Owner | SellersToolbox p: 1-513-847-4942 c: 1-513-886-1550 e: casto.robert@gmail.com www.sellerstoolbox.com Tools for Amazon Sellers
@robertcasto, This still seems to be a problem after testing out the latest commits...
The hardware is definitely receiving the command, but the callback never seems to be fired.
I can't seem to find any obvious errors in the browser console. Here's the output log:
2014-12-03 22:14:10.248:INFO::main: Logging initialized @380ms
2014-12-03 22:14:10.396:INFO:oejs.Server:main: jetty-9.2.3.v20140905
2014-12-03 22:14:10.456:INFO:oejs.ServerConnector:main: Started ServerConnector@6581305e{HTTP/1.1}{0.0.0.0:8181}
2014-12-03 22:14:10.456:INFO:oejs.Server:main: Started @632ms
Dec 03, 2014 10:14:10 PM qz.ws.PrintWebSocketServer runServer
INFO: Server started on port 8181
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onConnect
INFO: Server connect: /0:0:0:0:0:0:0:1:61153
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=25,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"listMessages"}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"listMessages"}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"listMessages","result":[{"name":"append","returns":"void","parameters":1},{"name":"clear","returns":"void","parameters":0},{"name":"getException","returns":"class java.lang.Throwable","parameters":0},{"name":"print","returns":"void","parameters":0},{"name":"getEncoding","returns":"class java.lang.String","parameters":0},{"name":"getVersion","returns":"class java.lang.String","parameters":0},{"name":"setEncoding","returns":"void","parameters":1},{"name":"printPS","returns":"void","parameters":0},{"name":"append64","returns":"void","parameters":1},{"name":"appendXML","returns":"void","parameters":2},{"name":"printHTML","returns":"void","parameters":0},{"name":"appendHTML","returns":"void","parameters":1},{"name":"appendFile","returns":"void","parameters":1},{"name":"appendImage","returns":"void","parameters":2},{"name":"appendImage","returns":"void","parameters":3},{"name":"appendImage","returns":"void","parameters":3},{"name":"appendImage","returns":"void","parameters":4},{"name":"appendImage","returns":"void","parameters":1},{"name":"setLanguage","returns":"void","parameters":1},{"name":"appendPDF","returns":"void","parameters":1},{"name":"printToFile","returns":"void","parameters":1},{"name":"printToFile","returns":"void","parameters":0},{"name":"printToHost","returns":"void","parameters":1},{"name":"printToHost","returns":"void","parameters":2},{"name":"printToHost","returns":"void","parameters":2},{"name":"appendNull","returns":"void","parameters":0},{"name":"appendHex","returns":"void","parameters":1},{"name":"isActive","returns":"boolean","parameters":0},{"name":"getMacAddress","returns":"class java.lang.String","parameters":0},{"name":"getCopies","returns":"int","parameters":0},{"name":"setSerialEnd","returns":"void","parameters":1},{"name":"getIPAddress","returns":"class java.lang.String","parameters":0},{"name":"getMac","returns":"class java.lang.String","parameters":0},{"name":"getError","returns":"class java.lang.Throwable","parameters":0},{"name":"setPrinter","returns":"void","parameters":1},{"name":"getJobName","returns":"class java.lang.String","parameters":0},{"name":"setCopies","returns":"void","parameters":1},{"name":"setAutoSize","returns":"void","parameters":1},{"name":"setPaperSize","returns":"void","parameters":2},{"name":"setPaperSize","returns":"void","parameters":3},{"name":"getIP","returns":"class java.lang.String","parameters":0},{"name":"getLogPostScriptFeatures","returns":"boolean","parameters":0},{"name":"isAlternatePrinting","returns":"boolean","parameters":0},{"name":"setLogPostScriptFeatures","returns":"void","parameters":1},{"name":"useAlternatePrinting","returns":"void","parameters":1},{"name":"useAlternatePrinting","returns":"void","parameters":0},{"name":"send","returns":"void","parameters":2},{"name":"getCharset","returns":"class java.nio.charset.Charset","parameters":0},{"name":"getPorts","returns":"class java.lang.String","parameters":0},{"name":"closePort","returns":"void","parameters":1},{"name":"getSerialIO","returns":"class qz.common.SerialIO","parameters":0},{"name":"findPrinter","returns":"void","parameters":0},{"name":"findPrinter","returns":"void","parameters":1},{"name":"getPrinter","returns":"class java.lang.String","parameters":0},{"name":"getPrinters","returns":"class java.lang.String","parameters":0},{"name":"openPort","returns":"void","parameters":2},{"name":"openPort","returns":"void","parameters":1},{"name":"openPort","returns":"void","parameters":2},{"name":"openPort","returns":"void","parameters":1},{"name":"findPorts","returns":"void","parameters":0},{"name":"setSerialBegin","returns":"void","parameters":1},{"name":"appendHTMLFile","returns":"void","parameters":1},{"name":"getOrientation","returns":"class java.lang.String","parameters":0},{"name":"setEndOfDocument","returns":"void","parameters":1},{"name":"setSerialProperties","returns":"void","parameters":5},{"name":"setSerialProperties","returns":"void","parameters":5},{"name":"findNetworkInfo","returns":"void","parameters":0},{"name":"setDocumentsPerSpool","returns":"void","parameters":1},{"name":"clearException","returns":"void","parameters":0}]}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=71,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"isActive","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"isActive","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Calling: isActive[]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"isActive","params":[],"callback":"setupMethods","init":true,"result":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=73,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getVersion","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getVersion","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Calling: getVersion[]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getVersion","params":[],"callback":"setupMethods","init":true,"result":"1.8.5"}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=73,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getPrinter","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getPrinter","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Calling: getPrinter[]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getPrinter","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=68,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getIP","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getIP","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:49 PM qz.ws.PrintSocket processMessage
INFO: Calling: getIP[]
Dec 03, 2014 10:14:49 PM qz.utils.NetworkUtilities gatherNetworkInfo
INFO: Initiating a temporary connection to "www.google.com:80" to determine main Network Interface
192.168.1.10
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getIP","params":[],"callback":"setupMethods","init":true,"result":"192.168.1.10"}
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=69,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getMac","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getMac","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket processMessage
INFO: Calling: getMac[]
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getMac","params":[],"callback":"setupMethods","init":true,"result":"7C7A9195B258"}
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=87,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getLogPostScriptFeatures","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getLogPostScriptFeatures","params":[],"callback":"setupMethods","init":true}
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket processMessage
INFO: Calling: getLogPostScriptFeatures[]
Dec 03, 2014 10:14:50 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getLogPostScriptFeatures","params":[],"callback":"setupMethods","init":true,"result":false}
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=83,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"findPrinter","params":["zebra"],"callback":"qzDoneFinding","init":false}
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"findPrinter","params":["zebra"],"callback":"qzDoneFinding","init":false}
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket convertType
INFO: CONVERTING zebra --> class java.lang.String
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket processMessage
INFO: Calling: findPrinter[zebra]
Dec 03, 2014 10:15:00 PM qz.PrintFunction findPrinter
INFO: ===== SEARCHING FOR PRINTER =====
Dec 03, 2014 10:15:00 PM qz.printer.PrintServiceMatcher getPrinterArray
INFO: Found 4 printers
Dec 03, 2014 10:15:00 PM qz.printer.PrintServiceMatcher findPrinter
INFO: Found 4 attached printers.
Dec 03, 2014 10:15:00 PM qz.printer.PrintServiceMatcher findPrinter
INFO: Printer specified: \Qzebra\E
Dec 03, 2014 10:15:00 PM qz.printer.PrintServiceMatcher findPrinter
INFO: Printer name match: Zebra LP2844
Dec 03, 2014 10:15:00 PM qz.printer.PrintServiceMatcher findPrinter
INFO: Using best match: Zebra LP2844
Dec 03, 2014 10:15:00 PM qz.PrintRaw clear
INFO: Print buffer has been cleared.
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket processMessage
INFO: Selected New Printer
Dec 03, 2014 10:15:00 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getPrinter","params":[],"callback":"setupMethods","init":true,"result":"Zebra LP2844"}
Dec 03, 2014 10:15:01 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getPrinters","params":[],"callback":"setupMethods","init":true,"result":"Zebra LP2844,Microsoft XPS Document Writer,Fax,Epson TM88V"}
Dec 03, 2014 10:15:01 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"findPrinter","params":["zebra"],"callback":"qzDoneFinding","init":false,"result":"void"}
Dec 03, 2014 10:15:04 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=79,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:04 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"findPorts","params":[],"callback":"qzDoneFindingPorts","init":false}
Dec 03, 2014 10:15:04 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"findPorts","params":[],"callback":"qzDoneFindingPorts","init":false}
Dec 03, 2014 10:15:04 PM qz.ws.PrintSocket processMessage
INFO: Calling: findPorts[]
Dec 03, 2014 10:15:04 PM qz.PrintFunction findPorts
INFO: ===== SEARCHING FOR SERIAL PORTS =====
Dec 03, 2014 10:15:05 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getPorts","params":[],"callback":"setupMethods","init":true,"result":"COM3"}
Dec 03, 2014 10:15:05 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"findPorts","params":[],"callback":"qzDoneFindingPorts","init":false,"result":"void"}
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=83,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"openPort","params":["COM3"],"callback":"qzDoneOpeningPort","init":false}
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"openPort","params":["COM3"],"callback":"qzDoneOpeningPort","init":false}
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket convertType
INFO: CONVERTING COM3 --> class java.lang.String
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket processMessage
INFO: Calling: openPort[COM3]
Dec 03, 2014 10:15:07 PM qz.PrintFunction openPort
INFO: ===== OPENING SERIAL PORT COM3 =====
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"openPort","params":["COM3"],"callback":"qzDoneOpeningPort","init":false,"result":"COM3"}
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=50,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getException","params":[],"init":false}
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getException","params":[],"init":false}
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket processMessage
INFO: Calling: getException[]
Dec 03, 2014 10:15:07 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getException","params":[],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=60,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"setSerialBegin","params":["\u0002"],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"setSerialBegin","params":["\u0002"],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Calling: setSerialBegin[]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"setSerialBegin","params":["\u0002"],"init":false,"result":"void"}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=54,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"setSerialEnd","params":["\r"],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"setSerialEnd","params":["\r"],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
--> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"setSerialEnd","params":["\r"],"init":false,"result":"void"}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=85,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"setSerialProperties","params":["9600","7","1","even","none"],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"setSerialProperties","params":["9600","7","1","even","none"],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING 9600 --> int
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING 7 --> int
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING 1 --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING even --> int
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
WARNING: Method setSerialProperties failed: For input string: "even", will try overloaded method if one exists
java.lang.NumberFormatException: For input string: "even"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.valueOf(Integer.java:556)
at java.lang.Integer.decode(Integer.java:984)
at qz.ws.PrintSocket.convertType(PrintSocket.java:271)
at qz.ws.PrintSocket.processMessage(PrintSocket.java:137)
at qz.ws.PrintSocket.onMessage(PrintSocket.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:71)
at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:68)
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextMessage(JettyAnnotatedEventDriver.java:209)
at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:64)
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onTextFrame(JettyAnnotatedEventDriver.java:201)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:160)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:302)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:613)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:468)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
at java.lang.Thread.run(Thread.java:745)
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING 9600 --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING 7 --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING 1 --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING even --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING none --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Calling: setSerialProperties[9600, 7, 1, even, none]
Dec 03, 2014 10:15:10 PM qz.utils.SerialUtilities parseBaudRate
INFO: Parsed serial setting: 9600=BAUDRATE_9600
Dec 03, 2014 10:15:10 PM qz.utils.SerialUtilities parseDataBits
INFO: Parsed serial setting: 7=DATABITS_7
Dec 03, 2014 10:15:10 PM qz.utils.SerialUtilities parseStopBits
INFO: Parsed serial setting: 1=STOPBITS_1
Dec 03, 2014 10:15:10 PM qz.utils.SerialUtilities parseParity
INFO: Parsed serial setting: even=PARITY_EVEN
Dec 03, 2014 10:15:10 PM qz.utils.SerialUtilities parseFlowControl
INFO: Parsed serial setting: none=FLOWCONTROL_NONE
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"setSerialProperties","params":["9600","7","1","even","none"],"init":false,"result":"void"}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=86,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"send","params":["COM3","\nW\n"],"callback":"qzSerialReturned","init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"send","params":["COM3","\nW\n"],"callback":"qzSerialReturned","init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING COM3 --> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket convertType
INFO: CONVERTING
W
--> class java.lang.String
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Calling: send[COM3,
W
]
Dec 03, 2014 10:15:10 PM qz.PrintFunction logCommands
INFO:
W
Dec 03, 2014 10:15:10 PM qz.common.SerialIO send
INFO: Sending data to [COM3]:
W
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"send","params":["COM3","\nW\n"],"callback":"qzSerialReturned","init":false,"result":"[\"COM3\",\"\"]"}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=50,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket onMessage
INFO: Request: {"method":"getException","params":[],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Server message: {"method":"getException","params":[],"init":false}
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket processMessage
INFO: Calling: getException[]
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"getException","params":[],"init":false}
Dec 03, 2014 10:15:10 PM qz.common.SerialIO serialEvent
INFO: 000.00
Dec 03, 2014 10:15:10 PM qz.ws.PrintSocket sendResponse
INFO: Response: {"init":false,"callback":"qzSerialReturned","result":"[\"COM3\",\"\u0002000.00\"]"}
Dec 03, 2014 10:15:54 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=4,fin=true,rsv=...,masked=true]
Dec 03, 2014 10:16:54 PM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=4,fin=true,rsv=...,masked=true]```
So, the qz.closePort()
callback says "undefined" was successfully closed, if that helps investigation.
-Tres
Thanks. I'll look in the morning. A lot to review here.
On Wed, Dec 3, 2014 at 10:31 PM, Tres Finocchiaro notifications@github.com wrote:
So, the qz.closePort() callback says "undefined" was successfully closed, if that helps investigation.
[image: image] https://cloud.githubusercontent.com/assets/6345473/5293245/191647d2-7b3c-11e4-8d21-0019d6bbb9d9.png
-Tres
Reply to this email directly or view it on GitHub https://github.com/qzind/qz-print/issues/1#issuecomment-65532917.
Robert Casto Owner | SellersToolbox p: 1-513-847-4942 c: 1-513-886-1550 e: casto.robert@gmail.com www.sellerstoolbox.com Tools for Amazon Sellers
@robertcasto So this is still broken... Here is what Chromes console says:
Finished processing message
qz-websocket.js:103 Message:
qz-websocket.js:104 Object {init: false, callback: "qzSerialReturned", result: "["COM3","000.00"]"}
sample_ws.html:1 Uncaught SyntaxError: Unexpected token
And from the server:
Dec 12, 2014 1:03:51 AM qz.ws.PrintSocket sendResponse
INFO: Response: {"method":"send","params":["COM3","\nW\n"],"init":false,"result":"[\"COM3\",\"\"]"}
Dec 12, 2014 1:03:51 AM qz.common.SerialIO serialEvent
INFO: 000.00
Dec 12, 2014 1:03:51 AM qz.ws.PrintSocket sendResponse
INFO: Response: {"init":false,"callback":"qzSerialReturned","result":"[\"COM3\",\"\u0002000.00\"]"}
org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at org.eclipse.jetty.websocket.common.WebSocketSession.getRemote(WebSocketSession.java:245)
at qz.ws.PrintSocket.sendResponse(PrintSocket.java:255)
at qz.ws.PrintSocket.sendResponse(PrintSocket.java:249)
at qz.ws.PrintSocket.access$000(PrintSocket.java:22)
at qz.ws.PrintSocket$1.run(PrintSocket.java:165)
Dec 12, 2014 1:03:51 AM qz.ws.PrintSocket sendResponse
INFO: Response: {"init":false,"callback":"qzSerialReturned","result":"[\"COM3\",\"\u0002000.00\"]"}
Dec 12, 2014 1:04:40 AM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=4,fin=true,rsv=...,masked=true]
Dec 12, 2014 1:05:41 AM qz.ws.PrintSocket onFrame
INFO: Server frame: TEXT[len=4,fin=true,rsv=...,masked=true]
I wonder if there a raw hex character breaking the print stream? How does json encode special characters?
I wanted to clarify that the result that Chrome is getting back in the console appears to be perfect, so we may have some hex escaping that we need to accommodate for, namely that \u0002, which is the valid STX character for the scale.
Closed via 77b46269ca49718caeabb9e5e2efb778713f0727
@robertcasto this is what I'm seeing from the IntelliJ console:
However, the weight value from the scale doesn't appear to be making it to the web browser.