IPC Module - WiFi Service

This page contains documentation of the WiFi API.

Messages

message wifi_station_request_req
Parameters:

user (string) – User identifier, max 15 characters long.

Return message:

wifi_station_request_rsp

Request the WiFi station service.

message wifi_station_request_rsp
Parameters:

result (enum wifi_station_result) – Result.

WiFi station request response.

message wifi_station_release_req_norsp
Parameters:

user (string) – User identifier, max 15 characters long.

Release WiFi station service for given user user.

message wifi_station_search_reporting_req_norsp
Parameters:

state (uint8) – 1 to enable and 0 to disable

Set WiFi station search reporting state.

message wifi_station_search_reporting_publish_ind
Parameters:

WiFi station search reporting entry publish event.

Sent periodically when search reporting is enabled.

message wifi_station_search_reporting_subscribe_req

Subscribe to wifi_station_search_reporting_publish_ind messages

message wifi_station_search_reporting_subscribe_rsp
Parameters:

result (enum ipc_subscribe_result)

Result from wifi_station_search_reporting_subscribe_req

message wifi_station_search_reporting_unsubscribe_req_norsp

Unsubscribe from wifi_station_search_reporting_publish_ind messages

message wifi_station_connectivity_failure_publish_ind
Parameters:

failure (enum wifi_station_failure_type) – Type of failure

WiFi station connection failure publish event.

Sent when a manual connection to an AP failed, #failure contains the failure reason.

message wifi_station_connectivity_failure_subscribe_req

Subscribe to wifi_station_connectivity_failure_publish_ind messages

message wifi_station_connectivity_failure_subscribe_rsp
Parameters:

result (enum ipc_subscribe_result)

Result from wifi_station_connectivity_failure_subscribe_req

message wifi_station_connectivity_failure_unsubscribe_req_norsp

Unsubscribe from wifi_station_connectivity_failure_publish_ind messages

message wifi_station_auto_connect_req_norsp
Parameters:

state (uint8) – 0: Disabled, 1: Enabled

Set WiFi station auto connect state.

message wifi_station_connect_req
Parameters:
Return message:

wifi_station_connect_rsp

WiFi station connect request. Use this to manually connect to an AP.

When using #known_network other parameters shall be skipped, if the #ssid is not a known network and #known_network is set connect will fail with ERROR_INVALID_PARAMETER.

Sending a connect request before requesting WiFi station will fail with NOT_REQUESTED.

A successful connect to an AP will automatically save the connection as a known network.

Note: This will override autoconnect to other stations.

message wifi_station_connect_rsp
Parameters:

result (enum wifi_station_result) – Result of connection attempt

WiFi station connect response.

message wifi_station_status_req
Return message:

wifi_station_status_rsp

WiFi station status request.

message wifi_station_status_rsp
Parameters:

WiFi station status response.

message wifi_station_status_publish_ind
Parameters:

WiFi station status publish event.

Sent periodically.

message wifi_station_status_subscribe_req

Subscribe to wifi_station_status_publish_ind messages

message wifi_station_status_subscribe_rsp
Parameters:

result (enum ipc_subscribe_result)

Result from wifi_station_status_subscribe_req

message wifi_station_status_unsubscribe_req_norsp

Unsubscribe from wifi_station_status_publish_ind messages

message wifi_station_add_known_network_req
Parameters:
Return message:

wifi_station_add_known_network_rsp

WiFi station add or update known network request.

If #ssid points to an already known network this will update the entry.

Only 256 networks can be stored, if the limit is exceeded add known network will fail with TOO_MANY_NETWORKS.

message wifi_station_add_known_network_rsp
Parameters:

result (enum wifi_station_result) – Result of adding network

WiFi station add known network response.

message wifi_station_list_known_networks_req_norsp

WiFi station add known network request.

message wifi_station_list_known_networks_publish_ind
Parameters:

WiFi station known networks entry publish event.

Sent when list known networks has been requested.

message wifi_station_list_known_networks_subscribe_req

Subscribe to wifi_station_list_known_networks_publish_ind messages

message wifi_station_list_known_networks_subscribe_rsp
Parameters:

result (enum ipc_subscribe_result)

Result from wifi_station_list_known_networks_subscribe_req

message wifi_station_list_known_networks_unsubscribe_req_norsp

Unsubscribe from wifi_station_list_known_networks_publish_ind messages

message wifi_station_delete_known_network_req
Parameters:

ssid (string) – SSID of station

Return message:

wifi_station_delete_known_network_rsp

WiFi station delete known network request.

message wifi_station_delete_known_network_rsp
Parameters:

result (enum wifi_station_result) – Result of deletion

WiFi station delete known network response.

message wifi_regulatory_domain_set_req
Parameters:

country_code (string) – Country code: ISO/IEC 3166-1 alpha2

