La Fonera+にTelnetクライアントからアクセスする

La Fonera+(FON2201E)にTelnetクライアントからアクセスします。La Fonera+は、ブートローダRedBootが一時的にTelnetクライアントからのアクセスを受け付けるようになっています。

アクセスするLinuxマシンの準備

インストールに使用するLinuxマシンUbuntu 9.04を準備します。

Telnetクライアントのインストール

Telnetクライアントをインストールします。
$ sudo aptitude install telnet

Telnetクライアントの設定

~/.telnetrcに下記の内容を設定します。

$ vi ~/.telnetrc

192.168.1.1
mode line

$ cat ~/.telnetrc 
192.168.1.1
  mode line
$ 

リモートログイン

SSHでログインできるようにsshdをインストールしておきます。

<sshdのインストール>
$ sudo apt-get install openssh-server

<SSHでのログイン>
SSHプロトコルバージョン2でログインします。
$ sudo ssh -l <ユーザ名> <IPアドレス> -2

Linuxマシンのネットワーク設定

Linuxマシンのネットワークアドレスを「192.168.1.2」に設定します。
$ sudo vi /etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1

リゾルバを設定します。
$ sudo vi /etc/sesolv.conf

nameserver 192.168.1.1

再起動して設定内容を反映させます。
$ sudo reboot

La Fonera+のネットワーク初期設定

IPアドレス 192.168.1.1
サブネットマスク 255.255.255.0

<出荷時の設定に戻す初期化処理>
La Fonera+の電源を入れた状態で背面のリセットボタンを30秒程度押し続けます。Power LEDが点灯し初期化が行われます。

ブートローダRedBootコンソールの起動操作

RedBootコンソールを起動させます。

・LinuxマシンとLa Fonera+のLANをLANケーブルで接続します。

・Linuxマシンの端末を開いて次のコマンドを実行します。
$ ping 192.168.1.1; telnet 192.168.1.1 9000

・La Fonera+の電源を入れます。

・pingの2つ目の応答が表示されたタイミングで「Ctrl+C」キーを押します。

・pingコマンドが終了し、telnetコマンドが実行されます。
 「** Executing boot script ... 」が表示されたら、「Ctrl+C」を押します。

・起動処理が途中で停止、RedBootのコンソールになります。
 「RedBoot>」が表示されます。

$ ping 192.168.1.1; telnet 192.168.1.1 9000
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.2 icmp_seq=20 Destination Host Unreachable
From 192.168.1.2 icmp_seq=21 Destination Host Unreachable
64 bytes from 192.168.1.1: icmp_seq=22 ttl=64 time=812 ms
64 bytes from 192.168.1.1: icmp_seq=23 ttl=64 time=0.835 ms
^C
--- 192.168.1.1 ping statistics ---
23 packets transmitted, 2 received, +12 errors, 91% packet loss, time 22086ms
rtt min/avg/max/mdev = 0.835/406.583/812.332/405.749 ms, pipe 3
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
== Executing boot script in 0.840 seconds - enter ^C to abort
^C^C
RedBoot> 

RedBootの設定変更

RedBootが起動してからTelnetクライアントの接続を受け付ける時間を10秒に設定します。
RedBoot> fconfig boot_script_timeout 10
... - continue (y/n)? y

RedBoot> fconfig boot_script_timeout 10
boot_script_timeout: Setting to 10
Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> 

RedBoot起動確認

La Fonera+の電源を一度抜き、再度挿入します。
Telnetからタイミングを遅らせてもRedBootを起動できることを確認します。

$ ping 192.168.1.1; telnet 192.168.1.1 9000
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.2 icmp_seq=2 Destination Host Unreachable
From 192.168.1.2 icmp_seq=3 Destination Host Unreachable
From 192.168.1.2 icmp_seq=4 Destination Host Unreachable
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=1646 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=637 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=1.52 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=1.07 ms
^C
--- 192.168.1.1 ping statistics ---
8 packets transmitted, 4 received, +3 errors, 50% packet loss, time 7012ms
rtt min/avg/max/mdev = 1.070/571.414/1646.028/672.525 ms, pipe 3
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
== Executing boot script in 8.230 seconds - enter ^C to abort
^C^C
RedBoot> 

参考サイト

RedBoot User's Guide
http://www.ecoscentric.com/ecospro/doc.cgi/html/redboot-guide/redboot-guide.html

追加 2011.11.13
追加 2010.10.19
追加 2010.07.19
2009.03.08