Skip to main content

Crate improv_wifi

Crate improv_wifi 

Source
Expand description

An implementation of the Improv Wi-Fi BLE peripheral protocol for Linux.

This crate provides the device side of the Improv Wi-Fi configuration protocol via BlueZ’s D-Bus API. It is intended for embedded Linux devices that need to be provisioned onto a Wi-Fi network without a display or input peripherals.

Modules§

rpc
Improv-Wi-Fi RPC packet types and parsing.

Structs§

AuthHandle
Cloneable handle for triggering authorisation from another task.
Capabilities
Capabilities bitfield, as transmitted on the Capabilities characteristic.
Connection
A D-Bus connection.
DeviceInfo
Information returned by the Device Info command (0x03).
ImprovWifi
Improv-Wi-Fi service handle. Construct via ImprovWifi::install, then call ImprovWifi::run to drive advertising, the authorisation timeout, and the shutdown-on-Provisioned behaviour.
ImprovWifiConfig
Top-level configuration for the Improv-Wi-Fi service.
Network
One Wi-Fi network discovered by WifiConfigurator::scan.
OwnedObjectPath
Owned ObjectPath

Enums§

AuthorizeMode
Whether the device requires explicit user authorisation before accepting credentials.
Error
Improv Wi-Fi error codes, as transmitted on the Error State characteristic.
Status
Improv Wi-Fi service state, as transmitted on the Current State characteristic.

Constants§

ADVERTISEMENT_SERVICE_DATA_UUID
16-bit Service Data UUID used in BLE advertisements (0x4677).
CHARACTERISTIC_UUID_CAPABILITIES
CHARACTERISTIC_UUID_CURRENT_STATE
CHARACTERISTIC_UUID_ERROR_STATE
CHARACTERISTIC_UUID_RPC_COMMAND
CHARACTERISTIC_UUID_RPC_RESULT
SERVICE_UUID

Traits§

WifiConfigurator
A backend that knows how to talk to the host’s network stack.

Functions§

find_adapter
Resolve a BlueZ adapter object path. Pass None for the first adapter found.
power_on_adapter
Power on the BlueZ adapter at adapter_path (sets the Powered property to true).