CC3000 issue with WiFi loss

Hi,
I am trying to use Thinger with an Arduino and CC3000 Shield.
I have found that if WiFi Connection is lost, Loop code stops running until connection is re-established. Any outputs that are on at the time of connection loss will remain on until WiFi is again connected.
This is far from ideal if you are controlling anything critical, in my case pH Dosing.
Not ideal for any sort of control.

Thanks, Len Hall.

Hi @LenHall, check this:

Hope it helps :wink:

Hi ega,
Thanks for the reply, I have an ESP32 so I can give it a go.
Just can’t seem to find the two header files you include at the start -
#include “soc/timer_group_struct.h”
#include “soc/timer_group_reg.h”

Do you know where I can download them from?

Hi ega,
Installed Espressif ESC32 Boards in board manager and header files are now installed.
So all is good for now, just have to give it a go.

@ega,
Can’t get connection to Thinger with your Code, connects to WiFi Ok but repeatedly gives this message -
17:24:54.850 → [_SOCKET] Connecting to iot.thinger.io:25202
17:24:54.943 → [_SOCKET] Using secure TLS/SSL connection: yes
17:24:54.990 → [_SOCKET] Error while connecting!

Have tried with Thinger Sample code and it connects ok.
Any ideas?

Hi

Check this:

I have installed the version 1.0.4

Have not tried the last version.

Let us know how it goes.

Thanks @ega ,
I did do that yesterday but code would not compile as it had problems with the soc/timer_group header files. This time I commented that out and it worked but ESP32 kept re-booting because of watchdog timer. I have put a 5sec delay after thinger.handle and now seems to be working, but will monitor it for a while.
Do you think it could be related to the board I am using which is “ESP32 Dev Module”, what are you using.

@ega ,
Tested loss of WiFi and ESP32 still went in to Watchdog trip and continuously rebooted even with the delay.
Found an article in the web that said you can disable the watchdog in either core with this statement in Setup() - disableCore0WDT();

Now all works fine without the timer header files.

Thanks.

Hi, that’s weird that it doesnt compiles

I have the esp board controller version 1.0.4
The thinger version 2.15.0
And the Arduino IDE 1.8.12

The delay solution basically resets the watchdog, not is the most efficient way to do it, as it is basically sends the uC to “do nothing”, that solution to disable the WDT seems soooo good, I was figuring it out when started to work with both cores on the uC, but found the solution that you see on the example posted, but if it works as you say, dont need to worry about the watchdog again, .

Thanks a lot, and enjoy both cores on the ESP32, I love that feature haha.

Yes,
I was worried that the Arduino Platform would not be suitable for our application, but the ESP32 solves the problem for us.

Thanks for your help.