Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/NimBLEServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,21 @@ bool NimBLEServer::resetGATT() {
NimBLEDevice::stopAdvertising();
# endif

Comment thread
chmorgan marked this conversation as resolved.
// esp-idf nimble clears the device name and
// appearance during ble_gatts_reset()
#ifndef CONFIG_USING_NIMBLE_COMPONENT
std::string name(ble_svc_gap_device_name());
uint16_t appearance = ble_svc_gap_device_appearance();
#endif

ble_gatts_reset();
ble_svc_gap_init();
Comment thread
chmorgan marked this conversation as resolved.

#ifndef CONFIG_USING_NIMBLE_COMPONENT
ble_svc_gap_device_name_set(name.c_str());
ble_svc_gap_device_appearance_set(appearance);
#endif

ble_svc_gatt_init();

for (auto svcIt = m_svcVec.begin(); svcIt != m_svcVec.end();) {
Expand Down