WiFi.setAutoConnect issues

84 views
Skip to first unread message

Jonathan M Nasif

unread,
Jun 11, 2024, 1:16:21 PM6/11/24
to painlessmesh-user
I am using my ESP32 as a root node to receive telemetry signals from a separate Arduino module. I keep running into an issue where it says that WiFiClass has no member named setAutoConnect. It tries to correct it to setAutoReconnect. Is it fine if I change the source code or will this cause issues/how do I fix this because I haven't found anything in any source files.

I updated some libraries today and painlessMesh and my timers started acting up.

my current code is:

#include "painlessMesh.h"

#define   MESH_PREFIX     "mesh123"
#define   MESH_PASSWORD   "pass123"
#define   MESH_PORT       5555

Scheduler userScheduler;
painlessMesh  mesh;

uint32_t ID;
hw_timer_t * timer = NULL;

void receivedCallback( uint32_t from, String &msg ) {
  Serial.printf("Received from %u msg= %X %s\n", from, from - 1, msg.c_str());
}

void newConnectionCallback(uint32_t nodeId) {
  Serial.printf("New Connection, nodeId = %u\n", nodeId);
  mesh.sendBroadcast("root");
}

void changedConnectionCallback() {
  Serial.printf("Changed connections\n");
}

void IRAM_ATTR Timer0_ISR(void) {

  mesh.sendBroadcast("sending");

}

void setup() {
  Serial.begin(115200);
 
  mesh.setDebugMsgTypes( ERROR | STARTUP );  

  mesh.init( MESH_PREFIX, MESH_PASSWORD, &userScheduler, MESH_PORT );
  mesh.onReceive(&receivedCallback);
  mesh.onNewConnection(&newConnectionCallback);
  mesh.onChangedConnections(&changedConnectionCallback);
  mesh.setRoot();
  mesh.setContainsRoot();

  timer = timerBegin(0, 80, true);
  timerAttachInterrupt(timer, &Timer0_ISR, true);
  timerAlarmWrite(timer, 500000, true);
  timerAlarmEnable(timer);

}

void loop() {
  mesh.update();
}

Jonathan M Nasif

unread,
Jun 11, 2024, 1:54:15 PM6/11/24
to painlessmesh-user
I tried changing the source code with the error, and it only ended up having the output become "E (1180060) wifi:CCMP mgmt frame from **:*:**:** used non-zero reserved bit" instead of its usual.

Jonathan M Nasif

unread,
Jun 11, 2024, 1:54:41 PM6/11/24
to painlessmesh-user

Ralph McCleery

unread,
Jun 11, 2024, 11:25:44 PM6/11/24
to painlessmesh-user
There have been WiFi API changes so my guess is you updated your ESP32 board library to 3.0.1
This build has broken many libraries with all it changes.


Jonathan M Nasif

unread,
Jun 12, 2024, 5:37:38 AM6/12/24
to painlessmesh-user
is there a way to go back?

Jonathan M Nasif

unread,
Jun 12, 2024, 5:53:44 AM6/12/24
to painlessmesh-user
I found it in this forum: https://forum.arduino.cc/t/compilation-error-i2s-read-bytes-was-not-declared-in-this-scope/1201475/10
It seems that 3.0.0 also does not work, but 2.0.17 does.

niel joubert

unread,
Jun 19, 2024, 9:16:40 AM6/19/24
to painlessmesh-user
I have the same issue
Message has been deleted

Hongyi Tu

unread,
Jul 1, 2024, 6:48:29 AM7/1/24
to painlessmesh-user
esp32 (by espressif) V2.0.17 works well. Thanks a lot!
Reply all
Reply to author
Forward
0 new messages