kuroの覚え書き

96の個人的覚え書き

wifi web server



しばらく放置状態であったFoneraによるサーバ構築を改めて行うことにする。

とりあえずopenWRTを使うことに変わりはないが、折角無線LANルータをサーバにするのだから無線でアクセスできるようにしたい。

いろいろ調査した結果ようやくopenWRTをclientとして使えるようになったので設定をメモしておく。

/etc/config/network


config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0

config interface lan
option type bridge
option proto static
option ipaddr 192.168.1.10 #FONに割り振るアドレス
option netmask 255.255.255.0
option gateway 192.168.1.1 #上位ルータのLAN側プライベートアドレス
option dns 192.168.1.1 #上位ルータがDNSをブリッジしている

/etc/config/wireless


config wifi-device wifi0
option type atheros
option channel auto

# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

config wifi-iface
option device wifi0
option network lan
option mode sta #clientモード
option ssid <SSID> #上位ルータのssid
option encryption psk
option wds 1 #これを入れないとつながらないらしい
option key '*****************' #パスワード


root@OpenWrt:/# ifconfig
ath0 Link encap:Ethernet HWaddr 00:18:84:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3826 (3.7 KiB) TX bytes:3619 (3.5 KiB)

br-lan Link encap:Ethernet HWaddr 00:18:84:xx:xx:xx
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3224 (3.1 KiB) TX bytes:3143 (3.0 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wifi0 Link encap:Ethernet HWaddr 00:18:84:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5770 errors:104 dropped:201 overruns:0 frame:402
TX packets:150 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:828083 (808.6 KiB) TX bytes:11919 (11.6 KiB)
Interrupt:3 Memory:b0000000-b00ffffc


root@OpenWrt:/# iwconfig
eth0 no wireless extensions.

lo no wireless extensions.

wifi0 no wireless extensions.

ath0 IEEE 802.11g ESSID:"xxxxxxx" Nickname:""
Mode:Managed Frequency:2.437 GHz Access Point: 00:19:E3:xx:xx:xx
Bit Rate:36 Mb/s Tx-Power:18 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx Security mode:restricted
Power Management:off
Link Quality=57/70 Signal level=-37 dBm Noise level=-94 dBm
Rx invalid nwid:287 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

br-lan no wireless extensions.

折角使えるようになったFon鯖ではあるがこれまでの酷使、実験がたたったのかなにかわからないが壊れちゃったみたい。

返事がない。まるで屍のようだ。

シリアルコンソールすら受け付けず(RedBootに入れない)ネットワークからも見えないので完全にお手上げとなった。

発熱具合もかなりおかしいし。

チーン(-人-)ナムー。


と思っていたのだが、後日電源を入れてみるとアクセスできる・・・熱暴走か?

TXパワーを6dbmくらいに絞ってやって様子を見てみる事にしよう。

しかし結局のところWEBサーバを構築しても今ひとつ使い道が思い浮かばないのでhttpdはいっそ止めてしまって単なるLinux boxとして遊ぶ事にしよう。そうしよう。