I'm fairly new to this however I managed to successfully implement your script successfully. However I had to make one small change. I had to change the "if(respCode >='4')" to ""if(respCode <'4')". My respCode is always = 255 and I couldn't connect without making the change. I'm using this script on a Mega 2560 with a Sparkfun CC3000 and an authenticated server. Can you explain to me what the respCode is for so I can correctly change my code. Many thanks.