Description
Currently using network:stop/0
on esp32 does not actually disconnect or stop the wifi driver, it only stops the gen_server responsible for managing the connection. The expected behavior would be for the network connection to be terminated, and the native wifi driver be stopped, so that all of the resources are freed.
The esp-idf esp_netif driver allows for multiple interfaces simultaneously, including STA mode, AP mode, Ethernet and bluetooth. The current implementation would stop all interfaces, I believe the stop
function should be implemented as network:stop/1
, and only stop the specified interface. In the case of wifi if both STA and AP are used, and only one is stopped, the driver should remain active. In all other cases the drivers should be completely stopped so that all resources are freed.