Return message:

wifi_regulatory_domain_set_rsp

WiFi regulatory domain set request.

The regulatory domain must be set before starting the WiFi STA.

@deprecated This API is deprecated due to being replaced with automatic country selection.

message wifi_regulatory_domain_set_rsp
Parameters:

result (enum wifi_regulatory_domain_result) – Result of set

WiFi regulatory domain set request.

message wifi_regulatory_domain_get_req
Return message:

wifi_regulatory_domain_get_rsp

WiFi regulatory domain set request.

@deprecated This API is deprecated due to being replaced with automatic country selection.

message wifi_regulatory_domain_get_rsp
Parameters:

WiFi regulatory domain set request.

message wifi_ap_request_req
Parameters:

user (string) – User identifier, max 15 characters long.

Return message:

wifi_ap_request_rsp

Request the WiFi AP service.

The service will be turned on once requested and configured. Request and configuration can be done in any order.

message wifi_ap_request_rsp
Parameters:

result (enum wifi_ap_result) – Result.

WiFi AP request response.

message wifi_ap_release_req_norsp
Parameters:

user (string) – User identifier, max 15 characters long.

Release AP station service for given user user.

message wifi_ap_configure_req
Parameters:
  • ssid (string) – SSID

  • passphrase (string) – WPA2 passphrase

  • band (enum wifi_ap_band) – AP band selection mode

  • ipaddr_and_prefix (string) – WiFi access point IP address and prefix. Format IP/Prefix, e.g. 192.168.123.1/24 - empty for default

  • dns1 (string) – DNS server 1 - empty for default

  • dns2 (string) – DNS server 2 - empty for default

  • no_dhcp_or_dns (uint8) – Suppress default DHCP and DNS server - guest provides DHCP and DNS

Return message:

wifi_ap_configure_rsp

WiFi AP configuration request.

The service will be turned on once requested and configured. Request and configuration can be done in any order.

If the #ssid is longer than 32 chars or #passphrase is shorter than 8 chars, configuration fails with INCORRECT_INPUT.

If the arguments ipaddr_and_prefix or dns1/dns2 are not empty but malformed or uses reserved addresses (such as 0.0.0.0 or 255.255.255.255) configuration will fail with INCORRECT_INPUT.

When choosing a different IP and prefix than the default, keep in mind that the IP should fall within the first 16 addresses for that prefix, and that the first 16 addresses are reserved for VMs and will not be advertised by DHCP. This restriction does not apply when setting #no_dhcp_or_dns .

message wifi_ap_configure_rsp
Parameters:

result (enum wifi_ap_result) – Result of the operation

WiFi AP configuration response.

Enums

enum wifi_station_result

WiFi station result codes.

Constant

Value

Description

OK

0

OK

ERROR_INVALID_PARAMETER

1

Invalid parameter

WRONG_STATE

2

Wrong state

ERROR_UNKNOWN

3

Error unknown

NOT_REQUESTED

4

Not requested

TOO_MANY_NETWORKS

5

Too many networks

enum wifi_station_encryption_method

WiFi station encryption methods.

Constant

Value

Description

WPA2

0

WPA2

UNKNOWN

1

Unknown

enum wifi_station_notification_type

WiFi station notification types.

Constant

Value

Description

SINGLE

0

Single entry notification type - if received with an otherwise empty message it means no results

FIRST

1

First: one or more FOLLOW_UP or a LAST should follow

FOLLOW_UP

2

Follow up to a FIRST

LAST

3

Last entry, if empty (outside of a counter) it means unexpected termination of the list.

enum wifi_station_failure_type

WiFi station failure types.

Constant

Value

Description

WRONG_KEY

0

Wrong key

enum wifi_station_state

WiFi station states.

Constant

Value

Description

DISABLED

0

Disabled

ENABLED

1

Enabled

enum wifi_station_band

WiFi station band preference or selection

Constant

Value

Description

FREE

0

Choose any available band, freely. Matches legacy behaviour

PREFER_2_4GHZ

1

Prefer 2.4GHz, but allow 5GHz

PREFER_5GHZ

2

Prefer 5GHz, but allow 2.4GHz

ONLY_2_4GHZ

3

Only 2.4GHz

ONLY_5GHZ

4

Only 5GHz

enum wifi_regulatory_domain_result

WiFi regulatory domain result codes.

Constant

Value

Description

OK

0

INVALID_COUNTRY_CODE

1

ERROR_UNKNOWN

2

enum wifi_ap_result

WiFi AP result codes.

Constant

Value

Description

OK

0

INCORRECT_INPUT

1

ERROR_UNKNOWN

2

enum wifi_ap_band

WiFi AP band selection.

Constant

Value

Description

2_4GHZ

0

5GHZ

1