now i have used
pppconfig for gprs connection on ubuntu. earlier on Xubuntu i was able to connect by following method:
Step 1: Plug the data cable into your mobile phone and into your computer. Then see whether it was recognised by the kernel.
Should result in something like the following output:
Code:
localhost kernel: [4295346.417000] usb 1-1: new full speed USB device using ohci_hcd and address3
localhost kernel: [4295348.125000] cdc_acm 1-1:1.8: ttyACM0: USB ACM device
localhost kernel: [4295348.133000] usbcore: registered new driver cdc_acm
localhost kernel: [4295348.133000] drivers/usb/class/cdc-acm.c: v0.23:USB Abstract Control Model driver for USB modems and ISDN adapters
According to this output, the kernel driver being used is cdc-acm (you don't need to know that, but it may be useful for other applications). We can deduce from the second line that linux can see the device at /dev/ttyACM0 - this you will need to know.
Step 2: Configure Ubuntu to be able to communicate with your phone and use it to connect to the Internet.
Install ppp (handles modems and dialing) if it's not installed already:
You will need to create a configuration file that tells Ubuntu how to handle communication with the phone. If you prefer using a graphical text editor, replace "vi" in this and the following steps with "gedit". The files should be empty to start with.
Code:
sudo vi /etc/ppp/peers/mobile
Enter the following text:
Code:
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/mobile"
usepeerdns
/dev/ttyACM0 115200
defaultroute
crtscts
lcp-echo-failure 0
If the /var/log/messages output above showed something other than ttyACM0, substitute that in the above code.
Ubuntu will need to send some commands to your phone to tell it to connect to the Internet. These commands are stored in a chat script, and are sent when you try to connect.
Code:
sudo vi /etc/chatscripts/mobile
Enter the following text:
Code:
TIMEOUT 35
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
OK 'AT+CGDCONT=1,"IP","airtelgprs.com"'
OK ATD*99***1#
CONNECT ""
You also need to be registered to use the modem connection. You are probably registered already, but this should take care of it if you're not (using your Ubuntu login name):
sudo adduser your-username-here dialout
If you can connect to the Internet on your phone (without your computer), the configuration scripts above should work. If not, look around in the links given below and see whether you can resolve the problem. The most likely points of failure are the 'AT+CGDCONT=1,"IP","INTERNET"' and ATD*99***1# sections.
Specifically where I have set "INTERNET" above, may well be different in your case. This is the Access Point Name (APN). It can (probably) be found in your phone's settings - I can get to it through the following path on my phone: Menu > Tools > Settings > Connection > Access Points. From there choose the access point you use to connect to the Internet (most probably the first one on the list). One of the settings there is "Access point name". Substitute what it says there where I have put "INTERNET" above.
Step 3: You should now be ready to connect. To dial, use the "pon" command, to disconnect, use the "poff" command and for log, use "plog" command.
Code:
pon mobile
poff mobile
plog mobile
---------------------------------------------------------------------------------------------------
on ubuntu this doesnt work it says
Code:
:~$ plog mobile
tail: cannot open `mobile' for reading: No such file or directory
Nov 30 07:25:13 lenovo chat[16198]: timeout set to 35 seconds
Nov 30 07:25:13 lenovo chat[16198]: abort on (\nBUSY\r)
Nov 30 07:25:13 lenovo chat[16198]: expect (^M)
Nov 30 07:25:48 lenovo chat[16198]: alarm
Nov 30 07:25:48 lenovo chat[16198]: Failed
Nov 30 07:25:48 lenovo pppd[16196]: Connect script failed
Nov 30 07:25:49 lenovo pppd[16196]: Exit.
anyway i am able to connect through
pppconfig