You are not logged in.

#1 2010-01-23 16:01:48

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

GPRS through Mobile Modem linked via USB

Hi,

this is my first post. I'm a Windows's user who decided to learn Linux. After some experiments on virtual machines, I finally decided to install Arch Linux on the real machine.

Of course, it's much more difficult than installing it on a virtual machine.

What's, in particular, my problem?

Well, I can't set up my internet connection. I describe my situation, now, hoping somebody can help me :-)

I connect to the internet through my mobile phone, which have a modem inside (for GPRS connection). I link the mobile phone to the computer trough a USB cable.

I suppose Arch Linux, like Windows, needs two things:

1) setting up the cable and the modem
2) setting up the connection

I have problems in both points. I found tons of pages online about this argument, but I can't solve it.

So, let's start with the first point. The device should be detected, in some sense. It should be

/dev/ttyUSB0

because this entry is present when the device is linked, while it's not present when the device is not linked. The informations I found thanks to lsusb command are

bus 004 device 003: id 067b:2303 Prolific Technology, Inc. PL2303 Serial port

The command lsusb -v -d 067b 2303 gives me more information. In particular, I can see a row which may be important:

bMaxPocketSize0   64

I say this row may be important because I found various page online which say that I should use the PL2303X module instead of the PL2303 module (or something like that... Be aware: I'm a very beginners user, so I can't understand everything I read online), if I see that line.

Let's come to the second point, now.

I have to set up the connection. Of course, I haven't wvdial, because it's not contained in the core installation. I suppose I have only ppp to set up my connection (and it should be no so simple).

I try to follow various guide, for example:

http://wiki.archlinux.org/index.php/Int … omo_Design
http://www.alfonsomartone.itb.it/ohuxjn.html
http://markus.wernig.net/en/it/usb-seri … -ppp.phtml

but nothing took place.

I hope somebody can help me setting up my internet connection.

I apologize for my English, but I started studying it only two years before.

Thanks :-)

Last edited by zero-giulio (2010-01-31 12:39:44)

Offline

#2 2010-01-23 17:15:37

whacath
Member
Registered: 2009-05-26
Posts: 283

Re: GPRS through Mobile Modem linked via USB

zero-giulio wrote:

Hi,

this is my first post. I'm a Windows's user who decided to learn Linux. After some experiments on virtual machines, I finally decided to install Arch Linux on the real machine.

Of course, it's much more difficult than installing it on a virtual machine.

What's, in particular, my problem?

Well, I can't set up my internet connection. I describe my situation, now, hoping somebody can help me :-)

I connect to the internet through my mobile phone, which have a modem inside (for GPRS connection). I link the mobile phone to the computer trough a USB cable.

I suppose Arch Linux, like Windows, needs two things:

1) setting up the cable and the modem
2) setting up the connection

I have problems in both points. I found tons of pages online about this argument, but I can't solve it.

So, let's start with the first point. The device should be detected, in some sense. It should be

/dev/ttyUSB0

because this entry is present when the device is linked, while it's not present when the device is not linked. The informations I found thanks to lsusb command are

bus 004 device 003: id 067b:2303 Prolific Technology, Inc. PL2303 Serial port

The command lsusb -v -d 067b 2303 gives me more information. In particular, I can see a row which may be important:

bMaxPocketSize0   64

I say this row may be important because I found various page online which say that I should use the PL2303X module instead of the PL2303 module (or something like that... Be aware: I'm a very beginners user, so I can't understand everything I read online), if I see that line.

Let's come to the second point, now.

I have to set up the connection. Of course, I haven't wvdial, because it's not contained in the core installation. I suppose I have only ppp to set up my connection (and it should be no so simple).

I try to follow various guide, for example:

http://wiki.archlinux.org/index.php/Int … omo_Design
http://www.alfonsomartone.itb.it/ohuxjn.html
http://markus.wernig.net/en/it/usb-seri … -ppp.phtml

but nothing took place.

I hope somebody can help me setting up my internet connection.

I apologize for my English, but I started studying it only two years before.

Thanks :-)

Hi and welcome to archlinux!

It looks like the modem is detected so hopefully the only thing you need to do is dialing, But first you need to download and install wvdial and its dependencies. Do you have another internet connect computer? if so, Copy and run this script:

#!/bin/sh

