&counter([total|today|yesterday]); - 0 - 0 - 13
MES on the FDAU is a mess!
Flush ROMの書き方†
- 使うのは、Windows用アプリ(gccsetup.exe)。社内サーバproject/fdau/toolに有り。
- minicom用も本家にあるみたいだけど、使ったことがないです。
- カーネル(sys3069.mot)の書込み。最新は社内サーバproject/fdau/binに有り。
- JP1をショート、ヒゲをVCCに接続
- sys3069.motを「シリアル転送ツール」にドラッグ
- シェル(shell)の書込み。最新は社内サーバproject/fdau/binに有り。
- JP1〜3はオープン、ヒゲをVCCに接続
- shellを「シリアル転送ツール」にドラッグ
- カーネルを書き換えたときは、シェルも書き直さないとダメです。
- 実行時の設定
- JP2をショート、ヒゲを開放
- RS232Cケーブルはクロス。57600bps, 8bit, noneに設定。
- ifconfig ne0 192.168.xxx.xxxでEtherはUPするので、他からpingできます。
- 他のコマンドは、MES/shell/shell.cを参照(たいしたのは無い)
TCPシステムコール†
- 以下のシステムコールがある。
tcp_socket
tcp_listen
tcp_bind
tcp_connect
tcp_free
tcp_send
tcp_recv
- これらは、MES/libsys/net.cで以下のように生成される
int32_t tcp_recv(int32_t sock, STRING data, int32_t size) {
register Task *task;
task = get_task();
task->req = TCP_RECV_REQ;
task->arg[0] = sock;
task->arg[1] = (int32_t)data;
task->arg[2] = size;
task->state |= REQ_STATE;
TRAP0;
return task->retval;
}
現状の問題点†
- ルータ越しのtcp_connect時、相手のSYNCに対してACKを返せない
- tcpログは以下の通り、相手先のSYNに対してACKが出ていない。
14:24:00.535993 arp who-has 192.168.100.2 tell 192.168.100.44
14:24:00.536206 arp reply 192.168.100.2 is-at 0:90:cc:1:5:9c
14:24:10.887040 192.168.100.44.2 > 219.96.212.110.echo: S 3611230207:3611230207(0) win 1460 <eol> (DF)
14:24:10.888202 219.96.212.110.echo > 192.168.100.44.2: S 3725341800:3725341800(0) ack 3611230208 win 65535 <mss 1460>
14:24:13.882549 219.96.212.110.echo > 192.168.100.44.2: S 3725341800:3725341800(0) ack 3611230208 win 65535 <mss 1460>
14:24:15.879554 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:15.886926 arp reply 192.168.100.44 (0:2:cb:1:74:db) is-at 0:2:cb:1:74:db (0:0:0:0:0:0)
14:24:16.879710 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:16.887053 arp reply 192.168.100.44 (0:2:cb:1:74:db) is-at 0:2:cb:1:74:db (0:0:0:0:0:0)
14:24:17.879904 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:17.887416 arp reply 192.168.100.44 (0:2:cb:1:74:db) is-at 0:2:cb:1:74:db (0:0:0:0:0:0)
14:24:18.880021 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:18.887786 arp reply 192.168.100.44 (0:2:cb:1:74:db) is-at 0:2:cb:1:74:db (0:0:0:0:0:0)
14:24:19.880178 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:19.882908 219.96.212.110.echo > 192.168.100.44.2: S 3725341800:3725341800(0) ack 3611230208 win 65535 <mss 1460>
14:24:20.880332 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:31.883642 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:32.882208 arp who-has 192.168.100.44 tell 192.168.100.2
14:24:33.882365 arp who-has 192.168.100.44 tell 192.168.100.2
- 関数の戻値は以下の通り。関数は正常に終了している。
MES >Micro Embeded System 1.0b4 2003/12/9
MES >ifconfig ne0 192.168.100.44
net0 IP Address:192.168.100.44. Netmask:255.255.255.0. MAC:00:02:CB:01:74:DB
MES >gateway 192.168.100.2
MES >discard 219.96.212.110
get_mac_address() (0)... OK
tcp_socket() (32768)... OK
tcp_connect (0)... OK
type QUIT then quit
tcp_free (0) ... OK
MES >
- tcp_close時、相手のFINに対してACKを返せない
正常なTCPコネクトとディスコネクト†
- PC-PCでのログ
00:33:22.520296 arp who-has 192.168.100.135 tell 192.168.100.164
00:33:22.520470 arp reply 192.168.100.135 is-at 0:40:26:14:1c:b8
00:33:22.520887 192.168.100.164.1626 > 192.168.100.135.7: S 1546041656:1546041656(0) win 64240 <mss1460,nop,nop,sackOK> (DF)
00:33:22.521305 192.168.100.135.7 > 192.168.100.164.1626: S 1106422315:1106422315(0) ack 1546041657 win 57344 <mss 1460>
00:33:22.521712 192.168.100.164.1626 > 192.168.100.135.7: . ack 1 win 64240 (DF)
00:33:29.410782 192.168.100.164.1626 > 192.168.100.135.7: F 1:1(0) ack 1 win 64240 (DF)
00:33:29.411128 192.168.100.135.7 > 192.168.100.164.1626: . ack 2 win 58400 (DF)
00:33:29.417723 192.168.100.135.7 > 192.168.100.164.1626: F 1:1(0) ack 2 win 58400 (DF)
00:33:29.418552 192.168.100.164.1626 > 192.168.100.135.7: . ack 2 win 64240 (DF)