Switching from STA Mode to AP mode

  1. My goal is: To switch from STA mode to AP mode using C language code
  2. My actions are: I am successfully adding the getters and setters
  3. The result I see is: I can able to get the STA and AP mode to enable values(0/1) from the mos.yml file
  4. My expectation & question is: I cannot set Enable as Zero(0)/One(1)

Can anyone please suggest me how to achieve it using the C language, Here is my code:

if (connectionStatus == MGOS_WIFI_DISCONNECTED)


        // I am sucessfully getting the enable values



        // I set the following 




I can flash the code but my device is not switching from STA to AP mode
please kindly help me to achieve it.

Thanks and regards
C J Lokesh

You need to initialize WiFi after changing config.
Search this forum, there are posts regarding how to do that from not very long ago.