Now am used captive-portal-wifi-stack for connect wifi. now I would like to know how can I get network or internet connection status from this lib.
I saw some code in demo-c example. They have MGOS_HAVE_WIFI but I don’t know where of this are declare to used. but only the function is running in background for Log network status.
What function, what background ? You either call a C function from C/C++ code or you need to FFI from mJS. There is no point in calling an RPC from a web page to get WiFi status since your device needs to be connected to have WiFi to be able to answer… do you need other status ? Specifically ?
There is no notion of “Internet” connection, whoever tells you that “is connected to the Internet” is pinging some host or polling some service that he assumes must be accesible and knows how to access that. AFAIK mOS does not do that; but if you connect to a cloud you can check its status.