Dreamplug - How To -
WiFi Client
The factory supplied DreamPlug provides a WiFi client setup. This guide is for those who have installed their own Debian
rootfs (Squeeze or Wheezy) and/or kernel. These instructions are known to work on kernels later than 2.6.38.8.
Further the instructions work for Dreamplug serial numbers less than DS2-112* .
See this link for Dreamplugs that have the SD8787 WiFi (serial numbers DS2-114*)
Client WiFi support is supposedly in the kernel using the libertas and libertas_sdio modules. We found that they work
on random configurations and we could not get the Linux drivers to behave in a consistent manner. Hence we use the
Marvell supplied client drivers for client WiFi (and Bluetooth).
The setup below assumes that you do not require WiFi AP mode.
You can download the source at http://www.plugcomputer.org/plugwiki/index.php/File:SD_WLAN.tar.gz
The build process for these drivers is adequately described at http://www.plugcomputer.org/plugwiki/index.php/Setting_GuruPlug_to_be_a_stable_WiFi_Client
For later kernels (including v3 kernels) you need the patch at https://gist.github.com/961478 https://gist.github.com/gists/961478/download
Our intent is to provide precompiled versions of the Marvell wifi modules and utilities for kernels after 3.0.4 at http://www.spinifex.com.au/plugs/downloads/dreamplug/sdlan
You can use the Dreamplug kernels at http://sheeva.with-linux.com/sheeva only
if the kernel version is configured with the
Setup
- blacklist libertas
-
The libertas wireless client drivers need to be excluded. You do this by blacklisting by
creating the file /etc/modprobe.d/dpwifiap.conf.
The AP mode wifi driver also needs to be disabled.# cat /etc/modprobe.d/dpwifiap.conf # disable dreamplug wireless client modules blacklist libertas blacklist libertas_sdio # disable dreamplug wireless AP mode blacklist uap8xxx
- firmware
-
Once firmware is loaded it is difficult to unload, unless you reboot. So avoid loading the "libertas-firmware". The firmware
we use is placed in /lib/firmware/mrvl. This firmware is the same as the firmware from the orginal micro SD as supplied by Globalscale.
A copy is at
http://www.spinifex.com.au/plugs/downloads/dreamplug/marvell_wifi_firmware.tar.gz
You can remove the libertas firmware (a good idea) with:# apt-get remove libertas-firmware
Install the Marvell firmware# wget http://www.spinifex.com.au/plugs/downloads/dreamplug/marvell_wifi_firmware.tar.gz # tar x -C '/' --overwrite -zpf marvell_wifi_firmware.tar.gz
- Install wireless tools
-
These are needed for client wifi
# apt-get install wireless-tools # apt-get install wpasupplicant
- Install the Marvell software
-
The Marvell SDLAN software builds:
- mcypt.ko
- sd8xxx.ko
- wlanconfig
- bt8xxx.ko (for bluetooth)
# mkdir -p /usr/local/lib/modules # install -p -m 0644 mcypt.ko sd8xxx.ko /usr/local/lib/modules # install -p -m 0644 bt8xxx.ko /usr/local/lib/modules # install -p -m 0755 wlanconfig /usr/local/bin
- Marvell documentation
-
The Marvell download contains some documentation:
- sample interface
-
This allows you to stop and start the client wifi with ifup/ifdown.
Sample #1 is for WEP# cat /etc/network/interfaces # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp # example for a simple wep connection using a hex key iface mlan0 inet dhcp wireless-essid myssid wireless-mode Managed wireless-key restricted 1 1A1AAAAAAABBBBBCCCCCDDDDEE wireless-defaultkey 1 pre-up insmod /usr/local/lib/modules/mcypt.ko 2>/dev/null||true pre-up insmod /usr/local/lib/modules/sd8xxx.ko 2>/dev/null||true pre-down iwconfig $IFACE ap off || true pre-down iwpriv $IFACE radiooff || true pre-down iwpriv $IFACE softreset||true post-down rmmod sd8xxx||true post-down rmmod mcypt||trueSample #2 is for WPA/WPA2 using wpa supplicant# cat /etc/network/interfaces # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp iface mlan0 inet dhcp pre-up ifdown uap0||true pre-up insmod /usr/local/lib/modules/mcypt.ko 2>/dev/null||true pre-up insmod /usr/local/lib/modules/sd8xxx.ko 2>/dev/null||true wpa-ssid "myssid" wpa-psk "mysecretpassphrase" wpa-scan-ssid 1 wpa_ap_scan 1 wpa_debug_level -2 wpa-mode managed wpa-proto WPA RSN wpa-driver wext wpa-key-mgmt WPA-PSK wpa-pairwise TKIP CCMP pre-down iwconfig $IFACE ap off || true pre-down iwpriv $IFACE radiooff || true pre-down iwpriv $IFACE softreset||true post-down rmmod sd8xxx||true post-down rmmod mcypt||true
New WiFi Client
Dreamplugs with serial numbers that start with DS2-114 require minimal setup for client WiFi. This section describes the client setup when using V3 pre-built kernels from sheeva-with-linux.
The Linux driver mwifiex handles the new wifi, no blacklisting or
special configuration s required other than installing the Marvell firmware.
Currently this driver provides support for 802.11/bgn managed and ad-hoc modes.
The firmware is available at the
Spinifex website.
- Install the firmware
-
Install the firmware and reboot.
# wget http://www.spinifex.com.au/plugs/downloads/dreamplug/marvell_wifi_firmware.tar.xz # tar x -C '/' --overwrite -Jpf marvell_wifi_firmware.tar.xz # shutdown -r now
- Install support software
-
Install both iw and iwconfig.
# apt-get iw wireless-tools wpasupplicant
- sample interface
-
This allows you to stop and start the client wifi with ifup/ifdown.
Sample #1 is for WEP# cat /etc/network/interfaces # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp # example for a simple wep connection using a hex key iface mlan0 inet dhcp wireless-essid myssid wireless-mode Managed wireless-key restricted 1 1A1AAAAAAABBBBBCCCCCDDDDEE wireless-defaultkey 1Sample #2 is for WPA/WPA2 using wpa supplicant# cat /etc/network/interfaces # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp iface mlan0 inet dhcp wpa-ssid "myssid" wpa-psk "mysecretpassphrase" wpa-scan-ssid 1 wpa_ap_scan 1 wpa_debug_level -2 wpa-mode managed wpa-proto WPA RSN wpa-key-mgmt WPA-PSK wpa-pairwise TKIP CCMP
