You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I successfully built a simple dualRole BLEuart simple sketch allowing me to connect as Client to a server and simultaneously be connected from a Client to my esp32-s3 as server as the one from Nordic on the nrf52 devices.
There is but a little glitch.
I use these callbacks for connection state:'
//BLE Peripheral Class
class MyServerCallbacks : public BLEServerCallbacks {
void onConnect(BLEServer* pServer) {
Serial.println("Server connected to device!");
deviceConnected = true;
};
//BLE Central Class
class MyClientCallback : public BLEClientCallbacks {
void onConnect(BLEClient* pclient) {
}
void onDisconnect(BLEClient* pclient) {
connected = false;
Serial.println("onDisconnect");
}
};
But the code don't take any difference between both. which means, if the Client connect/disconnect, the server is "seen" as connected/disconnected too and start/stop its tasks.
in short onConnect() doesn't differentiate which server is targeted.
Is it "normal"? I was in the expectation that they would be both differently handled.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I successfully built a simple dualRole BLEuart simple sketch allowing me to connect as Client to a server and simultaneously be connected from a Client to my esp32-s3 as server as the one from Nordic on the nrf52 devices.
There is but a little glitch.
I use these callbacks for connection state:'
But the code don't take any difference between both. which means, if the Client connect/disconnect, the server is "seen" as connected/disconnected too and start/stop its tasks.
in short onConnect() doesn't differentiate which server is targeted.
Is it "normal"? I was in the expectation that they would be both differently handled.
Beta Was this translation helpful? Give feedback.
All reactions