Modular Clock Rev 4 Fails on Reset

More
2 months 2 weeks ago #12821 by Ty_Eeberfest
So if I read you right you are saying the clock will start properly at power-up, without needing a button reset, with the WiFi module in place, provided that the WiFi module is in access point mode waiting to be associated/connected to your network. True?? This could be important.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #12822 by mgerde
After a button reset of the clock controller, the clock will start on powerup regardless of what mode the wifi controller is in. They will just not communicate. Sometimes the wifi controller will connect to network and other times it will just stay in AP mode (fail to connect) but there is no change in the clock behavior. Only after I fully reset the wifi module (after clock controller reset) and get both controllers communicating/working together will I start to see the problem after a power cycle. After the crash occurs, I have seen the wifi module in both modes, both connected and in AP mode but the crash persists.

Please Log in or Create an account to join the conversation.

More
2 months 5 days ago #12840 by mgerde
Ok, so I have updated the firmware on both controllers (0358 and v59a). I am running into issues with the wifi modules now. I cannot get them to connect to my wifi network. (I have tried more than one network as well). The controller will go into AP mode and I can connect to it to save the SSID/password. It will sometimes take several attempts to save the credentials until it resets itself and tries to connect. Once it does reset and try to connect, this is the LED pattern I am seeing.

Video

It is not the constant 1 blink/second I am used to seeing while it is trying to connect. Is it constantly resetting itself? When I use my phone hotspot as the Wifi network, I can see it connect just momentarily then disconnect a second later while I am seeing this blinking pattern. It repeats this cycle for a while then eventually does go into the AP mode w/ fast blinking.

I cannot get to the point of connecting, changing time/clock settings, and trying to reproduce the original error.

Please Log in or Create an account to join the conversation.

More
2 months 1 day ago #12845 by Ty_Eeberfest
The blue LED looks like it's "stuttering" every 5 or so seconds. Is that real or is it only in the video (some shutter effect)? If it's real then I would tend to agree that it's resetting itself for some reason.

Ian?

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
2 months 1 day ago #12847 by mgerde
Yes, that is correct, it is stuttering, not a constant blink. It is not from the camera. I'm not sure if it was a hardware or software issue. I tried uploading some of the example programs in the Arudino IDE onto the wifi controllers and I was able to connect them to my network and serve a simple webpage. I had the controller plugged into the programmer board when I did that test, not the clock board, just to confirm I had not damaged the controller in some way.

I have attached the settings I'm using to upload the firmware to confirm I'm not causing a problem there either.
Attachments:

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks ago - 1 month 4 weeks ago #12849 by Ty_Eeberfest
Your settings look okay to me.

When you compiled the code did you make sure your libraries are the exact versions specified in the comments in Lines 53 - 55? Note that they are not necessarily the latest versions of the libraries so it may be necessary to downgrade, which fortunately is not difficult using the Arduino IDE's library manager.

I have encountered bizarre misbehavior myself by thinking I'd be okay compiling against latest/greatest libraries. One of the unfortunate realities of Arduino Land is that there's no standardization of library development practices so it's common for "updated" libraries to contain breaking changes that aren't mentioned in release notes. Actually more like "what release notes??" in some cases.

I'm pasting Lines 53 - 55 below for easy reference - we shall see if they actually display legibly!
#include <WiFiManager.h>
// https://github.com/tzapu/WiFiManager  (0.15.0)

#include <ArduinoJson.h>
// https://github.com/bblanchon/ArduinoJson (5.13.2)

#include <TimeLib.h>
// http://playground.arduino.cc/code/time (Margolis 1.5.0)
// https://github.com/michaelmargolis/arduino_time

As an afterthought, I see the comments in Lines 10 - 11 also name specific versions of Arduino IDE and the ESP8266 package. I'm not sure how important it is for these to match exactly. Your Settings menu looks a little different from mine so I suspect your ESP package is newer than my 2.7.4.version. May or may not matter.

EDIT: I just performed the entire ritual of getting a fresh download of the source code, compiling using all the recommended IDE, ESP package and library versions, loading it into a known good ESP01 module (after totally erasing the ESP) and sticking it into a working clock board. It worked as expected, including the initial Access Point mode. Super fast blinking of the blue LED during access point mode, once per second blink once associated with my WiFi but before NTP contact established, once per second quick "blips" once it got time from NTP and settled into normal operation.

From this I think it's safe to rule out errors in the latest version of the code.

Look into it later when the dust is clearing off the crater.
Last edit: 1 month 4 weeks ago by Ty_Eeberfest.

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.101 seconds
Go to top
JSN Boot template designed by JoomlaShine.com