*** ubsa.c.org Tue Nov 25 11:59:29 2008 --- ubsa.c Sat May 2 23:48:23 2009 *************** *** 236,241 **** --- 236,243 ---- { USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS }, /* Huawei Mobile */ { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE }, + /* Huawei E220 G3 Modem */ /*take@takeoka.org */ + { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, /* Sierra Wireless LENOVO UMTS card */ { USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_3 }, /* Qualcomm, Inc. ZTE CDMA */ubsa.c diff
*** usbdevs.org Tue Nov 25 11:59:29 2008 --- usbdevs Sat May 2 23:46:22 2009 *************** *** 1403,1408 **** --- 1403,1409 ---- /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile + product HUAWEI E220 0x1003 Huawei E220 G3 Modem /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320gusbdevs diff
# config GYOPOして、
# cd ../compile/GYOPO/ # make cleandepend && make depend # make (コンパイル) # make install
ubsa_load="YES" umass_load="YES" umodem_load="YES"
cuau0|com8:dv=/dev/cuaU0:br#115200:pa=none:そして、shellで、rootになり、
# tip cuau0とやると、モデムと対話できる。
at「リターン」と打つと、
OKとプロンプトが返る。
# tip cuau0 connected t OK at OK ati Manufacturer: huawei Model: D12HW Revision: 11.315.11.00.00 IMEI: 359015020799354 +GCAP: +CGSM,+DS,+ES OK [EOT] #一番最初の「a」のエコーバックが無いのは、モデムの単純なバグだろう。
emobile: set device /dev/cuaU0 set speed 115200 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" set timeout 180 # 3 minute idle timer (the default) set phone "*99***1#" set authname "em" set authkey "em" set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 delete ALL add default HISADDR # Add a (sticky) default route enable dns # request DNS info (for resolv.conf)ppp.confファイル全体
# ppp -background emobileとして使う。
% ifconfig lo0: flags=8049metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 tun0: flags=8051 metric 0 mtu 1500 inet 114.51.144.176 --> 10.0.0.2 netmask 0xffffff00 Opened by PID 798
% netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.0.0.2 UGS 0 6 tun0 10.0.0.2 114.51.144.176 UGH 1 0 tun0 127.0.0.1 127.0.0.1 UH 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#1 UHL lo0 ff01:1::/32 fe80::1%lo0 UC lo0 ff01:2::/32 link#2 UGC tun0 ff02::%lo0/32 fe80::1%lo0 UC lo0
% ping www.freebsd.org PING www.freebsd.org (69.147.83.33): 56 data bytes 64 bytes from 69.147.83.33: icmp_seq=0 ttl=50 time=499.686 ms 64 bytes from 69.147.83.33: icmp_seq=1 ttl=50 time=408.122 ms 64 bytes from 69.147.83.33: icmp_seq=2 ttl=50 time=447.127 ms ^C --- www.freebsd.org ping statistics --- 4 packets transmitted, 3 packets received, 25.0% packet loss round-trip min/avg/max/stddev = 408.122/451.645/499.686/37.517 ms %