Datasheet

Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
For more info about the IDE Wizard please refer to the openPicus IDE Manual.
QUESTION: How can I check Wi-Fi connection?
Actually there is a very important variable called WFStatus. Its value is directly dependent on Wi-Fi
connection status, and can be (them are defined in Hwlib.h):
NOT_CONNECTED
CONNECTING
CONNECTED
CONNECTION_LOST
CONNECTION_FAILED
STOPPING
TURNED_OFF
Those values defines different statuses, and different “jobs in progress”.
The status “NOT_CONNECTEDand “TURNED_OFFare static status, and they can be changed only
with a user task input. “NOT_CONNECTED” occurs when a Wi-Fi connection is closed and there is no
need to open it. The “TURNED_OFF” status occurs when Wi-Fi module is turned off for power saving.
The other status items are dynamic and can change without user input, but by external events. In
fact,when a user tries to connect to a Wi-Fi network, the WFStatus changes from “NOT_CONNECTED”
to “CONNECTING. This status shows that the Wi-Fi module is trying to connect to a network. If it
connects, WFStatus changes to “CONNECTED”; if it fails, it changes to “CONNECTION_FAILED. If this
last status occurs the openPicus Framework automatically retries to connect to Wi-Fi network until
success is reached or the user stops the connection from the user task. If a connection is lost due to
network problems (for example no reply from router, or too much distance between Flyport and the
Wi-Fi device communicating with Flyport) the WFStatus becomesCONNECTION_LOST” and the
Framework automatically retries to connect Flyport to the network.
33