Go Down

Topic: Ethernet Sheild and GSM router (Read 3 times) previous topic - next topic

pylon

Try inserting debugging output to the serial console. You (we) must get a feeling where it stops so we may find the problematic part and, eventually, even a fix for it. Insert a Serial.print() after almost every line in the WebSocketClient and PusherClient connect methods, put out every character you receive from the server (if any). Post the serial output you get.

gibbon

#26
Oct 10, 2012, 10:52 am Last Edit: Oct 10, 2012, 10:55 am by gibbon Reason: 1
Ive been tryingt o work out how i can do this...Can i put Serial.print in the library code?


Note: So you can :) I really like arduino! Ok ill play now and see whats outgoing and incoming (or rather not doing!)

Thanks
Andy

gibbon

Ok from quick tests, i printed each line sent to server and then i print each line that is returned:

My IP address: 192.168.2.98.
Connecting to server...
*SENT*
GET /app/8bce0224d7dae3e8e75e?client=js&version=1.9.0 HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: ws.pusherapp.com
Origin: ArduinoWebSocketClient
*RECV*
HTTP/1.1 502 Bad Gateway
Date: Wed, 10 Oct 2012 08:59:17 GMT
Content-Type: text/plain
Content-Length: 29

Very strange?

Thanks
Andy

pylon

Hmmh, looks like you had a transparent proxy in between (which wasn't really transparent though). Have you really checked the same telnet sequence as I did over the GSM router? If you haven't your GSM provider probably puts all request on a transparent proxy and that proxy is not able to handle WebSocket requests.

gibbon

Ive not done the telnet ove the GSM, i have used the pusher API to create a connection using Javascript and run that in my laptop browser using the GSM as my internet connection and it connects fine?

Is that not the same?

Thanks
Andy

Go Up