echo Creating the folder archdial.
mkdir archdial
cd archdial/
echo Downloading files.
wget ftp://ftp.archlinux.org/extra/os/i686/wvdial*.pkg.tar.gz ftp://ftp.archlinux.org/extra/os/i686/wvstreams*.pkg.tar.gz ftp://ftp.archlinux.org/extra/os/i686/xplc*.pkg.tar.gz
echo
echo Creating resolv.conf.
echo
echo nameserver 208.67.222.222 > resolv.conf
echo nameserver 208.67.220.220 >> resolv.conf
echo
echo Creating wvdial.conf.
echo [Dialer Defaults] > wvdial.conf
echo Init2 = ATZ >> wvdial.conf
echo Init3 = ATE0V1&D2&C1S0=0+IFC=2,2 >>> wvdial.conf
echo Stupid Mode = 1 >>>> wvdial.conf
echo Modem TYPE = Analog Modem >>>>> wvdial.conf
echo ISDN = 0 >>>>>> wvdial.conf
echo Phone = *99# >>>>>>> wvdial.conf
echo Init5 = AT+CGDCONT=1,"IP","net.tre.se"; >>>>>>>> wvdial.conf
echo Modem = /dev/ttyUSB0 >>>>>>>>> wvdial.conf
echo username = username >>>>>>>>>> wvdial.conf
echo Dial Command = ATDT >>>>>>>>>>> wvdial.conf
echo password = password >>>>>>>>>>>> wvdial.conf
echo Baud = 460800 >>>>>>>>>>>>> wvdial.conf
echo auto DNS = off >>>>>>>>>>>>>> wvdial.conf
echo
echo Creating installation script.
echo
echo #!/bin/sh > install.sh
echo pacman -U *.pkg.tar.gz >> install.sh
echo cp wvdial.conf resolv.conf /etc/ >>> install.sh
echo wvdial >>>> install.sh
echo
echo Done.

It should create a directory called archdial and download wvdial and its dependencies: wvstreams and xplc. It should also create the configuration files wvdial.conf and resolv.conf and the installation script install.sh

Edit wvdial.conf with your service providers dialup info.

Copy the directory to a thumbdrive, floppy, cd or what ever you like, then you boot the archlinux install cd and mount the thumdrive with the archdial dirctory, Run the script install.sh and now the only thing you need to do to connect is to type wvdial and hit enter and you should be online.

Read more here: http://p1i-tips.blogspot.com/2010/01/as … linux.html

Offline

#3 2010-01-23 19:59:46

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

Your script seems to deal with the connection only, nothing has to be done for the device?

I mean: in Windows I have to install some drivers (for the cable). In Linux? Doesn't Linux need drivers for the cable?

How can I taste my device? Is there a sort of diagnostic? So that I can assume the device is properly setted.

Offline

#4 2010-01-23 21:10:27

whacath
Member
Registered: 2009-05-26
Posts: 283

Re: GPRS through Mobile Modem linked via USB

zero-giulio wrote:

Your script seems to deal with the connection only, nothing has to be done for the device?

Yep, it deals with the connection only. 

I mean: in Windows I have to install some drivers (for the cable). In Linux? Doesn't Linux need drivers for the cable?

Thats the world of Microsoft, driver/cd-rom-hell. tongue

How can I taste my device? Is there a sort of diagnostic? So that I can assume the device is properly setted.

Tell us more about the device! But based on that you told us that you got an /dev/tty0 entry, the device should work. It should only be the dailing left to do. But i cannot be sure of this until you tell me more about the device, what company, what model and stuff like that.  In the mean time i suggest that you test dialing. If it doesnt work; print the output.

Offline

#5 2010-01-23 22:02:08

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: GPRS through Mobile Modem linked via USB

zero-giulio wrote:

I connect to the internet through my mobile phone, which have a modem inside (for GPRS connection). I link the mobile phone to the computer trough a USB cable.

1) setting up the cable and the modem
2) setting up the connection

Some phones (like SonyEricsson) can also ask you if you want to enable file-transfer mode or modem-communication mode when you connect them with the cable... after which you are left with a device node like /dev/ttyACM0 or ttyUSB0 that you will use as a modem interface. In order to use your phone as a modem you need to load the cdc-acm and ppp-generic modules. If your phone requires any additional setup you will find that information on the web, but I've told you the minimum requirements for step 1.

For making the connection you will need to obtain and install a dialer application like KPPP or Wvdial. Here is a small article on everything I wrote and a sample wvdial configuration: http://sysphere.org/~anrxc/j/archives/2 … index.html

Last edited by anrxc (2010-01-23 22:04:09)


You need to install an RTFM interface.

Offline

#6 2010-01-24 15:50:48

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

Thanks to both for the help, I'm very grateful.

I perform several test, so.. Let's look to the results ;-)

