class

Matter::Network::Backend

Inherits Reference < Object

Abstract base class for platform-specific network operations

Implementations of this class provide the actual platform-specific code for scanning, connecting, and managing WiFi and Thread networks.

The NetworkCommissioningCluster delegates to this backend for all actual network operations.

Instance methods

add_thread_network(credentials : ThreadCredentials) : Bool

Add or update a Thread network configuration

The ThreadCredentials contain the operational dataset and parsed key parameters like Extended PAN ID, network name, etc.

@param credentials Parsed Thread network credentials @return True if successful

Source
add_wifi_network(network_info : WiFiNetworkInfo) : Bool

Add or update a WiFi network configuration

The WiFiNetworkInfo contains the SSID and parsed credentials with inferred security type, making it easy to configure the network.

@param network_info Parsed WiFi network information @return True if successful

Source
connect_network(network_id : Bytes) : Tuple(Bool, Int32 | Nil)

Connect to a configured network

@param network_id Network identifier (SSID for WiFi, XPAN for Thread) @return Tuple of (success, error_value) error_value is platform-specific error code (e.g., 802.11 status code for WiFi)

Source
connected?(network_id : Bytes) : Bool

Check if a network is currently connected

@param network_id Network identifier (SSID for WiFi, XPAN for Thread) @return True if connected

Source
disconnect_network

Disconnect from current network

Source
remove_network(network_id : Bytes) : Bool

Remove a network configuration

@param network_id Network identifier (SSID for WiFi, XPAN for Thread) @return True if successful

Source
scan_thread

Scan for available Thread networks

@return Array of discovered Thread networks

Source
scan_wifi(ssid : String | Nil) : Array(Cluster::NetworkCommissioningCluster::WiFiInterfaceScanResult)

Scan for available WiFi networks

@param ssid Optional SSID string for directed scan (nil for broadcast scan) @return Array of discovered WiFi networks

Source