PDA

View Full Version : [ubuntu] Mobile Modem functioning erratically.



sunnyengineeer
April 16th, 2010, 08:06 AM
Hello,
I've a Airtel cellular connection on my mobile which I use for connecting to Internet.
I've Ubuntu 8.10(Interpid) dual booting with Windows XP,the problem is this that sometimes Ubuntu connects to the internet while sometimes it doesn't!! Restarting sometimes solves the problem ,sometimes not...

Help me out of this problem..

dineshs
April 16th, 2010, 08:57 AM
How do you connect? gnome-ppp? Because there are different methods
http://www.ubuntugeek.com/setting-up-dial-up-connection-in-ubuntu.html
Also post the output for
cat /etc/resolv.conf

alexfish
April 16th, 2010, 09:20 AM
IF the modem connects but the Browser and updates etc fail to work


this can be coursed by the named servers Primary and Secondary not been returned


You could try setting the Ivp4 settings to Automatic (PPP) address only and enter the addresses of the servers NS1 And NS2 , this is OK if your provider uses the same servers all the time,
however some ISP use different servers at various times so you may not get connected, also sometimes the case where the NS1 and NS2 have been entered in the resolv.conf




You could also try Both of these methods below and see which gives the best result


Here I have change the IPCP configure-NAKs returned before starting , remove the # and set the number to 30 ( or any thing above the default value till there is a constant connection ) tip, try 30 then work down till you have a stable connection.

Code:

sudo gedit /etc/ppp/options

# Set the maximum number of IPCP configure-NAKs returned before starting
# to send configure-Rejects instead to <n> (default 10).
ipcp-max-failure 30

Hopefully I can now leave the NM IPv4 settings to Automatic (PPP) instead of Setting the NM to IPv4 settings to Automatic (PPP) address only and having to enter the numerical addresses in the DNS servers text box.

OR

Code:
sudo gedit /etc/ppp/options

Add this line and save:

replacedefaultroute

if this is done then replace the # in front of the

replace the # in front of the " ipcp-max-failure 30 " do not use both



there are a few modems which can be a problem which has nothing to do with the above , so if this fails lets me know how the modem connected is to the computer, and then we can look further


regards


alexfish

sunnyengineeer
April 16th, 2010, 02:14 PM
I connect from the Network Connections under the tab of Mobile Broadband.
So no Gnome-PPP I guess....(Im sorry I'm very new to Ubuntu..but very happy with its everything,so I have less knowledge abt it....)

Here is the output of the command
cat /etc/resolv.conf# Generated by NetworkManager
nameserver 202.56.230.5
nameserver 202.56.230.6

I'm using Airtel connection of my cell which I also uses as my mobile no.
Sometimes it connects,sometimes not....Restarting or changing its USB Port also sometimes makes the difference...
Is there a sureshot waythru which I can connect to Internet everytime,Like installing an Application or some sort of that thing,Like as we have Nokia PC Suite for Windows....

Thanks for the reply u made guys...
Ubuntu really rocks....While Windows only shakes......

dineshs
April 16th, 2010, 02:33 PM
I suggest you install gnome-ppp
When you are connected to internet run this command on terminal

sudo apt-get install gnome-ppp
Once installed you can launch it via applications-internet
click setup ,under modem tab click detect modem
then give username etc and proceed

sunnyengineeer
April 16th, 2010, 05:37 PM
Hi,

Thanks for quick reply.
I've installed GnomePP .But I'm a little confused over its settings.
I've following doubts..
1.)I don't have a username & password...
2.)Modem type?
3.)Phone numbers.
4.)Init strings.
5.)Dial prefix.

In Networking...

Which IP address to select..& what value to put.

Thanks.

sunnyengineeer
April 17th, 2010, 05:28 AM
Please help me out of this...
I am taking the help of Windows XP to post my replies here....Sounding good for Gates...Please help me to displease him...

Thanks

dineshs
April 17th, 2010, 06:02 AM
Hi,

Thanks for quick reply.
I've installed GnomePP .But I'm a little confused over its settings.
I've following doubts..
1.)I don't have a username & password...
2.)Modem type?
3.)Phone numbers.
4.)Init strings.
5.)Dial prefix.

In Networking...

Which IP address to select..& what value to put.

