Fw: Re: USB modem driver needed

Adrie a3coligny at gmail.com
Sat Aug 7 18:08:56 UTC 2010


Hi,
More info for getting this device running under Ubuntu from a forum:

 
 
How I got Neotel running on Ubuntu 9.04...
Decided to install Jaunty as my Hardy was very messy. I've been running
Linux since Breezy but still regard myself as a noobie.
After much trial and tribulation, and many failed attempts on Hardy, I
finally got my Neotel Prime running, first time round on Jaunty.
Following is a step-by-step process which I take NO CREDIT for!
I am merely posting this in an attempt to make the process a bit easier to
understand and follow for all Linux(Ubuntu) users out there wishing to use
Neotel.
This was done on a fresh installation of Ubuntu 9.04 Jaunty Jackalope.
It helps having an Internet connection for the first step of the process...
Otherwise packages can be downloaded seperately and Google will provide
details on unpacking and installing.
Step 1)
First download the necessary packages we need.
Open System>Administration>Synaptic Package Manager
Find and install:
Code:
1) wvdial
2) Linux-source
If the above are not listed, open terminal, use the code(s):
Code:
1) $ sudo apt-get install wvdial
2) $ sudo apt-get install Linux-source
Step 2) 
Open a terminal and type: 
Code:
$ sudo -s
$ cd /usr/src
$ tar xjvf Linux-source-2.6.28.tar.bz2
$ gedit /usr/src/Linux-source-2.6.28/drivers/USB/serial/option.c
"Now look for static struct USB_device_id option_ids[] about line 300 and
add the following just above it:"
Code:
// +++ chrisb
#define NEOTEL_DEVICE_VENDOR_ID 0x1d09
#define NEOTEL_DEVICE_PRODUCT_ID 0x4000
// +++
"and then in the struct add:" (the line in BOLD)
Code:
Static struct USB_device_id option_ids[] = {
{ USB_DEVICE(NEOTEL_DEVICE_VENDOR_ID, NEOTEL_DEVICE_PRODUCT_ID) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
Save and close gedit.
"To compile:"
Code:
$ cd /usr/src/Linux-source-2.6.28/drivers/USB/serial/
$ make -C /lib/modules/`uname -r`/build M=`pwd`
If successful you should see a long list without errors resembling the
following:
Code:
Make: Entering directory `/usr/src/Linux-headers-2.6.24-21-generic'
LD /usr/src/Linux-source-2.6.24/drivers/USB/serial/built-in.o
CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/USB-serial.o
CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/generic.o
CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/bus.o
....
Make: Leaving directory `/usr/src/Linux-headers-2.6.24-21-generic'
"Backup the old drivers"
Code:
$ mv /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko
/lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko.backup
"Now add new drivers (compiled):"
Code:
$ cp /usr/src/Linux-source-2.6.28/drivers/USB/serial/option.ko
/lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko
"You also need to load the new option:"
Code:
$ gedit /etc/modules
"And just add to the end of the file:"
Code:
Option
Reboot your computer, open a terminal again and type:
Code:
$ lsusb
Which should produce, among others:
Code:
Bus 002 Device 002: ID 1d09:4000 TechFaith Wireless Technology Limited
Step 3) 
Open a terminal and type:
Code:
$ sudo -s
And then:
Code:
$ wvdialconf
Which should produce something similar to:
Code:
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3 
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: QUALCOMM INCORPORATED
ttyUSB0<*1>: Speed 9600: AT -- OK
ttyUSB0<*1>: Max speed is 9600; that should be safe.
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.
ttyUSB0<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
Now run:
$ gedit /etc/wvdial.conf
Copy and paste the following and change your username and password:
Code:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Stupid Mode = 1
Phone = #777
Modem = /dev/ttyUSB0
Username = 1234567890 at neotel.co.za
Dial Command = ATDT
Password = 1234
Baud = 460800
PPPD Options = crtcts multilink usepeerdns lock defaultroute
[Dialer neotel]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Baud = 460800
Stupid Mode = 1
Modem = /dev/ttyUSB0
Modem Type = USB Modem
Dial Command = ATDT
PPPD Options = crtcts multilink usepeerdns lock defaultroute
Save and close gedit
Step 4)
In the terminal, as any user, type: 
$ wvdial
Which, if successful, should result in:
--> 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 Thu May 14 22:59:46 2009 
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied 
--> --> PAP (Password Authentication Protocol) may be flaky. 
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied 
--> --> CHAP (Challenge Handshake) may be flaky. 
--> Pid of pppd: 4541 
--> Using interface ppp0 
--> pppd: 0 [1c][08]P [1c][08] 
--> pppd: 0 [1c][08]P [1c][08] 
--> pppd: 0 [1c][08]P [1c][08] 
--> pppd: 0 [1c][08]P [1c][08] 
--> pppd: 0 [1c][08]P [1c][08] 
--> local IP address 41.174.2.250 
--> pppd: 0 [1c][08]P [1c][08] 
--> remote IP address 2.2.2.2 
--> pppd: 0 [1c][08]P [1c][08] 
--> primary DNS address 41.160.0.36 
--> pppd: 0 [1c][08]P [1c][08] 
--> secondary DNS address 41.160.0.37 
--> pppd: 0 [1c][08]P [1c][08]
and a fully working internet connection!!!!! :D
@
to disconnect, in the terminal that is running wvdial, hold ctrl-c
For a graphical way of dialing...
Install Gnome-PPP, it uses wvdial as it's backend and works perfectly. 
@
NEOTEL:
Instructions for Use:
Steps are as follows (with sample explanation to follow):
* modprobe the usbserial driver directly for the device
* ppp dialer config
How to do it:
Plug in your modem, and then use the 'lsusb' command.
Code
user at linux:~$> lsusb
Bus 002 Device 002: ID 1d09:4000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000 
Here we get the USB vendor and product ID's (the first one, in this case).
Now we load the 'usbserial' driver specifically for this device:
Code
user at linux:~$> sudo modprobe usbserial vendor=0x1d09 product=0x4000
As you can see, we use the first segment of the ID number as the vendor, 
and the second segment as the product ID, both with 0x prepended.
Now, we check /dev to see that the devices are there:
Code:
user at linux:~$>ls /dev/ttyU*
/dev/ttyUSB0 /dev/ttyUSB1
Next step is to configure the ppp connection. 
Since this example is done on an Ubuntu installation, we can use the Debian
pppconfig utility
Code:
user at linux:~$> sudo pppconfig
In this utility, you enter the your username, password and the telephone
number as needed, and then save the connection. 
Be sure to pick a descriptive name, as it is what you will be using to dial
it up. Exit, and then we're ready to dial.
Dialing on Ubuntu:
Code:
user at linux:~$> sudo pon neotel
Where "neotel" is the connection name you picked in setup.
And that's it. At this point if nothing went wrong, you'll have a fully
working ppp0 connection up.
Code:
ifconfig | grep ppp0
 
 


More information about the freebsd-usb mailing list