wifiesp8266sming

Call ESP8266 SDK API function on SMING framework application


I am using ESP8266 WiFi chip and the SMING framework.

I would like to call SDK API function inside an app that uses the SMING framework.

Suppose I want to call wifi_station_set_reconnect_policy(true). How can I do this in a SMING application.cpp?


Solution

  • SMING is just a layer above the SDK, you can call it directly.

    The method wifi_station_set_reconnect_policy is defined in the user_interface.h of the SDK, then you can call it in your application.cpp like this :

    #include <user_config.h>
    #include <SmingCore/SmingCore.h>
    
    void init()
    {
        wifi_station_set_reconnect_policy(true);
    }