Open antoniosap opened 6 years ago
this branch does ( at least for server, client not tested yet ). works with ethernet shield 1 and 2
Hello, yes ist an answering an old message. But, i want to use the lib with an DUE also als "antoniosap". But the meag version 1.3 do run but dos not work. Debugging can not be done, so printf is not there.
@NitrofMtl please advice what version do you mean, and what is to too to get it running. On Arduino DUE with Ethernet shield 5100. Also as you i want to runn the Server.
Please Help! Tank you for advice ! Or anyone can help with this. greedings Jake
PS: i found some Tips in Issue 221 but helped not so much, Chrome/Firefox dos not work.
@jakespeed1311. Hi.
technically, with the latest Ethernet lib, it should not be a problem with the ws library(not tested myself). but to debug, you could just mute the fprint statement and just use standard Serial.print() function. also, I recall Ethernet lib still do not have .remoteIP(num). mute it or add it to the library.
In my part, I needed server for my project. client still not work. Here the modify version I did make, If that can help you: https://github.com/NitrofMtl/arduinoWebSockets
HI, Thanks, for that fast respondig ! i cloud add the printf statement so debugging works. I try our lib now. Because the one here give me an Incorrect "Sec-Wevsocket- accept" error, from chrome and Firefox. And for my reading this means that the sec-websock-key in the answer from the Server is wrong.
I am working with the WegSocketServer.ino examble and the websocket.html. Ok, i am new to this, but and i am not shure if i have lost some settings to do! Tank you Jake
Request Method: GET
Status Code: 101 Switching Protocols HTTP/1.1 101 Switching Protocols Server: arduino-WebSocketsServer Upgrade: websocket Connection: Upgrade Sec-WebSocket-Version: 13 Sec-WebSocket-Accept: Kfh9QIsMVZcl6xEPYxPHzW8SZ8w= Sec-WebSocket-Protocol: arduino Accept-Encoding: gzip, deflate Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 Cache-Control: no-cache Connection: Upgrade Host: 192.168.0.111:81 Origin: http://192.168.0.111 Pragma: no-cache Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Sec-WebSocket-Key: I3EvcQM0hDQznw/7CPJLng== Sec-WebSocket-Protocol: arduino Sec-WebSocket-Version: 13 Upgrade: websocket User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
#######################
Server Side:
2:16:22.328 -> [WS-Server][0] new client 12:16:22.328 -> [WS-Server][0][handleHeader] RX: GET / HTTP/1.1 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Host: 192.168.0.111:81 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Connection: Upgrade 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Pragma: no-cache 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Cache-Control: no-cache 12:16:22.328 -> [WS-Server][0][handleHeader] RX: User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Upgrade: websocket 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Origin: http://192.168.0.111 12:16:22.328 -> [WS-Server][0][handleHeader] RX: Sec-WebSocket-Version: 13 12:16:22.359 -> [WS-Server][0][handleHeader] RX: Accept-Encoding: gzip, deflate 12:16:22.359 -> [WS-Server][0][handleHeader] RX: Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 12:16:22.359 -> [WS-Server][0][handleHeader] RX: Sec-WebSocket-Key: I3EvcQM0hDQznw/7CPJLng== 12:16:22.359 -> [WS-Server][0][handleHeader] RX: Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits 12:16:22.410 -> [WS-Server][0][handleHeader] RX: Sec-WebSocket-Protocol: arduino 12:16:22.410 -> [WS-Server][0][handleHeader] Header read fin. 12:16:22.410 -> [WS-Server][0][handleHeader] - cURL: / 12:16:22.410 -> [WS-Server][0][handleHeader] - cIsUpgrade: 1 12:16:22.410 -> [WS-Server][0][handleHeader] - cIsWebsocket: 1 12:16:22.410 -> [WS-Server][0][handleHeader] - cKey: I3EvcQM0hDQznw/7CPJLng== 12:16:22.410 -> [WS-Server][0][handleHeader] - cProtocol: arduino 12:16:22.410 -> [WS-Server][0][handleHeader] - cExtensions: permessage-deflate; client_max_window_bits 12:16:22.410 -> [WS-Server][0][handleHeader] - cVersion: 13 12:16:22.410 -> [WS-Server][0][handleHeader] Websocket connection incomming. 12:16:22.478 -> [WS-Server][0][handleHeader] - sKey: Kfh9QIsMVZcl6xEPYxPHzW8SZ8w= 12:16:22.478 -> [WS][0][sendFrame] ------- send massage frame ------- 12:16:22.478 -> [WS][0][sendFrame] fin: 1 opCode: 9 mask: 0 length: 0 headerToPayload: 0 12:16:22.478 -> [WSc] Connected to url: / 12:16:22.478 -> endFrame] ------- send massage frame ------- 12:16:22.478 -> [WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 9 headerToPayload: 0 12:16:22.478 -> [WS][0][sendFrame] text: Connected 12:16:22.478 -> [WS-Server][0] client connection lost. 12:16:22.478 -> [WS-Server][0] client disconnected. 12:16:24.607 ->
Hello, yes i want to run the Server side on DUE. I have to use the MEGA Branch or do i wrong ? Tanks.
I use my version of websocket for a while. So I can't tell for the one on Links2004. now that you make it compile, I suggest you open a new issue for better help...
thanks