
| kód: |
|
ipkg install ipkg ipkg update ipkg install nas ipkg install http://ftp.berlios.de/pub/xwrt/webif_latest.ipk |
| kód: |
|
ipkg install kmod-usb-core ipkg install kmod-usb-ohci ipkg install kmod-usb-uhci ipkg install kmod-usb-serial ipkg install kmod-usb2 ipkg install lsusb |
| kód: |
| ipkg install kmod-usb-core kmod-usb-hci kmod-usb-uhci kmod-usb-serial kmod-usb2 lsusb |
| kód: |
| cat /etc/modules.d/*-usb-serial
usbserial vendor=0x12d1 product=0x1003 |
| kód: |
| reboot |
| kód: |
| hub.c: new USB device 01:03.0-1, assigned address 2
usbserial.c: Generic converter detected usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs) usbserial.c: Generic converter detected usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs) usbserial.c: Generic converter detected usbserial.c: Generic converter now attached to ttyUSB2 (or usb/tts/2 for devfs) |
| kód: |
| # cat /proc/bus/usb/devices
T: Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI-alt Root Hub S: SerialNumber=120 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI-alt Root Hub S: SerialNumber=100 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=12d1 ProdID=1003 Rev= 0.00 S: Manufacturer=HUAWEI Technologies S: Product=HUAWEI Mobile C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=serial E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=serial E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=serial E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB OHCI Root Hub S: SerialNumber=b8003000 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms |
| kód: |
|
ipkg install chat ipkg install ppp |
| kód: |
|
# cat /etc/ppp/peers/e220 /dev/usb/tts/0 115200 crtscts defaultroute mtu 1500 mru 1500 0.0.0.0:0.0.0.0 #idle 300 lock #modem noauth usepeerdns connect '/usr/sbin/chat -t 20 -v -f /etc/ppp/peers/chate220' |
| kód: |
| # cat /etc/ppp/peers/chate220
################# ABORT BUSY ECHO ON SAY "Ideme na vec\n" '' AT OK ATZ OK ATS0=0 OK AT+CGATT=0 OK AT+CGQREQ=1,0,0,0,0,0 OK AT+CGQMIN=1,0,0,0,0,0 OK AT+CGDCONT=1,"IP","internet","0.0.0.0",0,0 OK ATE1V1&D2 OK AT+IFC=2,2 OK ATD*99***1# TIMEOUT 30 CONNECT ############### |
| kód: |
| mkdir /var/lock |
| kód: |
| pppd nodetach debug call e220 |
| kód: |
| # pppd nodetach debug call e220
Dialing Three AT OK ATZ OK ATS0=0 OK AT+CGATT=0 OK AT+CGQREQ=1,0,0,0,0,0 OK AT+CGQMIN=1,0,0,0,0,0 OK AT+CGDCONT=1,"IP","internet","0.0.0.0",0,0 OK ATE1V1&D2 OK AT+IFC=2,2 OK ATD*99***1# CONNECT Serial connection established. using channel 2 Using interface ppp0 Connect: ppp0 <--> /dev/usb/tts/0 sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa3d12cc7>] rcvd [LCP ConfReq id=0x3 <asyncmap 0x0> <auth chap MD5> <magic 0xd9b918> <pcomp> <accomp>] No auth is possible sent [LCP ConfRej id=0x3 <auth chap MD5> <pcomp> <accomp>] rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xa3d12cc7>] rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <magic 0xd9b918>] sent [LCP ConfAck id=0x4 <asyncmap 0x0> <magic 0xd9b918>] sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>] rcvd [LCP DiscReq id=0x5 magic=0xd9b918] rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>] sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>] rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>] sent [IPCP ConfReq id=0x3 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>] rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>] sent [IPCP ConfReq id=0x4 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>] rcvd [IPCP ConfNak id=0x4 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>] sent [IPCP ConfReq id=0x5 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>] rcvd [IPCP ConfReq id=0x2] sent [IPCP ConfNak id=0x2 <addr 0.0.0.0>] rcvd [IPCP ConfRej id=0x5 <compress VJ 0f 01>] sent [IPCP ConfReq id=0x6 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>] rcvd [IPCP ConfNak id=0x6 <addr 10.131.10.129> <ms-dns1 213.151.200.30> <ms-dns3 213.151.208.161>] sent [IPCP ConfReq id=0x7 <addr 10.131.10.129> <ms-dns1 213.151.200.30> <ms-dns3 213.151.208.161>] rcvd [IPCP ConfAck id=0x7 <addr 10.131.10.129> <ms-dns1 213.151.200.30> <ms-dns3 213.151.208.161>] rcvd [IPCP ConfReq id=0x3] sent [IPCP ConfAck id=0x3] Could not determine remote IP address: defaulting to 10.64.64.64 local IP address 10.131.10.129 remote IP address 10.64.64.64 primary DNS address 213.151.200.30 secondary DNS address 213.151.208.161 Script /etc/ppp/ip-up started (pid 799) Script /etc/ppp/ip-up finished (pid 799), status = 0x1 |
| kód: |
|
nvram set wan_device=ppp0 nvram set wan_ifname=ppp0 nvram commit |
| kód: |
|
# cat /etc/init.d/S99e220 mkdir /var/lock sleep 3 pppd nodetach debug call e220 & |
| kód: |
| chmod 0755 /etc/init.d/S99e220 |
| kód: |
| reboot |
| kód: |
| # ifconfig ppp0
ppp0 Link encap:Point-Point Protocol inet addr:10.131.36.147 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:9 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:174 (174.0 B) TX bytes:198 (198.0 B) |