Hello Pete
I apologize for the sloppiness. I have left code segments as they were and did not care to refine them since my focus was to get the code functional. I will focus on refining the sloppiness out once I achieve a working program. I doubt removing the delays will solve the current problem since I have narrowed down the issue to be the within the ConnectToWifiNetwork() and since the code ran perfectly fine without the WiFi management code as I mentioned earlier. But you are right delays don’t generally play well with Blynk in the long run so I will remove them.
As I mentioned in my previous post,again, I have finally managed to adapt the example code to operate according to the logic that I needed. It took me a considerable amount of testing and time to get it that way. Aside from the time it would take to start that process over, I encountered compile errors for the stock example I found in the suggested khoih library. All this will take a considerable longer time to resolve especially considering how close I am to achieving an operational program with this code. I hope this elucidates the benefit to you now.
I have continued experimenting and found that commenting out wifi.config() command from ConnectToWifiNetwork solves my problem almost entirely. There does appear to be some unhappiness only under the circumstance where I start the Wifi manager web portal and select the “Exit portal” option- then the problem I am experiencing persists (ESP32 connects to the network but not to the internet and not to Blynk obviously). This is the only instance where my current program fails so I will have to settle for the work around of restarting the ESP32. I think my actual problem is understanding how the ESP32 needs to be configured to enable a successful network, internet and Blynk connection. I will need to look into this in future. Anyway thanks for the suggestion and remarks.