Go Down

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

gibbon

Ok, but im not sure if the code you posted was a modification to the "websocket library" code or for use in the arduino IDE, if its for arduino IDE then its pointless as i cant event connect to the server, as ive stated in my above posts.

when i plug the arduino into the GSM router that has a internet connect i cannot connect to the server, yet plugging the arduino into a normal intenet router (home internet) it connects fine.

Andy

SurferTim

I would use my code in your sketch. Where are you using your current code now?

gibbon

Ok, i dont want to rewrite it all as its all in the above posts, my code is, the problem is and what libaray im using is.

As i said, if you read the early posts you will see that your code to use in my sketch is  insignificant as im not trying to download bytes using my sketch aim tryign to make a connection to a pusher-app server or my custom websocket server using a GSM router. The code pylon was referring to was the websocket library code.

Andy


pylon

@SurferTim: He cannot take your code because the connection is not closed by the server after the reception of the handshake lines. It just reads the first few lines from the server and checks for the connection OK string, then returns a success flag.

@OP: The code I posted is a replacement for the appropriate code in the library, not for use in your sketch. The library is not prepared for a result not being delivered in one packet. The length of 14 is the length of the string the library is testing for plus carriage return and linefeed. If you get more characters: OK but you have to get at least this much to be able to successfully check for a proper connection initialization.

gibbon

Cheers for the clearup pylon, i was aware you meant the library code and i have tried changing it but to still no avail.

Any other ideas? Im sure the response string is large than 14 bytes?

Thanks
Andy

Go Up