wifi_drv: update README to reflect current state

Issue #2988.
This commit is contained in:
Josef Söntgen 2018-09-17 16:37:48 +02:00 committed by Christian Helmuth
parent ecccbb46cb
commit 293e86eda9

View File

@ -185,21 +185,19 @@ WIFI
The wifi_drv component is a port of the Linux mac802.11 stack, including the
iwlwifi driver as well as libnl and wpa_supplicant, to Genode.
Configuration snippet:
To start the component the following configuration snippet can be used:
!<start name="wifi_drv">
! <resource name="RAM" quantum="32M"/>
!<start name="wifi_drv" caps="200">
! <resource name="RAM" quantum="24M"/>
! <provides><service name="Nic"/></provides>
! <config>
! <libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc">
! <vfs>
! <dir name="dev"> <log/> <rtc/>
! <jitterentropy name="random"/>
! <jitterentropy name="urandom"/>
! </dir>
! <dir name="config"> <ram/> </dir>
! </vfs>
! </libc>
! <libc stdout="/dev/null" stderr="/dev/null" rtc="/dev/rtc"/>
! <vfs>
! <dir name="dev"> <log/> <null/> <rtc/>
! <jitterentropy name="random"/>
! <jitterentropy name="urandom"/>
! </dir>
! </vfs>
! </config>
! <route>
! <service name="Rtc"> <any-child /> </service>
@ -207,27 +205,54 @@ Configuration snippet:
! </route>
!</start
Per default, the driver scans for available networks only when not
The driver will request access to the ROM module 'wifi_config' to
connect to a network:
!<wifi_config connected_scan_interval="30" scan_interval="10" rfkill="no">
! <network ssid="Foobar" protection="WPA2" passphrase="allyourbase"/>
!</wifi_config>
To temporarily prevent any radio activity, the 'rfkill' attribute
can be set to 'true'.
If the network is protected by, e.g., WPA/WPA2, the protection type, either
'WPA' or 'WPA2' as well as the the passphrase have to be specified.
The 'bssid' attribute can be used to select a specifc accesspoint within a
network. Of all attributes only the 'ssid' attribute is mandatory, all others
are optional and should only be used when needed.
The configuration may contain more than one network. In This case the driver
will try to select the best one it gets a response from. To prevent it
from automatically joining the network the 'auto_connect' attribute must be
set to 'false'; the default value is 'true'. If the 'explicit_scan' attribute
is set, the driver will pro-actively scan for a hidden network with the given
SSID:
!<wifi_config connected_scan_interval="30" scan_interval="10">
! <network ssid="Zero" protection="WPA2" passphrase="allyourbase"/>
! <network ssid="Skynet" protection="WPA" passphrase="12345678"
! explicit_scan="true" auto_connect="false"/>
!</wifi_config>
By default, the driver scans for available networks only when not
connected. This can be changed with the 'connected_scan_interval'
config attribute, which specifies the interval for connected scans in
seconds, e.g.
attribute, which specifies the interval for connected scans in
seconds and directly influences any roaming decision, i.e., select
a better fit accesspoint for the configured network.
!<config connected_scan_interval="30">...</config>
Also, the driver can be switched to verbose logging with
!<config verbose="yes">...</config>
Also, the driver can be switched to verbose logging during runtime
by setting the 'verbose' or 'verbose_state' attribute to 'true'.
The wifi_drv creates two distinct reports to communicate its state and
information about the wireless infrastructure to other components. The
first one is a list of all available accesspoints. The following examplary
report shows its structure:
report shows its general structure:
!<wlan_accesspoints>
!<accesspoints>
! <accesspoint ssid="skynet" bssid="00:01:02:03:04:05" quality="40"/>
! <accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" protection="WPA-PSK"/>
! <accesspoint ssid="foobar" bssid="01:02:03:04:05:07" quality="10" protection="WPA-PSK"/>
!</wlan_accesspoints>
! <accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" protection="WPA2"/>
! <accesspoint ssid="foobar" bssid="01:02:03:04:05:07" quality="10" protection="WPA2"/>
!</accesspoints>
Each accesspoint node has attributes that contain the SSID and the BSSID
of the accesspoint as well as the link quality (signal strength). These
@ -237,44 +262,27 @@ have an attribute describing the type of protection in addition.
The second report provides information about the state of the connection
to the currently connected accesspoint:
!<wlan_state>
! <accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" protection="WPA-PSK" state="connected"/>
!</wlan_state>
!<state>
! <accesspoint ssid="foobar" bssid="01:02:03:04:05:06" quality="70" freq="2418" state="connected"/>
!</state>
Valid state values are 'connected', 'disconnected', 'connecting' and
'disconnecting'.
Valid state values are 'connected', 'disconnected', 'connecting'. Depending
on the state, there are additional attributes that can be checked. In case
of an authentication error, e.g. the passphrase is wrong, the 'auth_failure'
attribute will be set to 'true'. The 'rfkilled' attribute is set to 'true'
if a disconnect was triggered by disabling the radio activity via setting
the 'rfkill' attribute.
In return, the wifi_drv get its configuration via a ROM module. This ROM
module contains the configuration for the selected accesspoint.
To connect to an open accesspoint a configuration like the following is used:
By subscribing to both reports and providing the required 'wifi_config' ROM
module, a component is able control the wireless driver.
!<selected_accesspoint ssid="foobar"/>
If the network is protected by, e.g., WPA/WPA2, the protection type as well
as the the pre-shared key have to be specified:
!<selected_accesspoint ssid="securefoobar" protection="WPA-PSK" psk="foobar123!"/>
If a network consists of several different access points and a particular one
should be used it can be selected by specifing its BSSID in a 'bssid'
attribute.
Of all attributes only the 'ssid' attribute is mandatory, all others are
optional and should only be used when needed.
To disconnect from an accesspoint, a empty configuration is sent:
!<selected_accesspoint/>
By subscribing to both reports and providing the required ROM module, a
component can control the wireless driver. An example therefore is the Qt
based component in 'src/app/qt_wifi_connect'.
Currently only WPA/WPA2 protection using a pre-shared key is supported.
Currently only WPA/WPA2 protection using a passphrase is supported and the the
SSID is copied verbatim. At the moment, there is no way to express or escape
non alphanumeric characters.
On certain cards, e.g. Intel Wireless 6200 ABG, it may be necessary to disable
the 11n mode. This can be achieved by setting the 'use_11n' attribute in
the config node to 'no'.
the 'wifi_config' node to 'no'.
lx_kit