130 likes | 225 Vues
Week 07 (09/05/13). USB-serial convert & terminal forwarding. 尚哲. 成功的 步驟 (USB mod install). wget http://192.168.1.2/pl2303.o wget http://192.168.1.2/usbserial.o 拔出 USB insmod usbserial.o insmod pl2303.o debug=1 mknod /dev/ttyUSB0 c 188 0 chmod 666 /dev/ttyUSB. 成功 的步驟 ( 結果圖 1).
E N D
Week 07 (09/05/13) USB-serial convert & terminal forwarding 尚哲
成功的步驟 (USB mod install) • wget http://192.168.1.2/pl2303.o • wget http://192.168.1.2/usbserial.o • 拔出USB • insmod usbserial.o • insmod pl2303.o debug=1 • mknod /dev/ttyUSB0 c 188 0 • chmod 666 /dev/ttyUSB
成功的步驟 (結果圖1) • 插入USB • dmesg
嘗試做法 • getty -L ttyUSB0 -h 115200 ansi • getty -L ttyUSB0 -h 115200 vt100 • picocom -b 115200 /dev/ttyUSB0
about getty • 功能說明:設置終端機模式,連線速率和管制線路。 • 語 法:getty [-h][-d<組態配置文件>][-r<延遲秒數>][-t<超時秒數>][-w<等待字元串>] [終端機編號][連線速率<終端機類型><管制線路>] 或 getty [-c<定義配置文件>] • 補充說明: • getty指令是UNIX之類操作系統啟動時所必須的3個步驟之一。 • 參 數: • -c<定義配置文件> 指定定義配置文件,預設為/etc/gettydefs。 • -d<組態配置文件> 指定組態配置文件,預設為/etc/conf.getty。 • -h 當傳輸速率為0時就強制斷線。 • -r<延遲秒數> 設置延遲時間。 • -t<超時秒數> 設置等待登入的時間。 • -w<等待字元串> 設置等待回應的字元串。
嘗試做法: getty (失敗) • cd gateway; • make menuconfig • in busybox, select getty • getty -L ttyUSB0 -h 115200 ansi
about picocom • picocom is a minimal dumb-terminal emulation program. It is ideal for embedded systems since its memory footprint is minimal (less than 20K, when stripped). Apart from being a handy little tool, the source distribution includes a simple, easy to use, and thoroughly documented terminal-management library.
嘗試做法 picocom (有希望) • mkdir /tmp/tmp • mount /tmp/tmp /opt • ipkg.sh update • ipkg.sh install ipkg • ipkg update • ipkg install picocom • picocom -b 115200 /dev/ttyUSB0 需上網
(嘗試做法)Auto load mod in AP • 儲存方法???
下兩週進度 • 完成picocom or others tty forwarding方法 • 每次開機後自動install的方法 • save file ( usbserial.o pl2303.o ) • save initialize script