There are posts from other people saying that this can be easily configured in ubuntu. However, that doesn't really applies on RHEL 5.1. Unfortunately, I am using RHEL 5.1 on my laptop as preconfigured by our IT helpdesk. I have no intention to reinstall a ubuntu or Fedora as I will have to figure out how to configure other stuff like VPN, email, etc all over again.
RHEL is mainly a server OS. I think most people don't use RHEL on desktop/laptop except redhat employees. I have spent some time figuring out how to configure the Huawei e270 modem and getting it work on RHEL. I think it might be useful to share the information here in case some people need to do the same.
First thing first, you need to make sure that the modem is recognized properly. Most often the modem is recognized as a USB storage instead.
1) Download usb_modeswitch from http://www.draisberghof.de/usb_modeswitch/ and extract the files to /opt/usb_modeswitch, for example.
2) Plug in Huawei E270 modem and execute the following command as root.
# /opt/usb_modeswitch-0.9.4/usb_modeswitch -v 0x12d1 -p 0x1003 -H 1
You may need to execute the same command a few times until you see the following message:
Looking for default devices
Found default devices (1)
Prepare switching, accessing latest device
OK, Huawei control message successfully sent.
-> See /proc/bus/usb/devices (or call lsusb) for changes. Bye
3) Now if you execute "ls /dev/ttyUSB*", you should able to see a list of USB devices.
Second step is to dial-in to StarHub 3G network. Login as root and execute the following commands:
# chmod -c a+rwx /etc/wvdial.conf
# chmod -c a+rwx /etc/ppp/pap-secrets
# chmod -c a+rwx /etc/ppp/chap-secrets
Edit the file /etc/wvdial.conf and add the following content:
[Dialer hsdpa]
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 =
Phone = *99#
Username = star
Password = hub
Ask Password = off
Dial Command = ATDT
Stupid Mode = on
Compuserve = off
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = off
Check Def Route = on
Auto DNS = on
After these are done, execute the command "wvdial hsdpa" and you should be able to see the following output:
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Jul 10 15:32:48 2008
--> pid of pppd: 5031
--> Using interface ppp0
--> local IP address 10.13.165.229
--> remote IP address 10.64.64.64
--> primary DNS address 203.116.1.78
--> secondary DNS address 203.116.254.150
Good luck!
Subscribe to:
Post Comments (Atom)
5 comments:
Hello,
very interesting article for me because I am in a similar situation.
Everything worked well except step 3, where ls /dev/ttyUSB* returned nothing.
there are some *usb* files in dev, but I don't know wich of them is the good one.
/dev/usbdev1.1_ep00
/dev/usbdev1.1_ep81
/dev/usbdev1.3_ep00
/dev/usbdev1.3_ep81
/dev/usbdev1.4_ep00
/dev/usbdev1.4_ep02
/dev/usbdev1.4_ep04
/dev/usbdev1.4_ep05
/dev/usbdev1.4_ep81
/dev/usbdev1.4_ep82
/dev/usbdev1.4_ep83
/dev/usbdev1.4_ep85
Any idea on this ?
Thank you ,
Dragos
I should also mention that my linux is in a vmware...and that
I have in /proc/bus/usb/devices :
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.18-8.el5 uhci_hcd
S: Product=UHCI Host Controller
S: SerialNumber=0000:00:07.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 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
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 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=(none)
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=(none)
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=usb-storage
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=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 7
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0e0f ProdID=0002 Rev= 1.00
S: Product=VMware Virtual USB Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 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= 1 Ivl=255ms
Thank you
I have also created a file /etc/udev/rules.d/50-huawei.rules with the following content:
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/sbin/modprobe usbserial vendor=0x12d1 product=0x1003"
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/sbin/modprobe ppp_async"
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/bin/sleep 10"
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/opt/usb_modeswitch-0.9.4/usb_modeswitch -v 0x12d1 -p 0x1003 -H 1"
Post a Comment