Thanks Driven Life

日々是感謝

GuruPlug Wifi client ようやく動いた

いろいろあって GuruPlug の uImage と rootfs 入れなおした。使ったのは以下。

uImage
http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=66

rootfs
http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=78

入れなおしたあとの kernel は以下な感じ

Linux guruplug-debian 2.6.33.2-00003-g4b82fc0 #1 PREEMPT Thu Apr 22 03:29:35 PDT 2010 armv5tel GNU/Linux

実は aptitude upgrade したあとだから少し違うかも知れない。

で、本題はここから。
まずは /etc/rc.local に書いてある、Wifi AP 設定スクリプトWifi clinet 設定スクリプトに置き換える。
wlan.sh も init_setup.sh もデフォルトで置いてあるはず。

27c27,28
< /root/init_setup.sh
---
> #/root/init_setup.sh
> /root/wlan.sh

つづいて wlan.sh の編集

*** wlan.sh.orig	2011-03-04 21:40:59.000000000 +0900
--- wlan.sh	2011-03-04 22:22:46.000000000 +0900
***************
*** 5,12 ****
  
  rmmod libertas_sdio libertas
  cp /root/firmware/sd8688* /lib/firmware/
- /etc/init.d/udhcpd stop
- /etc/init.d/dnsmasq stop
  
  echo 2 > /proc/uap/uap0/hwstatus
  ifconfig uap0 down
--- 5,10 ----
***************
*** 22,27 ****
--- 20,27 ----
  rm -f /lib/firmware/sd8688*
  
  # The newly created interface will be wlan(n)
+ wpa_supplicant -i wlan0 -c /root/wlan.conf -B
+ ip link set wlan0 mtu 1454
  
  # The following command lists all the available wireless networks
  # iwlist <ifc-name> scanning

udhcpd や dnsmasq をなぜ削除してるのかというと、

aptitude remove udhcpd dnsmasq

しちゃってるからですね。残ってる人は消さなくてもいいと思います。
あとは wlan0 の起動と mtu の指定。
mtu が 1500 のままだと、aptitude update だけで落ちる程度に
すぐ熱暴走するので、少しでも下げれたらと思って下げたらうまくいった。

続いて wlan.conf

guruplug-debian:~# cat wlan.conf 
network={
        ssid="SSIDを書く"
        proto=WPA
        key_mgmt=WPA-PSK
        psk="パスワード"
}

まあこれだけです。
あとは wlan0 のネットワーク設定を /etc/network/interfaces に。ここは各自に任せた。

そんなこんなでうまくいきました。
今までなんでできなかったのかわからないけどまあいいです。
とりあえずようやくできたのでいろいろいじります。