to all who cursed vodafone and friends for not being able to run their ppp, i apologize for writing this quick howto so late.
my huawei is
Bus 002 Device 005: ID 12d1:1465 Huawei Technologies Co., Ltd.but usb_modeswitch supports many other types of devices. check your dev ids in lsusb output.
prerequisites:
- linux 2.6 system
- comgt (http://sourceforge.net/projects/comgt/)
- usb_modeswitch (http://www.draisberghof.de/usb_modeswitch/#download )
1. install comgt
2. install usb_modeswitch
3. install this as file /etc/udev/rules.d/55-huawei.rules:
ACTION=="add", SUBSYSTEMS=="scsi", DRIVERS=="sr", \ATTRS{vendor}=="HUAWEI ", \RUN:=""ACTION=="add", SUBSYSTEM=="usb", \ATTR{idVendor}=="12d1", ATTR{idProduct}=="1520", \RUN:="/usr/local/bin/usbflip %s{idVendor} %s{idProduct}"
install this as script /usr/local/bin/usbflip and chmod-it +x
#!/bin/shVID="$1"PID="$2"PATH=/usr/local/bin/:usr/bin:/bin:/usr/sbin:/sbin# Need to wait for the device to settle before sending the commandsleep 1# Huawei recommended switch sequenceecho "FLIP-FLOP: ${VID}:${PID} !!"/usr/sbin/usb_modeswitch -v ${VID} -p ${PID} -M 55534243EE0000006000000000000611062000000000000000000000000000sleep 1modprobe -a optionsleep 1echo 0x12d1 0x1465 > /sys/bus/usb-serial/drivers/option1/new_id
-insert the modem. you should see /dev/ttyUSB[0-4] being created in dev
-run:
COMGTPIN=1234 comgt -d /dev/ttyUSB0 PIN
you should get a "SIM ready" message
-run:
comgt -d /dev/ttyUSB0 reg
you should get a message like this:
root@pinkpony:~# COMGTPIN=1234 comgt -d /dev/ttyUSB0 regWaiting for Registration.........Registered on Home network: "22601",2
preparing ppp
===============
install this as /etc/ppp/peers/vodafone
name vodafone460800noipv6lockcrtsctslocalnoccpnovjnobsdcompnovjccompnopcompnoaccompnodeflatenomagicnompnopredictor1defaultroutelcp-echo-failure 0lcp-echo-interval 0noauthdebugkdebug 1nodetachuser internet.vodafone.ropassword vodafoneconnect "/usr/sbin/chat -V -v -f /etc/ppp/chatscripts/vodafone2"noipdefaultipcp-no-addressesmaxfail 40persistipcp-accept-localipcp-accept-remotenoipxusepeerdns
install this as /etc/ppp/chatscripts/vodafone2
'ABORT' 'BUSY''ABORT' 'ERROR''ABORT' 'NO CARRIER'REPORT CONNECT'TIMEOUT' '60''' 'ATH''OK' 'ATZ''OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0''OK' "AT&F"'OK' "ATE1"'OK' 'AT+CGDCONT=1,"IP","internet.vodafone.ro"'TIMEOUT 120'OK' "ATD*99***1#"'CONNECT' '\c'
you are kinda ready to run ppp:
pppd /dev/ttyUSB0 call vodafone
you should be getting output similar to this:
cia@pinkpony:~$ sudo pppd /dev/ttyUSB0 call vodafone[sudo] password for cia:ATHOKATZOKATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0OKAT&FOKATE1OKAT+CGDCONT=1,"IP","internet.vodafone.ro"OKATD*99***1#CONNECTchat: Jul 17 10:21:50 CONNECTScript /usr/sbin/chat -V -v -f /etc/ppp/chatscripts/vodafone2 finished (pid 2121), status = 0x0Serial connection established.using channel 1Using interface ppp0Connect: ppp0 <--> /dev/ttyUSB0.........sent [IPCP ConfAck id=0x1]rcvd [IPCP ConfAck id=0x4] Could not determine remote IP address: defaulting to 10.64.64.64 Cannot determine ethernet address for proxy ARP local IP address 10.85.113.180remote IP address 10.64.64.64primary DNS address 81.12.132.206secondary DNS address 81.12.128.206Script /etc/ppp/ip-up started (pid 2128)Script /etc/ppp/ip-up finished (pid 2128), status = 0x0
my huawei modem info
E: ID_VENDOR=HUAWEI_TechnologyE: ID_VENDOR_ENC=HUAWEI\x20TechnologyE: ID_VENDOR_ID=12d1E: ID_MODEL=HUAWEI_MobileE: ID_MODEL_ENC=HUAWEI\x20MobileE: ID_MODEL_ID=1465E: ID_REVISION=0000E: ID_SERIAL=HUAWEI_Technology_HUAWEI_MobileE: ID_TYPE=genericE: ID_BUS=usbE: ID_USB_INTERFACES=:ffffff:0206ff:0a0000:080650:E: ID_USB_INTERFACE_NUM=00E: ID_USB_DRIVER=optionE: ID_IFACE=00E: ID_VENDOR_FROM_DATABASE=Huawei Technologies Co., Ltd.
you're done. have fun.
No comments:
Post a Comment