Reliance Netconnect coming with dual mode modem, and fedora by default detects it as USB Storage device here are the steps to make it work with fedora 11. As soon as you connect your usb modem check for the kernel message
[apundir@localhost ~]$ sudo tail /var/log/messages
Nov 8 10:58:38 localhost kernel: usb 5-1: new full speed USB device using uhci_hcd and address 2
Nov 8 10:58:38 localhost kernel: usb 5-1: New USB device found, idVendor=19d2, idProduct=fff5
Nov 8 10:58:38 localhost kernel: usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 8 10:58:38 localhost kernel: usb 5-1: Product: USB Storage
Nov 8 10:58:38 localhost kernel: usb 5-1: Manufacturer: ZTE, Incorporated
Nov 8 10:58:38 localhost kernel: usb 5-1: SerialNumber: 000000000002
Nov 8 10:58:38 localhost kernel: usb 5-1: configuration #1 chosen from 1 choice
Nov 8 10:58:38 localhost kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Nov 8 10:58:38 localhost kernel: usb 5-1: New USB device found, idVendor=19d2, idProduct=fff5
Nov 8 10:58:38 localhost kernel: usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 8 10:58:38 localhost kernel: usb 5-1: Product: USB Storage
Nov 8 10:58:38 localhost kernel: usb 5-1: Manufacturer: ZTE, Incorporated
Nov 8 10:58:38 localhost kernel: usb 5-1: SerialNumber: 000000000002
Nov 8 10:58:38 localhost kernel: usb 5-1: configuration #1 chosen from 1 choice
Nov 8 10:58:38 localhost kernel: scsi3 : SCSI emulation for USB Mass Storage devices
notice the idVendor=19d2, idProduct=fff5 in messages now we need to switch device from usb storage to modem based on this ids. now install usb_modeswitch for this
[apundir@localhost ~]$ sudo yum -y install usb_modeswitch
now you need to look for exact match for target product id in /etc/usb_modeswitch.conf
I have ZTE AC2726 modem here is the configuration i added
[apundir@localhost ~]$ tail -15 /etc/usb_modeswitch.conf
# ZTE AC2726 (EVDO) Reliance Netconnect
#
# Comments: amitpundir@ymail.com
DefaultVendor= 0x19d2
DefaultProduct= 0xfff5
TargetVendor= 0x19d2
TargetProduct= 0xfff1
MessageEndpoint=0x0a
MessageContent="5553424312345678c00000008000069f010000000000000000000000000000"
#
# Comments: amitpundir@ymail.com
DefaultVendor= 0x19d2
DefaultProduct= 0xfff5
TargetVendor= 0x19d2
TargetProduct= 0xfff1
MessageEndpoint=0x0a
MessageContent="5553424312345678c00000008000069f010000000000000000000000000000"
in case you have a different modem make you need to search your configuration and make it enable by commenting the ";" in the usb_modeswitch.conf file. now lets switch the device
[apundir@localhost ~]$sudo usb_modeswitch
here is what i get from my kernel messages
[apundir@localhost ~]$ sudo tail /var/log/messages
Nov 8 11:00:42 localhost kernel: usb 5-1: usbfs: process 2562 (usb_modeswitch) did not claim interface 0 before use
Nov 8 11:00:42 localhost kernel: usb 5-1: USB disconnect, address 2
Nov 8 11:00:43 localhost kernel: usb 5-1: new full speed USB device using uhci_hcd and address 3
Nov 8 11:00:44 localhost kernel: usb 5-1: New USB device found, idVendor=19d2, idProduct=fff1
Nov 8 11:00:44 localhost kernel: usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 8 11:00:44 localhost kernel: usb 5-1: Product: ZTE CDMA Tech
Nov 8 11:00:44 localhost kernel: usb 5-1: Manufacturer: ZTE, Incorporated
Nov 8 11:00:44 localhost kernel: usb 5-1: configuration #1 chosen from 1 choice
Nov 8 11:00:42 localhost kernel: usb 5-1: USB disconnect, address 2
Nov 8 11:00:43 localhost kernel: usb 5-1: new full speed USB device using uhci_hcd and address 3
Nov 8 11:00:44 localhost kernel: usb 5-1: New USB device found, idVendor=19d2, idProduct=fff1
Nov 8 11:00:44 localhost kernel: usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 8 11:00:44 localhost kernel: usb 5-1: Product: ZTE CDMA Tech
Nov 8 11:00:44 localhost kernel: usb 5-1: Manufacturer: ZTE, Incorporated
Nov 8 11:00:44 localhost kernel: usb 5-1: configuration #1 chosen from 1 choice
now i got my modem connected to my laptop you can see it added to the list of usb devices on your machine
[apundir@localhost ~]$ lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth
Bus 001 Device 002: ID 413c:a005 Dell Computer Corp. Internal 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 19d2:fff1 ONDA Communication S.p.A.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth
Bus 001 Device 002: ID 413c:a005 Dell Computer Corp. Internal 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 19d2:fff1 ONDA Communication S.p.A.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
here ONDA is my modem. modeprobe the new device
[apundir@localhost ~]$ sudo modprobe usbserial vendor=0x19d2 product=0xfff1
after this i have used wvdial to connected to network
installing wvdial is simple with YellowdogUpdateManager
[apundir@localhost ~]$ sudo yum -y install wvdial
now we need to generate a wvdial.conf file for connecting to internet, many blogs say it can be done using wvdialconf but i was not able to connect with the conf file i got later after some this and that changes, i got my modem connecting to internet here is my final conf file
[apundir@localhost ~]$ cat /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyUSB0
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone=#777
Username=9*********
Init1=ATZ
Password=9*********
Baud=4608000
PPPP Path= /usr/sbin/pppd
New PPPD= 1
Stupid Mode = 1
Tonline = 0
(change username and password in this file. and you may need to change the path of modem for me it got connected to /dev/ttyUSB0)
[Dialer Defaults]
Modem = /dev/ttyUSB0
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone=#777
Username=9*********
Init1=ATZ
Password=9*********
Baud=4608000
PPPP Path= /usr/sbin/pppd
New PPPD= 1
Stupid Mode = 1
Tonline = 0
(change username and password in this file. and you may need to change the path of modem for me it got connected to /dev/ttyUSB0)
finally for connecting you need
[apundir@localhost ~]$ sudo wvdial
and output of this will be something like
[apundir@localhost ~]$ sudo wvdial
--> WvDial: Internet dialer version 1.60
--> 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#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Nov 8 11:05:07 2009
--> Pid of pppd: 2719
--> pppd: [18]��
--> Using interface ppp0
--> pppd: [18]��
--> pppd: [18]��
--> pppd: [18]��
--> pppd: [18]��
--> local IP address 115.184.115.103
--> pppd: [18]��
--> remote IP address 220.224.141.145
--> pppd: [18]��
--> primary DNS address 202.138.103.100
--> pppd: [18]��
--> secondary DNS address 202.138.96.2
--> pppd: [18]��
--> WvDial: Internet dialer version 1.60
--> 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#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Nov 8 11:05:07 2009
--> Pid of pppd: 2719
--> pppd: [18]��
--> Using interface ppp0
--> pppd: [18]��
--> pppd: [18]��
--> pppd: [18]��
--> pppd: [18]��
--> local IP address 115.184.115.103
--> pppd: [18]��
--> remote IP address 220.224.141.145
--> pppd: [18]��
--> primary DNS address 202.138.103.100
--> pppd: [18]��
--> secondary DNS address 202.138.96.2
--> pppd: [18]��
I am not sure now what are these mojibake character, but surely they are due to my terminal settings ..
So first thing i am doing after connecting to internet is writing this blog. hope to see your comment when you get connected
Cheers !
waaah! nice experiement!
ReplyDeletewhile configuring on another fedora machine, wvdial was not updating nameservers. got this fix
ReplyDeleteThe root cause of the problem is this: when the ppp interface comes up, pppd calls /etc/ppp/ip-up which calls /etc/sysconfig/network-scripts/ifup-post. ifup-post is the magic script which populates /etc/resolv.conf. However /etc/ppp/ip-up is meant to be called with 6 arguments (say 6th arg = XXXX), then it looks for the existence of /etc/sysconfig/network-scripts/ifcfg-XXXX. Only if this file exists is ifup-post called. So…drum roll… wvdial invokes pppd which invokes /etc/ppp/ip-up with 5 arguments! The result is ip-up looking for /etc/sysconfig/network-scripts/ifcfg-.
The solution is to create a dummy file /etc/sysconfig/network-scripts/ifcfg- with the following lines:
##contents of /etc/sysconfig/network-scripts/ifcfg-
PEERDNS=yes
DEFROUTE=yes
These two lines are enough for ifup-post to do its magic with DNS /etc/resolv.conf.