Thanks.
Your service provider (Airtel)will give you the username,password ,init strings and tel no (Or you can google)
Regarding modem type,If you click detect modem it will find automatically
Dial prefix not required
Init strings be default

dineshs
April 17th, 2010, 06:13 AM
Pl refer this
http://platonic.techfiz.info/2009/02/25/motoming-a1200-connecting-to-airtel-gprs-on-ubuntu/

pdc
April 17th, 2010, 06:51 AM
Hi sunnyengineer;

Dinesh is very knowledgable on these things; and I note his last post

http://platonic.techfiz.info/2009/02/25/motoming-a1200-connecting-to-airtel-gprs-on-ubuntu/

is very helpful and it uses wvdial;

I suspect you installed that when you installed gnome-ppp and I can only suggest copying and pasting the wvdial in the above post

(using wvdial as I suggest below would save you configuring gnome-ppp ..........)

so to configure wvdial ..............


sudo gedit /etc/wvdial.conf

that should open a blank page

paste in


[Dialer Defaults]
Init1 = ATZ
Init2 = AT&FE0V1&C1S0=0
Init3 = AT+CGDCONT=1,”IP”,”airtelgprs.com”
Modem Type = USB Modem
ISDN = 0
Phone = *99***2#
New PPPD = yes
Modem = /dev/ttyACM0
Username = airtel
Password = airtel
Baud = 460800
Idle Seconds = 3000
Auto DNS = 1
Stupid Mode = 1
Dial Command = ATD
Ask Password = 0
FlowControl = NOFLOW

save and close

now run this command


dmesg | grep tty

that is to look and see what your system is recognising your modem as

if it says


ttyACM0

as you can see is entered in the above /etc/wvdial.conf file,

you can try


sudo wvdial

and see if it connects;

if you get a different value in the tty printout, you will need to edit the wvdial.conf by


sudo gedit /etc/wvdial.conf

and then changing the value of ttyACM0 to whatever your system tells you it was recognising the modem as ...

...... is this of help?

sunnyengineeer
April 17th, 2010, 12:51 PM
Hi,

I contacted them,they were not knowing these values,though I found usename & password from net,but couldn't find the Phone no.
They were only singing one song,we know only of Windows XP, use default values...
When I don't have any value in those field how to use default?

I tried using wvconf,it is not working it is giving me the following o/p:-

Internet dialer version 1.60

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ

OK

--> Sending: AT&FE0V1&C1S0=0

AT&FE0V1&C1S0=0

OK

--> Sending: AT+CGDCONT=1,”IP”,”airtelgprs.com”

ERROR

--> Bad init string.

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ

OK

--> Sending: AT&FE0V1&C1S0=0

AT&FE0V1&C1S0=0

OK

--> Sending: AT+CGDCONT=1,”IP”,”airtelgprs.com”

ERROR

--> Bad init string.

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: ATZ

OK

--> Sending: AT&FE0V1&C1S0=0

AT&FE0V1&C1S0=0

OK

--> Sending: AT+CGDCONT=1,”IP”,”airtelgprs.com”

ERROR

--> Bad init string.

I think Im having problem in "init string".May be Im wrong,correct me if Im.
Thanks Guys.

alexfish
April 17th, 2010, 01:20 PM
hi

wvdial will self configure if the modem is detected

to setup enter these commands from the terminal

Code:

sudo su


Code:


wvdialconf /etc/wvdial.conf

this hopefully will detect your modem and other info and set up basic info in the /etc/wvdial.conf file


then
Code:


gedit /etc/wvdial.conf



the number has to be correct for 3g connection It can be *99# or (*99***1# ) or other see below
the default is the *99# and the *99***X# is where a connection node is required ( CID (connection ID) associated which identifies which one is to be used) check with your ISP or documentation

for cdma #777


then if user name and pass words are required enter those as well some times they are not required , if no re comment the lines


test without adding other configs first



Code:


wvdial


sometimes it helps to delete the contents of the .conf file before running the cofiguration
although keep a copy of your existing configs



regards

alexfish

pdc
April 17th, 2010, 11:35 PM
please tell us what you get with


dmesg | grep tty

