At the moment it's all a bit difficult. The CC3000 driver is horrible and will just randomly stop working if there's any issue with SPI comms. I'm hoping as time goes on we'll find a way to make it more reliable, but what's happening right now is IMO what you want:
You make a request
CC3000 driver (or CC3000) just hangs - however this could just be because of a slow DNS server
Espruino detects the hang, backs out, reboots the CC3000 and reconnects it.
So what you could do is set a timeout before you execute the HTTP request - then if the HTTP request hasn't succeeded by the time the timeout is called, you can just issue it again.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi Sven,
At the moment it's all a bit difficult. The CC3000 driver is horrible and will just randomly stop working if there's any issue with SPI comms. I'm hoping as time goes on we'll find a way to make it more reliable, but what's happening right now is IMO what you want:
So what you could do is set a timeout before you execute the HTTP request - then if the HTTP request hasn't succeeded by the time the timeout is called, you can just issue it again.
Hope that helps,