Ok, i have also removed them but still the same issue,
It was just to re-create and show you what and where the issue was as per your suggestions,
i would not like it too but you have seen i just re-produced the issue with fresh .ino files therefore no need to relate anything from the previous posts and replies
I think the language barrier is the cause of misunderstanding, after all those steps have been taken which were recommended by you,
specially after this line
I am still expecting you would point to some logic where the code is hanging/blocking, it is crystal clear in my last above replies as all those steps were taken under your directions, please tell me what point is not understandable at least.
It is also a good suggestion unfortunately has been tried and no luck, also the piggy-backing timer works fine. BTW i did not understand the word āpiggy-backingā
as the edgentTimer always run during the different mode changes therefore canāt be neglected/left so easily, also the edgentTimer is itself a Blynktimer object therefore it is not problematic in any case.
again repeating blynk.run() in the config.h is blocking the code when āpower on but no internet caseā, should we declare it the a bug in blynk library dear Pete ?
Iāve taken a step back from this topic because you havenāt taken on board my suggestion to present your aims and the issues you are facing in a clear and concise manner.
All Iām seeing is lots of serial output without any corresponding commentary, and repeated comments that youāre simply doing what Iāve asked you to do.
Iāll happily come back to it if you start from the beginning and explain the issue in detail and document what problems you are encountering, with updated code and focussed and well documented serial output which relates to that code and demonstrates these issues.
From what I understand, BLYNK Edgent is blocking. That is, without internet it just keeps on trying to connect, and will not allow other parts of the program to run.
Someone please correct me if this has changed, or if I am wrong about this.
@PeteKnight Well, you have taken a step back but you did not point the un-understandable point in my code and serial output i just request you to re-create the problem by using simple code which i have posted. There is only one simple problem
That simple code is not executing when i power my ESP12E when internet is not available, thatās it.
I am wondering what part of serial outputs are not understandable in my previous posts, its quite weird, i need your help seriously bro. Iāve mentioned the problem, the piece of code and the serial output, what can i give further more?
I donāt think I could be much clearer about the fact that dumping hundreds of lines of serial output into the topic without any commentary isnāt helping others to understand what point you are trying to demonstrate with each of these pieces of information.
It wonāt. Blynk.begin is a blocking function. The solution is to manage the WiFi connection yourself, then use Blynk.config and Blynk.begin to establish the connection to the Blynk server in a non-blocking way if the connection canāt be made.
Blynk.run (or BlynkEdgent.run) will also force Blynk to try to re-connect each time itās called, so a Blynk.connected test is needed to avoid this slowing down the code execution.
@John93 i mean that first of all just make sure that your device has no internet access and then power it up and show me the serial output.
@PeteKnight I told you that i am facing the stopping of code execution at Blynk.run() inside this function void enterConnectCloud() and specifically i would say its a Blynk.connect() inside the Blynk.run() which is cause of stopping the code execution.
Its important, i am using BlynkEdgent.begin() and BlynkEdgent.run() therefore it was assumed that no more blocking will be faced due to newly upgraded Blynk.Edgent libraries,
I would like to try this suggestion also and soon will show you the output, however i supposed these tasks were now taken care completely by the Blynk.Edgent
and so far for this, i am tell you this Blynk.connected test is being very well carried out by Blynk.Edgent, here you can see in Configmode.h file
while ((timeoutMs > millis()) && (!Blynk.isTokenInvalid()) && (Blynk.connected() == false))
{
delay(10);
Blynk.run();
app_loop();
if (!BlynkState::is(MODE_CONNECTING_CLOUD))
{Blynk.disconnect();
return;}
}
There isnāt a Blynk.Edhent library as such. All of the ālibraryā files are contained within the sketch, so you have full visibility of what they do and when.
As you can see when you look at the .h tabs within the example file, Blynk.Edgent is simply a wrapper for the underlying Blynk library files, which have changed very little since Blynk Legacy.
Yes, this will try to execute Blynk.run every time itās called and Blynk.connected is false. When using Blynk.config every time Blynk.run is called when Blynk.connected is false, a re-connection attempt to the server will be made. This has a default timeout of 30 seconds, so calling it constantly will in effect block all code execution when a connection is not possibleā¦
We seem to be having a conversation about the same issue in two different places. Maybe you should choose one place and stick to it, and try to phrase your questions/comments way that are easier to follow.
I think weāre talking about two different timeouts here. Iām referring to the default that is applied if you donāt specify a timeout period in the Blynk.connect() command.