Skip to main content


Retrieve the current state of the network interface




Integer — a state constant


This method returns the current state of the target network interface object.

The value returned may be one of the following constants:

impOS Constant Value Network Interface State -1 Idle/unknown 0 Starting 1 Connected 100 WiFi scanning 101 WiFi joining 102 WiFi WPS in progress 103 WiFi link up 104 WiFi getting IP address via DHCP 105 WiFi stopped 106 WiFi sub-system unhappy 200 Ethernet link up 201 Ethernet getting IP address via DHCP 202 Ethernet stopped 203 Ethernet sub-system unhappy 204 Ethernet stopped: No link 300 Cellular contacting modem 301 Cellular waiting for SIM 302 Cellular connecting via PPP 303 Cellular registering with network 304 Cellular network registration request denied 305 Cellular stopped 306 Cellular modem unhappy

Electric Imp reserves the right to alter the value of these constants in future impOS releases.

Note This value will be the same as that passed into the state parameter of any callback function registered with