Open
Description
I am switching between BLE and Wifi on the ATSAMD21G (Nano IOT33). Before switching, I am calling BLE.end() if I am switching to WiFi and WiFi.end() if I am switching to BLE. The switching works 4 times but always fails on the 5th time.
The BLE connection state still shows "connected" but there are no BLE characteristics being published to the peripheral. It seems like the BLE.connected() state wasn't properly destroyed, or something was left hanging around. The debugger shows that I am still in HCI.poll() but the connection just rapidly switches from connected to disconnected.