Reference Manual

Redpine Signals, Inc. Proprietary and Confidential Page 59
RS9116 n-Link Linux and Android
Technical Reference Manual
Version 2.0
6 Configuration Using CFG80211
This section explains about the usage of various IOCTL commands, which can be issued to the Onebox-Mobile™ driver
operating in CFG80211 mode from the user space.
6.1 Using iw Wireless Tool
'iw' is a new nl80211 based CLI configuration utility for wireless devices. It is used to set/get various parameters of a
wireless network interface. This section covers the usage of 'iw' when used with the Onebox-Mobile ™ driver. For a
detailed description of 'iw' tool, please refer to the relevant man pages on Linux system. The list of supported commands
via "iw" tool are listed below.
Creating a virtual Interface
Description
This command is used to create a virtual interface in the specific mode requested by user
Default Value
-
Input Parameters
<phy name > Phy name can be obtained by using the following command
$ iw phy
In case of multiple wireless interfaces are present, please refer to the NOTE given below on how to
determine the phy name.
<interface name> name of the virtual interface to be created
<operating mode> operating mode of the virtual interface that can be either 'managed' for station
mode or '__ap' for access point mode.
Output Parameter
-
Reset Required
No
Usage
iw phy <phy name> interface add <interface name> type <operating mode>
Example
To create a virtual interface in Access Point mode, use the command given below:
$ iw phy phy0 interface add wifi0 type __ap
To create a virtual interface in Station mode use the command below:
$ iw phy phy0 interface add wifi0 type managed
Scan
Description
This command is used to scan for the Access points nearby our device.
Default Value
-
Input Parameters
Interface name on which scan has to be performed
Output Parameter
List of AP's scanned
Reset Required
No
Usage
The following command initiates a scan and displays the list of AP's scanned.
$ iw dev $interface_name scan
Example
$ iw dev wifi0 scan
Connect
Description
This command is used to connect devices to the Access points in open or WEP security mode.
Default Value
-
Input Parameters
SSID, BSSID, key_index, key of AP.
Output Parameter
None
Reset Required
No
Usage
Open mode:
$ iw dev $interface_name connect $SSID_NAME $BSSID.
WEP Security: