get_wifi
ReferenceAudience: API consumerUse: read the reader's saved Wi-Fi profiles and connection status
Overview
get_wifi retrieves the Wi-Fi profiles saved on the reader together with their current connection status and configuration. The response is a list (wifiProfiles.wifiConfig[]) of profiles; each describes the wireless interface, the associated access point (ESSID, security type, connection status), the IPv4/IPv6 addressing, and a securityDetails block keyed by the security type (WPA2Personal, WPA3Personal, WPA2Enterprise, WPA3Enterprise). It is a read-only query on the device-management (MGMT) endpoint.
The device masks stored credentials — passwords, passphrases, and identities are returned as a mask, never the real secret. Use get_wifi to verify which SSID a reader is connected to and confirm its addressing before relying on the wireless uplink.
Details
| Property | Value |
|---|---|
| Interaction Pattern | Request / Response (app publishes a command; device publishes the correlated reply) |
| State Change | READ-ONLY |
| Required Request Fields | command, requestId |
| Applies To | Endpoint: Management (MGMT). Reader: RFD40 series, RFD90 series |
| API Version | V1.1 (API Version Reporting) |
| Related | set_wifi, delete_wifi_profile, get_eth |
When to Use
Use get_wifi when you need to verify the reader's wireless configuration — during commissioning, a connectivity check before inventory, or a fleet audit of which SSID each device is on.
- Confirm the connection: check
accessPoint.status(CONNECTED?),accessPoint.essid(correct network?), andaccessPoint.isPreferred. - Validate security: check
accessPoint.securityTypematches the AP; the matchingsecurityDetailsblock shows the (masked) credential/protocol configuration. - Validate addressing: check
ipv4Configuration.ipAddress,gateway, andenableDhcpto confirm the reader has a working route to the broker / back-end.
Topic Mapping
| Message | Direction | Topic | Note |
|---|---|---|---|
| Request | App → Reader | <tenantId>/MGMT/clients/cmnd/<serial> | On the management endpoint. |
| Response | Reader → App | <tenantId>/MGMT/clients/resp/<serial> | Correlated reply to the request above; the in-payload requestId links the twin topics. |
Topics follow the pattern <tenantId>/<topic>/<serial> — the tenant id assigned to you at provisioning (a slot you fill in, never a literal), the base topic you configure on the endpoint, and the reader's serial number, which the reader appends itself in its model-prefixed form (for example RFD40-212735201D0053). App → Reader means your app publishes and the reader subscribes; Reader → App means the reader publishes and your app subscribes.
Credentials are presented once at CONNECT. The requestId you send is echoed in the response so you can pair reply to request. The endpoint's mqttParams govern QoS and retain, not this command.
See Topics and Channels.
Key Fields
requestId(request) — your correlation token; make it unique per request. The device echoes it in the response so you can pair reply to request.wifiProfiles.wifiConfig[](response) — the array of saved profiles; iterate it to find the connected one.…accessPoint.status/essid(response) — the association state and network name of each profile.…accessPoint.securityType(response) — selects whichsecurityDetailskey is populated.…ipv4Configuration.ipAddress(response) — the DHCP-assigned address the reader uses to reach the broker.response.code(response) — read this to determine success vs failure (see Response Codes).
Request Payload
The request envelope is just command and requestId — there is no payload wrapper. Use the Schema tab for the field reference and the Example tab for a ready-to-send, copy-pasteable request.
- Example
- Schema
| Field | Type | Enum / Units | Example | Description |
|---|---|---|---|---|
command* | string | — | get_wifi | Fixed command name. Retrieves the Wi-Fi profiles saved on the device. |
requestId* | string | — | abc123 | A unique identifier for the request, allowing tracking and debugging. Echoed back unchanged in the response. |
Response Payload
The response envelope is command, requestId, apiVersion, response, and a wifiProfiles object whose wifiConfig is the array of profiles. On the Schema tab, expand wifiProfiles → wifiConfig → interfaceDetails (and its accessPoint, ipv4Configuration, ipv6Configuration, securityDetails sub-objects) to see every field. Within each profile's interfaceDetails, only interfaceName, hostname, and macAddress are required; the interface-level status is optional. securityDetails carries only the key matching accessPoint.securityType, with secrets masked. The Example tab shows a WPA2-Personal profile; enterprise variants are in Examples.
- Example
- Schema
| Field | Type | Enum / Units | Example | Description |
|---|---|---|---|---|
command* | string | — | get_wifi | Echoes the executed command. |
requestId* | string | — | abc123 | Echoes the request's requestId — pairs reply to request. |
apiVersion* | enum | V1.0V1.1V1.2V1.21V1.22 | V1.1 | API version reported by this command; emitted per-handler, not device-wide. |
wifiProfiles | object | — | — | Container for the list of Wi-Fi profiles. Present on a successful read; optional at the envelope level. |
wifiConfig, nesting level 2 | array | — | — | Array of Wi-Fi profiles (saved and active). Each item has the interfaceDetails structure below. |
interfaceDetails, nesting level 3 | object | — | — | Per-profile interface and connection details. |
interfaceName*, nesting level 4 | string | — | wlan0 | Wireless interface name. |
status, nesting level 4 | enum | EnabledDisabled | Enabled | Interface-level status — whether the interface is up, not whether it is associated. Optional. The enum is Enabled / Disabled, but the contract’s own examples also carry ENABLED and an empty string, which the enum does not allow (a known issue in the source schema); compare case-insensitively and treat an empty string as unknown. accessPoint.status carries the association state and uses a different vocabulary. |
hostname*, nesting level 4 | string | — | RFD40S123 | Device hostname. |
macAddress*, nesting level 4 | string | — | E0-D0-45-3D-38-1D | Interface MAC address. |
accessPoint, nesting level 4 | object | — | — | The associated / configured access point. |
essid*, nesting level 5 | string | — | Zwireless | Network name (ESSID). |
status*, nesting level 5 | enum | CONNECTEDDISCONNECTED | CONNECTED | Association status. |
securityType*, nesting level 5 | enum | WPA2PersonalWPA3PersonalWPA2EnterpriseWPA3Enterprise | WPA2Personal | Security type; selects which securityDetails key is populated. |
isPreferred*, nesting level 5 | boolean | — | false | Whether this is the preferred profile (auto-connected when in range). |
autoConn, nesting level 5 | boolean | — | false | Deprecated — kept for backward compatibility. |
ipv4Configuration, nesting level 4 | object | — | — | IPv4 addressing for the interface. |
ipAddress, nesting level 5 | string | ipv4 | 192.168.1.81 | IPv4 address. |
subnetMask, nesting level 5 | string | ipv4 | 255.255.255.0 | Subnet mask. |
gateway, nesting level 5 | string | ipv4 | 192.168.1.144 | Default gateway. |
enableDhcp, nesting level 5 | boolean | — | true | Whether DHCP is enabled for IPv4 assignment. |
dnsServer, nesting level 5 | string | ipv4 | 192.168.1.78 | DNS server address. |
domainName, nesting level 5 | string | — | example.com | Domain name. |
ipv6Configuration, nesting level 4 | object | — | — | IPv6 addressing — schema-defined but not returned by the current firmware. |
ipAddress, nesting level 5 | string | ipv6 | fe80::1643:8376:b32:4a16 | IPv6 address. |
prefix, nesting level 5 | integer | — | 64 | IPv6 prefix length. |
gateway, nesting level 5 | string | ipv6 | 2a02:1234:420a:100b::99 | IPv6 gateway. |
enableAuto, nesting level 5 | boolean | — | true | Whether automatic IPv6 configuration is enabled. |
dnsServer, nesting level 5 | string | ipv6 | 2001:4860:4860::9999 | IPv6 DNS server. |
domainName, nesting level 5 | string | — | example.com | IPv6 domain name. |
securityDetails, nesting level 4 | object | — | — | Credentials / protocol, keyed by security type — only the key matching accessPoint.securityType is present. The device masks secrets. |
WPA2Personal, nesting level 5 | object | — | — | WPA2-Personal credentials. |
password, nesting level 6 | string | password | test@123 | WPA2-Personal password (returned masked). |
WPA3Personal, nesting level 5 | object | — | — | WPA3-Personal credentials (present when accessPoint.securityType is WPA3Personal). |
password, nesting level 6 | string | password | test@123 | WPA3-Personal password (returned masked). |
WPA2Enterprise, nesting level 5 | object | — | — | WPA2-Enterprise configuration. |
authentication, nesting level 6 | enum | tlsttlspeap | tls | Outer EAP method. |
innerAuthentication, nesting level 6 | enum | nonemschapv2 | mschapv2 | Inner (phase-2) method. Omit it when authentication is tls; for ttls and peap it must be mschapv2, the default. |
identity, nesting level 6 | string | — | test | EAP identity (returned masked). |
anonymousIdentity, nesting level 6 | string | — | test | Anonymous/outer identity (returned masked). |
password, nesting level 6 | string | password | test@123 | EAP password (returned masked). |
passphrase, nesting level 6 | string | — | test@321 | Passphrase (returned masked). |
certificate, nesting level 6 | array | — | — | Certificate references as {key, value} entries. |
key, nesting level 7 | enum | ca_certclient_keyclient_certcert_key_password | ca_cert | Certificate role. |
value, nesting level 7 | string | — | wifi_root_certificate | Certificate reference name. |
protocol, nesting level 6 | enum | WPA2_Enterprise_CCMP | WPA2_Enterprise_CCMP | WPA2-Enterprise protocol. |
WPA3Enterprise, nesting level 5 | object | — | — | WPA3-Enterprise configuration. |
authentication, nesting level 6 | enum | tlsttlspeap | tls | Outer EAP method. |
innerAuthentication, nesting level 6 | enum | nonemschapv2 | mschapv2 | Inner (phase-2) method. Omit it when authentication is tls; for ttls and peap it must be mschapv2, the default. |
identity, nesting level 6 | string | — | test | EAP identity (returned masked). |
anonymousIdentity, nesting level 6 | string | — | test | Anonymous/outer identity (returned masked). |
password, nesting level 6 | string | password | test@123 | EAP password (returned masked). |
passphrase, nesting level 6 | string | — | test@321 | Passphrase (returned masked). |
certificate, nesting level 6 | array | — | — | Certificate references as {key, value} entries. |
key, nesting level 7 | enum | ca_certclient_keyclient_certcert_key_password | ca_cert | Certificate role. |
value, nesting level 7 | string | — | wpa3_ca_cert | Certificate reference name. |
protocol, nesting level 6 | enum | WPA3_Enterprise_CCMPWPA3_Enterprise_CCMP_256WPA3_Enterprise_GCMP_128WPA3_Enterprise_GCMP_256_SHA256WPA3_Enterprise_GCMP_256_SUITEB_192 | WPA3_Enterprise_CCMP_256 | WPA3-Enterprise protocol suite. |
response* | object | — | — | Result wrapper. |
code*, nesting level 2 | integer | 0–101 | 0 | 0 = Success; non-zero = error. Required by the contract. See Response Codes below. |
description*, nesting level 2 | string | — | Success | Human-readable status. |
Response Semantics
- Credentials are masked. The device returns stored passwords, passphrases, and identities as a mask (never the real secret). Treat every credential field in the response as opaque — you cannot read back the actual value with
get_wifi. - Security type selects the credential block.
securityDetailscontains only the one key that matchesaccessPoint.securityType—WPA2Personal/WPA3Personal(a singlepassword) orWPA2Enterprise/WPA3Enterprise(EAPauthentication, optionalinnerAuthentication/identity/anonymousIdentity, acertificatearray, and aprotocol). ipv6Configurationis schema-defined but not returned by the current firmware.- Wi-Fi-disabled response shape. When Wi-Fi is disabled, the contract's own example returns the profile under a top-level
wifiConfigobject (rather thanwifiProfiles.wifiConfig[]), carrying onlyinterfaceName,status(Disabled),hostnameandmacAddress. The response schema does not declare a top-levelwifiConfig, so parse both shapes; the connected shape documented here iswifiProfiles.wifiConfig[].
Response Codes
get_wifi returns response.code. The codes applicable to this command are below; for the full table see the Response Codes and Correlation and Request/Response Pairing.
| Code | Description |
|---|---|
0 | Success — Wi-Fi profiles retrieved and returned. |
3 | Not able to retrieve information (IOT_ERROR_INFO_NOT_AVAILABLE) — the device could not gather the Wi-Fi configuration at this time. Retry after a short delay; if it persists, reboot the device. |
101 | Default error — generic catch-all. |
For the full code list see the Response Codes. (Code 20, Wifi is not supported, applies to the Wi-Fi setter set_wifi, not to get_wifi.)
Examples
get_wifi is a single request/response exchange. Publish the standard {command, requestId} request shown under Request Payload; the device replies on the response topic with the correlated reply — the requestId you send (abc123) is echoed back so you can pair reply to request. The Connection scenario dropdown under Response Payload shows each contract example:
- WPA2 Personal connection — a single masked
password. - WPA2 Enterprise connection — an EAP
authenticationmethod, acertificatearray of{key, value}references and aprotocol, with credentials masked. - WPA3 Enterprise connection — additionally
innerAuthentication,identityandanonymousIdentity, and a WPA3protocolsuite. - WiFi interface disabled — the minimal reply for a disabled interface.
Notes and Caveats
get_wifi is a read-only getter — safe to poll during commissioning or troubleshooting. Configure profiles with set_wifi / delete_wifi_profile; for the concept-level view, see Network Configuration. Enterprise profiles depend on installed certificates — see TLS and Authentication.
Related: 📕 Network Configuration · 📕 get_eth · 📕 Network and Connectivity · 📕 Response Codes