C J MULLER
@cjm3115 I am not very clear about what you are asking. Since I do not have a CONNECT I can't test. It took a while but I finally found the board manager for the CONNECT. Looking at the libraries then I see no WiFi library specific to that board. There are however a few custom libraries for WiFi including over a dozen examples for a WebServer.
Perhaps if you could use one of the examples to point out where it is failing then we would have a common understanding.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Hi @cjm3115,
Like Ron (@zander), when I first read your message earlier, I was unclear about your question and delayed responding whilst I pondered what the question was. In particular you say:
I am getting bogged down with trying to reboot the WiFi after the access point code. I am not using any WiFi manager and do not really wish to.
By 'WiFi Manager', I assume you mean a router, which is often used as the central hub in a domestic WiFi situation, linking the local machines, possibly allocating IP addresses, etc, as well as connectingto the Internet. So, if your network is purely local, I can understand why you might decide to make one of your nodes an Access Point, so that it preforms this central hub task.
But I am still confused as to what you mean by " trying to reboot the WiFi ", in the context of the rest of the sentence. Perhaps you could explain please, including providing a description of the network you envisage.
At this stage, I am assuming all of your nodes are reasonably generic with regard to WiFi hardware provision, so that it could be something relatively commmon, such as a few ESP32s, as I doubt if anyone on the forum will have a exact match of boards to yours.
Best wishes and good luck, Dave
@davee WiFi manager is a library that Bill covered in
It allows you to NOT hard code credentials in source plus some other functions.
Anytime you see a device start-up on 192.168.4.1 you can be fairly sure it is using one of the many WiFi Manager libraries.
It is simple enough not to use a WiFi manager, it just requires more detailed steps.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@davee I just noticed your final comment re esp32. He is using the Arduino NANO RP2040 Connect which is defined in the "Arduino Mbed OS Nano boards". Check the attached screen shots for clarification. The key point here is that many of these 'special' boards have different WiFi libraries. Trust me I know first hand.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Hi Ron @zander,
Thanks for the clarification .. as you say, I probably misinterpreted 'WiFi Manager' ... that is why we both asking for more detail!
And my suggestion regarding hardware, was only as a 'model' to get a conversation started ... obviously the actual code will have differences. The chance of anyone else having a few of the Nano Connects mentioned, ready to try out, seemed rather unlikely, but maybe they have similar network using something more common, that could prvide some insight.
Best wishes, Dave
@davee The good news is that the CONNECT board does NOT have a WiFi sample so that means the 'normal' samples will work. Unfortunatly I checked the ESP32, NODE MCU, PICO W and UNO R4 WiFi and they all use board specific examples. The NANO 33IoT looks like it will work and I know I have one and maybe others do as well as it was more popular for IoT projects.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander I have added [ WiFi.end(); ] before disconnecting and setting up standard WiFi.
I also automated everything, so that the WiFi automatically reconfigures sending the data using ajax, after this and a 90 second timeout the JavaScript continues with a [ self.location= 'http://SW_ipa1.SW_ipa2.SW_ipa3. SW_ipa4'; call.]
Excerpt :-
-> WiFi.end();
dump= WiFi.disconnect();
C J MULLER
@daveeI have added [ WiFi.end(); ] before disconnecting and setting up standard WiFi.
I also automated everything, so that the WiFi automatically reconfigures sending the data using ajax, after this and a 90 second timeout the JavaScript continues with a [ self.location= 'http://SW_ipa1.SW_ipa2.SW_ipa3. SW_ipa4'; call.]
Excerpt :-
-> WiFi.end();
dump= WiFi.disconnect();
delay(100);
WiFi.config(IPAddress(SW_ipa1, SW_ipa2, SW_ipa3, SW_ipa4));
// Connect to Wi-Fi network with SSID and password
if(WiFi.status() != WL_CONNECTED)done=false;
do
{
if(ssid_num ==-1)WiFi.begin(WiFi_SSID, WiFi_PASSWD);
elseif(ssid_num >-1)WiFi.begin(SSID[ssid_num],PASSWD[ssid_num]);
elseif(ROUTER >0)WiFi.begin(SSID[ROUTER], PASSWD[ROUTER]);
// wait 10 seconds for connection:
delay(3000);
WiFi_currentTime =millis();
if(WiFi.status() == WL_CONNECTED)done=true;
}
while((!done) && ((WiFi_currentTime - WiFi_previousTime) <= WiFi_TIMEOUT));
Problem solved.
C J MULLER
@cjm3115 Good to hear, but in the future please learn how to post code so others can read it. Also post the complete code or if too big, post the file and/or more context so others may learn.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.