Skip to content

Commit 49c413e

Browse files
authored
Deinit everything when restarting bt standalone temp sensor (#745)
Without this, you get an error when attempting to reconnect after a restart
1 parent 617fa6c commit 49c413e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pico_w/bt/standalone/server/server.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ int main() {
190190
async_context_wait_for_work_until(cyw43_arch_async_context(), at_the_end_of_time);
191191
}
192192

193+
att_server_deinit();
194+
195+
sm_deinit();
196+
l2cap_deinit();
197+
193198
cyw43_arch_deinit();
194199

195200
printf("Press the \"S\" key to Start bluetooth\n");

0 commit comments

Comments
 (0)