Skip to content

BLE server connection callbacks being made when BLE client connects or disconnects #7115

Closed
@AlexMompoint

Description

@AlexMompoint

Board

Tiny Pico

Device Description

Just Tiny pico using usb power

Hardware Configuration

I have two other esp32 boards, one acting as a server and one acting as a client just to connect and disconnect from the one I am experiencing the issue I have.

Version

v2.0.3

IDE Name

Arduino IDE

Operating System

Windows 10

Flash frequency

80 MHz

PSRAM enabled

yes

Upload speed

921600

Description

I was given a task use the esp32 as both a server and a client to allow some device to connect to it, and as well to reach out to a server and connect to it. I attempted performing this using the BLE libraries in the arduino esp32.

If the server portion receives a connect, or disconnect, it functions as expected, only the server callbacks are made, but when the client portion connects, or disconnects, it performs the call back for both server and client meaning I can't really use the server callback as just a server callback.

After some more testing the Server doesn't even have to be started the callbacks just need to be set.

Sketch

#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

#define SERVICE_UUID1           "6E400001-B5A3-F393-E0A9-E50E24DCCA9E" // UART service UUID

bool doScan = true;
bool deviceConnected = false;

BLEClient *pClient;
BLEServer *pServer;
BLEScan *pBLEScan;
std::string deviceName = "serverDevice";

class MyServerCallbacks: public BLEServerCallbacks {
  void onConnect(BLEServer* pServer) {
    deviceConnected = true;
    Serial.println("***** Connect");
  }
  void onDisconnect(BLEServer* pServer) {
    Serial.println("***** Disconnect");
    deviceConnected = false;
    BLEDevice::startAdvertising();
  }
};

class MyClientCallbacks: public BLEClientCallbacks {
  void onConnect(BLEClient *pClient) {
    Serial.println("Client Connected *****");
  }

  void onDisconnect(BLEClient *pClient) {
    Serial.println("Client Disconnected *****");
    doScan = true;
  }
};

static void statusNotifyCallback(
  BLERemoteCharacteristic* pBLERemoteCharacteristic,
  uint8_t* pData,
  size_t length,
  bool isNotify) {
  Serial.println("status");
  return;
}

void setup() {

  Serial.begin(115200);
  
  // Initialize Device
  BLEDevice::init("DualModeDevice");
  pBLEScan = BLEDevice::getScan();
  pBLEScan->setInterval(100); //ms
  pBLEScan->setWindow(99);
  pBLEScan->setActiveScan(true);
  
  // Server creation
  pServer = BLEDevice::createServer();
  pServer->setCallbacks(new MyServerCallbacks());
  BLEService *pService = pServer->createService(SERVICE_UUID1);
  
  // Starting server
  // pService->start();
  // BLEDevice::startAdvertising();
  
  
}


void loop() {
  // put your main code here, to run repeatedly:
  if(doScan) {
      Serial.println("Scanning");
      bool doConnect = false;
      BLEScanResults results = pBLEScan->start(5); 
      BLEAdvertisedDevice *myDevice;
      for(int i = 0; i < results.getCount();i++) {
        if((results.getDevice(i).toString().find(deviceName.c_str()) == std::string::npos)) {
          continue;
        }
        myDevice = new BLEAdvertisedDevice(results.getDevice(i));
        doConnect = true;
        break;
      }
    if(doConnect) {
      if(pClient != NULL) {
        delete pClient;
        pClient = NULL;
      }
      if(pClient == NULL) {
        // Client creation
        pClient = BLEDevice::createClient();
        pClient->setClientCallbacks(new MyClientCallbacks());
      }
      pClient->connect(myDevice);
      doScan = false;
    }
  } else {
        Serial.println("Not Scanning");
  }
  delay(2000);
}

Debug Message

12:05:44.829 -> [ 12361][D][BLEAdvertisedDevice.cpp:472] setRSSI(): - setRSSI(): rssi: -78
12:05:44.876 -> [ 12367][D][BLEAdvertisedDevice.cpp:292] parseAdvertisement(): Type: 0x01 (), length: 1, data: 04
12:05:44.876 -> [ 12376][D][BLEAdvertisedDevice.cpp:292] parseAdvertisement(): Type: 0x02 (), length: 2, data: 5afd
12:05:44.876 -> [ 12384][D][BLEAdvertisedDevice.cpp:500] setServiceUUID(): - addServiceUUID(): serviceUUID: 0000fd5a-0000-1000-8000-00805f9b34fb
12:05:44.876 -> [ 12396][D][BLEAdvertisedDevice.cpp:292] parseAdvertisement(): Type: 0x16 (), length: 22, data: 5afd1300210199390134332c00a9a3000000692a0b7d
12:05:44.876 -> [ 12408][D][BLEAdvertisedDevice.cpp:519] setServiceDataUUID(): - addServiceDataUUID(): serviceDataUUID: 0000fd5a-0000-1000-8000-00805f9b34fb
12:05:44.923 -> [ 12420][D][BLEAdvertisedDevice.cpp:292] parseAdvertisement(): Type: 0x09 (), length: 9, data: 536d61727420546167
12:05:44.923 -> [ 12430][D][BLEAdvertisedDevice.cpp:461] setName(): - setName(): name: Smart Tag
12:05:44.923 -> [ 12438][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:44.923 -> [ 12446][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:44.970 -> [ 12455][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 54:01:39:89:e5:2b, already seen it.
12:05:44.970 -> [ 12463][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:44.970 -> [ 12471][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:44.970 -> [ 12479][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:44.970 -> [ 12487][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:44.970 -> [ 12495][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.018 -> [ 12503][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:4e:36:dc:8a:94, already seen it.
12:05:45.018 -> [ 12511][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.018 -> [ 12519][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.018 -> [ 12527][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 67:d7:3e:e6:8b:58, already seen it.
12:05:45.018 -> [ 12535][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.018 -> [ 12546][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4f:01:7f:b6:71:47, already seen it.
12:05:45.018 -> [ 12551][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.066 -> [ 12588][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.066 -> [ 12590][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.066 -> [ 12596][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.066 -> [ 12604][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 55:30:69:fb:66:db, already seen it.
12:05:45.066 -> [ 12611][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.066 -> [ 12620][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 22:58:b2:d3:68:ce, already seen it.
12:05:45.114 -> [ 12627][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 6c:7c:00:88:59:de, already seen it.
12:05:45.114 -> [ 12635][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4f:01:7f:b6:71:47, already seen it.
12:05:45.114 -> [ 12644][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.114 -> [ 12651][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.114 -> [ 12659][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.161 -> [ 12678][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:45.161 -> [ 12679][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:4e:36:dc:8a:94, already seen it.
12:05:45.161 -> [ 12684][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:45.161 -> [ 12692][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.161 -> [ 12725][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.207 -> [ 12735][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.207 -> [ 12758][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.254 -> [ 12781][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.254 -> [ 12786][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:45.254 -> [ 12787][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 67:d7:3e:e6:8b:58, already seen it.
12:05:45.254 -> [ 12795][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:45.254 -> [ 12803][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.254 -> [ 12815][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.301 -> [ 12824][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.301 -> [ 12829][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.301 -> [ 12835][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4f:01:7f:b6:71:47, already seen it.
12:05:45.301 -> [ 12860][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:4e:36:dc:8e:23, already seen it.
12:05:45.347 -> [ 12871][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.347 -> [ 12877][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.347 -> [ 12882][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 6c:7c:00:88:59:de, already seen it.
12:05:45.394 -> [ 12897][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.394 -> [ 12898][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:45.394 -> [ 12912][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.394 -> [ 12917][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.394 -> [ 12930][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.394 -> [ 12931][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4f:01:7f:b6:71:47, already seen it.
12:05:45.394 -> [ 12936][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 54:01:39:89:e5:2b, already seen it.
12:05:45.394 -> [ 12957][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7a:8a:5e:0e:c8:de, already seen it.
12:05:45.441 -> [ 12971][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.441 -> [ 12972][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.441 -> [ 12978][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 55:30:69:fb:66:db, already seen it.
12:05:45.441 -> [ 12985][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:45.441 -> [ 12993][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:4e:36:dc:8a:94, already seen it.
12:05:45.441 -> [ 13004][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.490 -> [ 13011][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:45.490 -> [ 13018][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.490 -> [ 13033][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.490 -> [ 13053][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.538 -> [ 13077][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.538 -> [ 13104][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:45.586 -> [ 13117][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.586 -> [ 13119][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.586 -> [ 13124][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.586 -> [ 13145][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4f:01:7f:b6:71:47, already seen it.
12:05:45.633 -> [ 13155][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.633 -> [ 13156][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 22:58:b2:d3:68:ce, already seen it.
12:05:45.633 -> [ 13161][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 6c:7c:00:88:59:de, already seen it.
12:05:45.633 -> [ 13177][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.633 -> [ 13186][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:4e:36:dc:8a:94, already seen it.
12:05:45.633 -> [ 13190][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.728 -> [ 13212][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.728 -> [ 13217][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 54:01:39:89:e5:2b, already seen it.
12:05:45.728 -> [ 13219][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.728 -> [ 13229][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:45.728 -> [ 13236][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.728 -> [ 13243][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.728 -> [ 13285][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.775 -> [ 13294][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.775 -> [ 13296][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:45.775 -> [ 13305][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.821 -> [ 13326][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:45.821 -> [ 13328][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.821 -> [ 13333][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:45.821 -> [ 13352][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.821 -> [ 13353][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 55:30:69:fb:66:db, already seen it.
12:05:45.868 -> [ 13371][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:45.868 -> [ 13373][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 2f:1b:40:a7:b0:96, already seen it.
12:05:45.868 -> [ 13377][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.868 -> [ 13393][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 67:d7:3e:e6:8b:58, already seen it.
12:05:45.868 -> [ 13394][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.916 -> [ 13423][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:45.916 -> [ 13429][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.916 -> [ 13430][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:45.916 -> [ 13437][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 6c:7c:00:88:59:de, already seen it.
12:05:45.916 -> [ 13470][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4f:01:7f:b6:71:47, already seen it.
12:05:45.916 -> [ 13477][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:45.963 -> [ 13488][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 54:01:39:89:e5:2b, already seen it.
12:05:45.963 -> [ 13494][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:45.963 -> [ 13503][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7a:8a:5e:0e:c8:de, already seen it.
12:05:45.963 -> [ 13515][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:46.010 -> [ 13526][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:46.010 -> [ 13528][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:46.010 -> [ 13535][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:46.010 -> [ 13548][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:46.010 -> [ 13565][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:46.057 -> [ 13596][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:4e:36:dc:8a:94, already seen it.
12:05:46.057 -> [ 13608][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 69:af:5c:dc:78:0d, already seen it.
12:05:46.057 -> [ 13609][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 30:c6:f7:41:52:86, already seen it.
12:05:46.057 -> [ 13614][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 4c:d3:9b:97:31:d8, already seen it.
12:05:46.104 -> [ 13633][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 7e:74:68:00:36:0e, already seen it.
12:05:46.104 -> [ 13635][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 01:e6:ba:22:4c:7a, already seen it.
12:05:46.104 -> [ 13647][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 40:b0:03:53:cf:b3, already seen it.
12:05:46.104 -> [ 13648][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 2f:1b:40:a7:b0:96, already seen it.
12:05:46.104 -> [ 13656][D][BLEScan.cpp:105] handleGAPEvent(): Ignoring 43:b4:03:4f:44:18, already seen it.
12:05:46.151 -> [ 13678][W][BLEScan.cpp:75] handleGAPEvent(): ESP_GAP_SEARCH_INQ_CMPL_EVT
12:05:46.151 -> [ 13681][I][BLEDevice.cpp:622] addPeerDevice(): add conn_id: 1, GATT role: client
12:05:46.151 -> [ 13682][D][BLEDevice.cpp:148] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.151 -> [ 13690][D][BLEClient.cpp:178] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.293 -> [ 13783][D][BLEDevice.cpp:102] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 4] ... Unknown
12:05:46.293 -> ***** Connect
12:05:46.293 -> [ 13784][D][BLEServer.cpp:365] onConnect(): BLEServerCallbacks
12:05:46.293 -> [ 13789][D][BLEServer.cpp:366] onConnect(): BLEServerCallbacks
12:05:46.293 -> [ 13794][D][BLEServer.cpp:367] onConnect(): BLEServerCallbacks
12:05:46.293 -> [ 13802][D][BLEDevice.cpp:148] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.293 -> [ 13810][D][BLEClient.cpp:178] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.293 -> [ 13819][D][BLEDevice.cpp:148] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.293 -> [ 13829][D][BLEClient.cpp:178] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.293 -> Client Connected *****
12:05:46.902 -> [ 14438][D][BLEDevice.cpp:148] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:46.902 -> [ 14440][D][BLEClient.cpp:178] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 5] ... Unknown
12:05:48.311 -> Not Scanning
12:05:50.291 -> Not Scanning
12:05:52.305 -> Not Scanning

Other Steps to Reproduce

  1. Create both BLE server and BLE Client with respective callbacks
  2. Have BLEClient connect to another device
  3. Get both callbacks
  4. Disconnect Client
  5. Get Both callbacks

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions