Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Asus WL500gP USB Serial
1. 專題進度報告
Week 9
Terminal through USB-Serial
Success Version
Ray
1
2. Review
usbserial & pl2303 module is work.
It's ok to communicate with router through USB-
Serial line, text data was transferred to router.
Need to solve
Text data should be command, and can be execute
on router
Result should be return to terminal through USB-
Serial
2
3. Review
Manual control in telnet
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
4. Modify
usbserial & pl2303 already build-in, not need
download again.
Use directly
insmod usbserial
insmod pl2303
4
6. Solution
Text data should be command, and can be execute
on router
✔ Use a shell to pipe, sh ↔ terminal (GtkTerm)
✔ sh::in ← terminal::out
✔ sh::out → terminal::in
✔ sh::err → terminal::in
✔ /bin/sh < /dev/ttyUSB0 > /dev/ttyUSB0 2>&1
6
7. Modify Manual to Auto
USB-Serial is ready after router bootup.
Create a autorun script when booting.
Router ON
Extract image
Execute /linuxrc
Execute initd
Execute /usr/local/sbin/post-boot
7