SyntaxHighlighter

2013年9月12日星期四

OpenWRT on WR703N with shadowsocks

TP-Link WR703N only have 4M flash, so we have to remove all unnecessary package and rebuild OpenWRT.

Note 1: If you do not need wifi, remove all package in kernel/wireless drivers. and wifi related tools.
Note 2: WR703N usb only support USB2.0, without hub, you only need core+usb2, ohci and uhci is not needed.

list of my ROM:
[email protected]:~# opkg list-installed
base-files - 146-r37950
busybox - 1.19.4-7
chat - 2.4.5-10
comgt - 0.32-21
dnsmasq - 2.66-3
dropbear - 2012.55-2
firewall - 2013-08-14
ip6tables - 1.4.20-1
iptables - 1.4.20-1
jshn - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
kernel - 3.10.10-1-aafff7801ab1c4fd09e3d3383fb77582
kmod-crypto-aes - 3.10.10-1
kmod-crypto-arc4 - 3.10.10-1
kmod-crypto-core - 3.10.10-1
kmod-crypto-hash - 3.10.10-1
kmod-crypto-manager - 3.10.10-1
kmod-crypto-pcompress - 3.10.10-1
kmod-gpio-button-hotplug - 3.10.10-1
kmod-ip6tables - 3.10.10-1
kmod-ipt-conntrack - 3.10.10-1
kmod-ipt-core - 3.10.10-1
kmod-ipt-nat - 3.10.10-1
kmod-ipt-nathelper - 3.10.10-1
kmod-ipv6 - 3.10.10-1
kmod-leds-gpio - 3.10.10-1
kmod-ledtrig-default-on - 3.10.10-1
kmod-ledtrig-netdev - 3.10.10-1
kmod-ledtrig-timer - 3.10.10-1
kmod-lib-crc-ccitt - 3.10.10-1
kmod-nls-base - 3.10.10-1
kmod-ppp - 3.10.10-1
kmod-pppoe - 3.10.10-1
kmod-pppox - 3.10.10-1
kmod-scsi-core - 3.10.10-1
kmod-scsi-generic - 3.10.10-1
kmod-slhc - 3.10.10-1
kmod-usb-core - 3.10.10-1
kmod-usb-serial - 3.10.10-1
kmod-usb-serial-option - 3.10.10-1
kmod-usb-serial-wwan - 3.10.10-1
kmod-usb2 - 3.10.10-1
libblobmsg-json - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
libc - 0.9.33.2-1
libgcc - 4.6-linaro-1
libip4tc - 1.4.20-1
libip6tc - 1.4.20-1
libiwinfo - 46
libiwinfo-lua - 46
libjson-c - 0.11-2
libjson-script - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
liblua - 5.1.5-1
libnl-tiny - 0.1-3
libopenssl - 1.0.1e-2
libpthread - 0.9.33.2-1
librt - 0.9.33.2-1
libubox - 2013-08-01-04f194aa8a04926fe7f2e42bbf9ba6c62d49339e
libubus - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
libubus-lua - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
libuci - 2013-06-11.1-1
libuci-lua - 2013-06-11.1-1
libusb-1.0 - 1.0.9-1
libxtables - 1.4.20-1
lua - 5.1.5-1
luci - svn-r9902-1
luci-app-firewall - svn-r9902-1
luci-i18n-english - svn-r9902-1
luci-lib-core - svn-r9902-1
luci-lib-ipkg - svn-r9902-1
luci-lib-nixio - svn-r9902-1
luci-lib-sys - svn-r9902-1
luci-lib-web - svn-r9902-1
luci-mod-admin-core - svn-r9902-1
luci-mod-admin-full - svn-r9902-1
luci-proto-3g - svn-r9902-1
luci-proto-core - svn-r9902-1
luci-proto-ppp - svn-r9902-1
luci-sgi-cgi - svn-r9902-1
luci-theme-base - svn-r9902-1
luci-theme-bootstrap - svn-r9902-1
mtd - 20
netifd - 2013-08-29-814e09499e12edaea658f9f5594fe9917c0ecde4
opkg - 618-3
ppp - 2.4.5-10
procd - 2013-09-10-824a4b3da2c0be19ccf54a48dcd4c10677b82c1a-1
shadowsocks-libev - 1.3.3-9933435506b1c96e8bfe7a0fc5f305398fd0f62e
swconfig - 10
ubox - 2013-08-16.1-5290ec879aa4d9f4192df00aad4434b0f0afa872
ubus - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
ubusd - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
uci - 2013-06-11.1-1
uhttpd - 2013-07-31-fae8886f8aa5d996c8de607abea8b677216549b5
uhttpd-mod-ubus - 2013-07-31-fae8886f8aa5d996c8de607abea8b677216549b5
usb-modeswitch - 2013-08-20-575c8e8dec6d1f544debe867ebc0bde051209c17
zlib - 1.2.8-1

For shadowsocks, include libopenssl.

TD-SCDMA 3g.chat:
[email protected]:~# cat /etc/chatscripts/3g.chat
ABORT   BUSY
ABORT   'NO CARRIER'
ABORT   ERROR
REPORT  CONNECT
TIMEOUT 10
""      "ATZ"
OK      "ATE0V1"
OK      "ATS0=0"
OK      'AT+CGDCONT=1,"IP","cmwap"'
OK      "AT+CFUN=1"
SAY     "Calling TD-SCDMA"
TIMEOUT 30
OK      "ATD*98*1#"
CONNECT ' '


Refs:
https://github.com/haohaolee/shadowsocks-openwrt