Search found 223 matches

by davef
Tue Apr 20, 2021 7:55 pm
Forum: Pyboard D-series
Topic: ntptime kills the wifi station, hard reset required to fix
Replies: 11
Views: 527

Re: ntptime kills the wifi station, hard reset required to fix

Hi Peter, Thanks heaps for identifying what hopefully is the cause of ntptime freezing in my system. You might rewrite it as follows: :) I would really like to be able to rewrite, add, change source code and re-build. Latest effort here https://forum.micropython.org/viewtopic.php?f=2&t=9886 . I am p...
by davef
Tue Apr 20, 2021 11:06 am
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 9
Views: 362

Re: How do you catch getaddrinfo() errors

On the RaspberryPi application that I am porting to the ESP devices I would ping 8.8.8.8 to ensure at least the internet was available.

I'll will consider your suggestions to make more appropriate tests for the smtp.gmail.com server.

Thanks,
Dave
by davef
Tue Apr 20, 2021 12:34 am
Forum: Pyboard D-series
Topic: ntptime kills the wifi station, hard reset required to fix
Replies: 11
Views: 527

Re: ntptime kills the wifi station, hard reset required to fix

Still struggling with this issue on a ESP32. I managed to log one error calling ntptime.settime(). Unfortunately, I am not able to catch the system error, because the device appears to lock up on an unsuccessful call to ntptime.setttime(), ie "pass" is not executed so that it can try again. while (c...
by davef
Mon Apr 19, 2021 7:36 pm
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 9
Views: 362

Re: How do you catch getaddrinfo() errors

Based my comment on: https://www.sourceonetechnology.com/gmail-ip-address-ranges/ Yes, that’s a lot of different address ranges, and it’s likely that these Gmail IP address ranges will change over time and in the future, "change over time" is rather imprecise. As I get a new ntptime each day I might...
by davef
Mon Apr 19, 2021 9:39 am
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 9
Views: 362

Re: How do you catch getaddrinfo() errors

OK on it being for C writers. The device is freezing if left unattended. I think these might the "random events" that I have heard mentioned before for the ESP32. A software WDT recovers that situation, but because my data file is on ramdisk I currently lose it. I could save it before trying to send...
by davef
Mon Apr 19, 2021 7:40 am
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 9
Views: 362

Re: How do you catch getaddrinfo() errors

Hi Peter, Working with your suggestion of checking that Gmail's SMTP server is accessible I am going to try this: import usocket as socket from socket import AF_INET, SOCK_STREAM import utime import machine def check_address(): s = socket.socket(AF_INET, SOCK_STREAM) s.settimeout(120) count = 0 whil...
by davef
Sun Apr 18, 2021 10:13 pm
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 9
Views: 362

Re: How do you catch getaddrinfo() errors

At one stage I was displaying the error: error: -202 but don't how to handle it. What seems to happens is that after displaying the error the machine just freezes. Can one stop OS system errors from freezing the ESP32? I suspect there is quite a bit I don't know about system errors and how to recove...
by davef
Sat Apr 17, 2021 10:47 pm
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 9
Views: 362

How do you catch getaddrinfo() errors

Sometimes getaddrinfo() doesn't work in a uMail application I run. This test script will run, expected output is <None> for random numbers of times before it fails ... with no error messages being displayed. I see fails in 3 - 20 calls , so I am hoping that every once in awhile it will fail on the f...
by davef
Fri Apr 16, 2021 10:17 pm
Forum: Pyboard D-series
Topic: ntptime kills the wifi station, hard reset required to fix
Replies: 11
Views: 527

Re: ntptime kills the wifi station, hard reset required to fix

Peter, Thank you for posting a test procedure for this issue. I run through this procedure multiple times. esp32-idf4-20210202-v1.14.bin ... 671927753 >>> ntptime.time() 671927754 >>> ntptime.time() 671927754 >>> ntptime.time() -3155673600 >>> ntptime.time() Traceback (most recent call last): File "...
by davef
Fri Apr 09, 2021 2:50 am
Forum: Pyboard D-series
Topic: ntptime kills the wifi station, hard reset required to fix
Replies: 11
Views: 527

Re: ntptime kills the wifi station, hard reset required to fix

I'd like to have 1 or 2 PYboard Ds. I think Peter Hinch has one. I issue I had was I think ntptime() was throwing an error that I couldn't catch, which led to the ESP32 just freezing. And that was extra to the TIMEOUT errors it often threw. A software WDT "sorted" that issue on the ESP32 and wasn't ...