Skip to content

Unexpected behavior in esp32 network driver network:stop/0 #643

Closed
@UncleGrumpy

Description

@UncleGrumpy

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions