Date post: | 02-Jan-2016 |
Category: |
Documents |
Upload: | carly-saunders |
View: | 39 times |
Download: | 5 times |
Week 07 (09/05/13)
USB-serial convert
& terminal forwarding尚哲
2
成功的步驟 (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
3
成功的步驟 ( 結果圖 1)
插入 USB dmesg
4
成功的步驟 ( 結果圖 2)
5
嘗試做法 getty -L ttyUSB0 -h 115200 ansi getty -L ttyUSB0 -h 115200 vt100 picocom -b 115200 /dev/ttyUSB0
6
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< 等待字元串 > 設置等待回應的字元串。
7
嘗試做法 : getty ( 失敗 )
cd gateway; make menuconfig in busybox, select getty getty -L ttyUSB0 -h 115200 ansi
8
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.
9
嘗試做法 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
需上網
10
picocom -b 115200 /dev/ttyUSB0( 非預期的結果 )
11
( 預期結果 )
12
( 嘗試做法 )Auto load mod in AP
儲存方法 ???
13
下兩週進度 完成 picocom or others tty forwarding 方法 每次開機後自動 install 的方法
save file ( usbserial.o pl2303.o ) save initialize script