Skip to main content

imp.net.counters()

Retrieves a snapshot of WiFi counters

Availability

Device

Returns

Table — advanced wireless connection information

Description

This method returns a table of advanced WiFi information.

Currently, the table includes just one one key, wwd_wifi — its value is a blob containing a snapshot of WiFi counters retrieved from the imp’s WICED WiFi profiling mechanism. The size of the blob and the exact organization of the information within it are both dependent on the WICED firmware version. We plan to release a Squirrel library which can be used to decode the blob into a table of named counters.

If WiFi is not powered up, or not available on the imp, the table will be empty (wwd_wifi will not be present).

Module-specific Information

impC001

The impC001 does not currently implement imp.net.counters().

Example Code

The following code extracts the initial data from the blob returned by wwd_wifi. In fact, there is much more data stored; that extracted here is just a very small portion.