sunnyengineeer
April 18th, 2010, 04:44 AM
Hi,
I'm getting this with the command
dmesg | grep tty
[ 0.004000] console [tty0] enabled
[ 1.923423] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.924133] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 288.088481] cdc_acm 1-4:1.1: ttyACM0: USB ACM device

Thanks

pdc
April 18th, 2010, 07:27 AM
well you get


ttyACM0: USB ACM device

and that agrees with the ttyUSB0 in the wvdial script

Alex is suggesting setting up the /etc/wvdial.conf script again

.. so ..


sudo gedit /etc/wvdial.conf

delete the text and save and close


sudo wvdialconf /etc/wvdial.conf

and your system should set up a new /etc/wvdial.conf script ..

then


gedit /etc/wvdial.conf so that is read only and copy and paste the text back here

then close the file

then


sudo wvdial

and see if you get any joy on connecting ...........

dineshs
April 18th, 2010, 09:17 AM
I think you need to concentrate on init strings.So edit wvdialconf (trial and error):)
This site
http://jainbasil.wordpress.com/2008/09/18/connecting-airtel-gprs-in-ubuntu-804/
gives a different value

[Dialer Defaults]
Init1 = AT+CGDCONT=1, “IP”,”airtelgprs.com”,”",0,0
Init2 = ATQ0V1E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = Yes
Modem = /dev/ttyACM0
Isdn = 0
Phone = *99***1#
Password = xxx
Username = xxx

pdc
April 18th, 2010, 10:00 PM
I agree entirely with Dinesh that the answer should lie in getting a working wvdial script;

my post suggested following alexfish's advice to you to let wvdial do its own configuration and see what it came up with:

Dinesh suggests this new file he has found; that worked for the poster on airtel; sounds very reasonable to copy and paste that in if the wvdial programme does not configure its own version for you that works;

I will be away for a couple of days, so these two very capable guys, alex and Dinesh will help you I am sure to get things going; you're nearly there!

sunnyengineeer
April 19th, 2010, 06:45 AM
Hello,
I've got the solution..
My Data Cable is functioning erratically not the Mobile...
So I've decided to use Net via Bluetooth...

Dinesh,THanks so much for helping me...
One more help if you could..
Im planning to purchase a Bluetooth for PC,for Net connecting..
So if someone oculd guide me how to connect to Net using Bluetooth in Ubuntu 8.10 & Nokia 2730 Classic...

What are the softwares that I've to install...

Thanks...

dineshs
April 19th, 2010, 07:05 AM
I searched google for 'connecting net via bluetooth ubuntu' and got this
http://news.softpedia.com/news/Connect-to-the-Internet-from-Anywhere-Using-a-GPRS-Connection-50670.shtml
You can depend on google for any doubt.

sunnyengineeer
April 20th, 2010, 03:42 AM
Hello,
Sry guys agian Im troubling you...
Actually Im in trouble..Its hot outside in India quite a lot..so I can tgo out for Net@ cyber cafe...and @ home my net is not functioning properly.& I have to apply to colleges for my Masters now itself..
Yesterday I purchashed abluetooth..but the speed that I got with it was very slow..

SO I'm reverting back to USB..
My problem is this ,that in the network ican it doesn't shows any connection...
But when I type" lsusb" I get Nokia phone addresses..

& If I try to connect using wvdial it gives me:-

Input/Output error

Why this is happening...
This is not happening with Windows...

Please guys help me out....
It shows in lsusb...
But not gets connected...

Anyway that I can connect.....



Thanks

dineshs
April 20th, 2010, 05:05 AM
pl do what pdc suggested in #15
That is

sudo gedit /etc/wvdial.conf
Delete the contents of the file(make it blank),then save and close
Now run

sudo wvdialconf /etc/wvdial.conf
This will create new contents in /etc/wvdial.conf
Post the contents using

cat /etc/wvdial.conf

navdeep86
May 2nd, 2010, 05:15 PM
thanks to all of you guys for quick reply.... i'll try all of them if work then i'll tell u....

mpolito1969
May 2nd, 2010, 08:14 PM
I had the same problem and realized there was a bug in modem-manager (I opened this: https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/506620).

Ubuntu 10.4 should have solved the problem but today, after installing it, I realized my problem got far worse than before.

More information here:

http://ubuntuforums.org/showthread.php?t=1469486

If you find a solution please let me know.

Ciao,
Max