Tests:SDIO-KS7010

This document describes how to test the SDIO functionality with a Spectec SDW-823 WIFI card. Note: Later Spectec SDW-821 (FCC: S2Y-WLAN-11G-K) will probably work, too, but this needs verification.

Ensure the driver is activated in the kernel config
Symbol: KS7010 [=y] Prompt: KeyStream KS7010 SDIO support Location: -> Device Drivers -> Staging drivers (STAGING [=y]) Depends on: STAGING [=y] && MMC [=y] && WIRELESS [=y]

The driver will appear upstream in Linux v4.7 or v4.8. For earlier versions, merge this branch:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git staging/ks7010

and this patch:

https://patchwork.kernel.org/patch/9043341/

Prepare the root filesystem for your target
Get the firmware from http://downloads.qi-hardware.com/software/ks7010-firmware-20100217.tar.bz2 and copy the .rom file to /lib/firmware to the root filesystem.

The root filesystem should also have wireless-tools (v3.0-pre9 used in this example) and wpa-supplicant (version 2.5 used in this example).

Boot the kernel
You should see this on successful probe: mmc1: card has broken SDIO 1.1 CIS, forcing SDIO 1.0 mmc1: new SDIO card at address 0001 ks_wlan: MAC ADDRESS = xxx ks_wlan: firmware ver. = 7010-SDIO-0.2f [Jun 04 2009 15:41:36]

In this example, the KS7010 was assigned "eth1". Replace all "eth1" if this differs for your system.

Now scan for networks
Command: iwlist eth1 scan Output: eth1     Scan completed : Cell 01 - Address: xxx ESSID:"xxx" Mode:Managed Frequency:2.437 GHz (Channel 6) Quality:100/100 Signal level=-59 dBm  Noise level=0 dBm Encryption key:on Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 48 Mb/s; 54 Mb/s

Create /etc/wpa_supplicant.conf for your network
Here is a template: ctrl_interface=/var/run/wpa_supplicant network={ ssid=" " scan_ssid=1 key_mgmt=WPA-PSK psk=" " }

Start wpa_supplicant to connect to the network
Command: wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant.conf & Output: Successfully initialized wpa_supplicant rfkill: Cannot open RFKILL control device eth1: Trying to associate with xxx eth1: Associated with xxx eth1: WPA: Key negotiation completed with xxx [PTK=CCMP GTK=CCMP] eth1: CTRL-EVENT-CONNECTED - Connection to xxx completed [id=0 id_str=]

Get an address and say hello to someone :)
Command: udhcpc -i eth1; ping 192.168.223.1 Output: udhcpc (v1.24.2) started Sending discover... Sending select for 192.168.223.100... Lease of 192.168.223.100 obtained, lease time 86400 PING 192.168.223.1 (192.168.223.1): 56 data bytes 64 bytes from 192.168.223.1: seq=0 ttl=255 time=4.179 ms 64 bytes from 192.168.223.1: seq=1 ttl=255 time=1.617 ms 64 bytes from 192.168.223.1: seq=2 ttl=255 time=1.344 ms 64 bytes from 192.168.223.1: seq=3 ttl=255 time=1.305 ms ...