File tree 2 files changed +9
-3
lines changed 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ void BLERemoteCharacteristic::gattClientEventHandler(
207
207
if (m_rawData != nullptr )
208
208
free (m_rawData);
209
209
210
- m_rawData = calloc (evtParam->read .value_len , sizeof (uint8_t ));
210
+ m_rawData = ( uint8_t *) calloc (evtParam->read .value_len , sizeof (uint8_t ));
211
211
memcpy (m_rawData, evtParam->read .value , evtParam->read .value_len );
212
212
} else {
213
213
m_value = " " ;
@@ -501,7 +501,7 @@ void BLERemoteCharacteristic::registerForNotify(
501
501
uint8_t val[] = {0x01 , 0x00 };
502
502
if (!notifications)
503
503
val[0 ] = 0x02 ;
504
- BLERemoteDescriptor *desc = getDescriptorByUUID ( " 0x2902" );
504
+ BLERemoteDescriptor *desc = getDescriptor ( BLEUUID ( " 0x2902" ) );
505
505
desc->writeValue (val, 2 );
506
506
} // End Register
507
507
else { // If we weren't passed a callback function, then this is an unregistration.
@@ -516,7 +516,7 @@ void BLERemoteCharacteristic::registerForNotify(
516
516
}
517
517
518
518
uint8_t val[] = {0x00 , 0x00 };
519
- BLERemoteDescriptor *desc = getDescriptorByUUID ( " 0x2902" );
519
+ BLERemoteDescriptor *desc = getDescriptor ( BLEUUID ( " 0x2902" ) );
520
520
desc->writeValue (val, 2 );
521
521
} // End Unregister
522
522
Original file line number Diff line number Diff line change @@ -352,6 +352,12 @@ void BLEServerCallbacks::onConnect(BLEServer* pServer) {
352
352
ESP_LOGD (" BLEServerCallbacks" , " << onConnect()" );
353
353
} // onConnect
354
354
355
+ void BLEServerCallbacks::onConnect (BLEServer* pServer, esp_ble_gatts_cb_param_t *param) {
356
+ ESP_LOGD (" BLEServerCallbacks" , " >> onConnect(): Default" );
357
+ ESP_LOGD (" BLEServerCallbacks" , " Device: %s" , BLEDevice::toString ().c_str ());
358
+ ESP_LOGD (" BLEServerCallbacks" , " << onConnect()" );
359
+ } // onConnect
360
+
355
361
356
362
void BLEServerCallbacks::onDisconnect (BLEServer* pServer) {
357
363
ESP_LOGD (" BLEServerCallbacks" , " >> onDisconnect(): Default" );
You can’t perform that action at this time.
0 commit comments