it looks like the modem is detected so hopefully 
the only thing you need to do is dialing, But first you 
need to download and install wvdial and its dependencies. 
Do you have another internet connect computer? 
if so, Copy and run this script:
...

Interesting script. It enables me to install wvdial on my machine even if I don't have an internet connection actually.

Sfortunately, I couldn't conenct to the internet :-(

Here is my output

WvDial internet dialer version 1.61
cannot get information for serial port
Initializing modem.
Sending ATZ
xxxx
Sending: ATQ0
xxxx
Re-Sending ATZ
xx
Modem not responding

I tried to manually change the wvdial.conf according to other internet pages, but the result is always the same: Modem not responding :-(

What can I do?

Last edited by zero-giulio (2010-01-24 15:52:32)

Offline

#7 2010-01-25 15:24:54

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

Which modules I have to load?

cdc-acm, usbserial, ppp-generic... What else?

How can I load them? (I mean, which files I have lo edit, and how).

Thanks :-)

Offline

#8 2010-01-26 22:45:53

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

I finally discovered the name of the cable I use for connecting my mobile phone (nokia 6101) to my computer:

SBS Ma30021 (here the official site: http://www.sbs-power.it/product_detail.asp?pID=381)

Where can I look for drivers for this device?

My modem is not responding, so I suppose there are some problems with this device...

Last edited by zero-giulio (2010-01-26 22:50:06)

Offline

#9 2010-01-27 21:37:44

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

News!!!

Good news, maybe, but unfortunately I didn't solve my problem.

So, let describe the situation.

First, this is the output of wvdialconf:

cannot get information for serial port
ATQ0 V1 E1 failed with 2400 baud, next try 9600
ATQ0 V1 E1 failed with 9600 baud, next try 115200
OK
ATQ0 V1 E1 Z     OK
ATQ0 V1 E1 Z S0=0    OK
ATQ0 V1 E1 Z S0=0 & C1     OK
ATQ0 V1 E1 Z S0=0 & C1 & D2     OK
ATQ0 V1 E1 Z S0=0 & C1 & D2 + FCLASS=0     OK
MODEM IDENTIFIER ati -- NOKIA
speed 230400 ATQ0 V1 E1 Z S0=0 & C1 & D2 + FCLASS=0      OK
(ecc...)
find a modem on /dev/ttyUSB0
modem configuration written to /etc/wvdial.conf

then, this is the output of wvdial:

sending ATZ     OK
sending ATQ0 V1 E1 Z S0=0 & C1 & D2 + FCLASS=0     
OK
sending AT+CGDCONT=1, "IP", "internet.wind"     
OK
modem initialized
sending ATDT*99#
waiting for carrier
ATDT*99#
CONNECT
(riga illeggibile :D)
carrier detected. Starting ppp immediately
starting ppd at Wednesdey January ecc...
pid of pppd 1900
disconnected at Wednesday January ecc...
ppp daemon has died. pppd options error (exit code: 2)

I can't realize what's happened. It seemed everything went all right, but in the end an error occurs:

disconnected at Wednesday January ecc...
ppp daemon has died. pppd options error (exit code: 2)

Some ideas?

What I have to edit in the rc.conf file (or in other files)? I have to edit something in the modules-interfaces-daemons sections?

Thanks to all :-)

Last edited by zero-giulio (2010-01-27 21:38:56)

Offline

#10 2010-01-30 15:28:50

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

It seems I finally solved my problem!!!

I was able to ping google and to update my system.

To be honest, my connection go down after 30-40 min, but for the moment it's sufficient.

How could I solve all my problem?

Well, I don't know. Simply, I remove ppp and wvdial and reinstall them. Then, magically, everything work!

[Maybe, I change some options about ppp when I was trying to set up my connection without wvdial, and these settings are in conflict with wvdial. When I reinstall all, these conflicts disappear].

Thanks to all for the support.

Offline

#11 2010-01-31 12:38:54

zero-giulio
Member
Registered: 2010-01-23
Posts: 70

Re: GPRS through Mobile Modem linked via USB

No! No! No!

Problem not resolved :-(

Today, connection doesn't work.

Yesterday:

starting pppd at (data di oggi)
pid of pppd: 1935
using interface ppp0
local ip address ...
remote ip address ...
primary dns address ...
secondary dns address ...

and everything worked.

Today, on the other hand, I'll find

starting pppd at (data di oggi)
pid of pppd: 1935

and then it stopped.

So, I stopped before using the ppp0 interface.

I changed nothing between yesterday and today. Why I can't connect to the internet?

:-(

Offline

Board footer

Powered by FluxBB