Tests:SDIO-with-UHS
This document describes how to test SDIO at UHS speeds using a ZComax AC-180M card.
- Note: This is a draft! The final version will be updated until 2016-11-15.
Contents
- 1 Setup
- 2 Branch for testing
- 3 Ensure the driver is activated in the kernel config
- 4 Prepare the root filesystem for your target
- 5 Boot the kernel
- 6 Verify SD card speed and bus width
- 7 Check if there is the network device
- 8 Activate the interface
- 9 Now scan for networks
- 10 Create /etc/wpa_supplicant.conf for your network
- 11 Start wpa_supplicant to connect to the network
- 12 Start iperf3 (in server mode) on the server
- 13 Get an address and say hello to the iperf3 server
- 14 Test the connection with iperf3
Setup
The following items are needed for this test:
- the client - a Salvator-X board with a H3 SoC (firmware v2.12) and a ZComax AC-180M plugged into CN14
- the server - a second computer running some Linux distribution with iperf3 installed
- the network - capable of running 802.11ac
The client will be connected to the network via WIFI (802.11ac). The server is preferably connected to the network via Gigabit-LAN. Although connection with 802.11ac is also possible, the WIFI card of the server is unknown and might affect the measurement. Gigabit-LAN is more reliable in this regard.
The setup used for the below results is:
- the client - a Salvator-X board with a H3 SoC (firmware v2.12) and a ZComax AC-180M plugged into CN14
- the server - Fujitsu Lifebook E544 with RTL8111/8168 PCI Express Gigabit Ethernet controller running Debian Stretch
- the network - a Fritzbox 7560 router with 802.11ac and Gigabit-LAN
Branch for testing
The test should be used with the following branch:
<FIXME>
Ensure the driver is activated in the kernel config
These symbols need to be active to enable the MWIFIEX WLAN driver:
CONFIG_WLAN=y CONFIG_WLAN_VENDOR_MARVELL=y CONFIG_MWIFIEX=y CONFIG_MWIFIEX_SDIO=y
Prepare the root filesystem for your target
The root filesystem should have:
- busybox with udhcpc (v1.24.2 used here)
- wireless-tools (v3.0-pre9 used here)
- wpa-supplicant (v2.5 used here)
- iperf3 (v3.1.2 used here)
- latest firmware for SD8887 from the linux-firmware tree.
All tools are standard linux tools and should be available through your buildsystem (buildroot, yocto...).
Boot the kernel
You should see this on successful probe:
mmc2: new ultra high speed SDR50 SDIO card at address 0001 mwifiex: rx work enabled, cpus 4 mwifiex_sdio mmc2:0001:1: info: FW download over, size 391772 bytes mwifiex_sdio mmc2:0001:1: WLAN FW is active mwifiex_sdio mmc2:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (15.68.7.p5) mwifiex_sdio mmc2:0001:1: driver_version = mwifiex 1.0 (15.68.7.p5)
Please note the mmc device is mmc2 here. This is likely for connector CN14. For connector CN13, it is likely to be mmc1. However, keep in mind which one you have and replace the mmc device in the following commands, if necessary.
Verify SD card speed and bus width
We want a UHS mode. Check the timing spec line:
# cat /sys/kernel/debug/mmc2/ios clock: 100000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 5 (sd uhs SDR50) signal voltage: 1 (1.80 V) driver type: 0 (driver type B)
Check if there is the network device
It should show some mlan<number> device:
# ifconfig -a eth0 Link encap:Ethernet HWaddr <MAC-ADDRESS> BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:202904 errors:0 dropped:0 overruns:0 frame:0 TX packets:405823 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13393299 (12.7 MiB) TX bytes:614261381 (585.8 MiB) Interrupt:133 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) mlan0 Link encap:Ethernet HWaddr <MAC-ADDRESS> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:282 (282.0 B) TX bytes:248 (248.0 B)
Similar to above, the wireless network device is likely to be mlan0. If it has a different name in your setup, please adapt the following command-lines accordingly.
Activate the interface
# ifconfig mlan0 up
Now scan for networks
# iwlist mlan0 scan mlan0 Scan completed : [listing of networks in your area]
Create /etc/wpa_supplicant.conf for your network
Here is a template:
ctrl_interface=/var/run/wpa_supplicant network={ ssid="<your network>" scan_ssid=1 key_mgmt=WPA-PSK psk="<your passphrase>" }
Start wpa_supplicant to connect to the network
# wpa_supplicant -imlan0 -c /etc/wpa_supplicant.conf & FIXME: add output
Start iperf3 (in server mode) on the server
[SERVER] $ iperf3 -s ----------------------------------------------------------- Server listening on 5201 -----------------------------------------------------------
Get an address and say hello to the iperf3 server
# udhcpc -i mlan0; ping <iperf3-server-ip> udhcpc (v1.24.2) started Sending discover... Sending select for <our-ip>... Lease of <our-ip> obtained, lease time 1209600 deleting routers adding dns <DNS> PING <iperf3-server-ip> (<iperf3-server-ip>): 56 data bytes 64 bytes from <iperf3-server-ip>: seq=0 ttl=64 time=10.912 ms 64 bytes from <iperf3-server-ip>: seq=1 ttl=64 time=5.023 ms 64 bytes from <iperf3-server-ip>: seq=2 ttl=64 time=5.015 ms 64 bytes from <iperf3-server-ip>: seq=3 ttl=64 time=7.734 ms ...
Test the connection with iperf3
On the target board, run:
# iperf3 -c <iperf3-server-ip> FIXME: Output