Motorola Development Community

Member Login

Quick Search



A1200 General Chat Motorola A1200 is one of Motorola's most popular EZX phone with a clear transparent flip and 2 megapixel camera.


Reply
  #1  
Old 05-06-2009
MeanEYE's Avatar
MotoFans MODR
 
Join Date: Jun 2008
Posts: 124
Thanks: 4
Thanked 5 Times in 3 Posts
Default Using Motorola A1200 as internet gateway using GPRS on Ubuntu 9.04 (8.10)

This tutorial will explain, step by step, how to configure your Ubuntu 9.04 (should work with 8.10) to use your phones GPRS connection as gateway. This tutorial explains only how to use your phone connected with USB cable.

Make sure you have access to GPRS and your phone is capable of connecting to internet and browsing. If you are A1200 user there's a patch to enable EDGE so you can gain some extra speed.

Ok, lets start...

1. First we need to find IP address of service providers GPRS server.

1.1 Put your phone in USB Lan mode and connect it to your computer. Since motorola does not have DNS installed you will need to set IP address manually. In most cases phone was connected with 192.168.1.2 so I have set mine to 192.168.1.1

Before setting your IP address I suggest checking the existing one. Open your terminal and type:
Code:
ifconfig -a
Among other things you should have usb0 listed
Code:
usb0      Link encap:Ethernet  HWaddr 3e:0f:c4:8e:29:4b  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3c0f:c4ff:fe8e:294b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1494  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:32 (32.0 B)  TX bytes:8135 (8.1 KB)
As you can see in my case address is already set. If you dont have IP address set for usb0 you can set it by typing:
Code:
ifconfig usb0 down
ifconfig usb0 192.168.1.1 netmask 255.255.255.0 up
First line will bring interface down (if it's not already) and the second one, well, will set IP address and try to bring it up.

1.2 Once your phone is in USB Lan mode and successfuly connected to your computer go to (on your phone) Main Menu -> Setup -> Data network and activate your GPRS connection.

1.3 Connect to your phone by typing:
Code:
telnet 192.168.1.2
After that you should be prompted for username
Code:
Trying 192.168.1.2...
Connected to 192.168.1.2.
Escape character is '^]'.

MontaVista(R) Linux(R) Consumer Electronics Edition 3.1
Linux/armv5tel 2.4.20_mvlcee31-mainstone_pxa27x


(none) login:
Type in root and system should let you in without asking for password. You will get message saying "/root" can not be found. Don't worry it's ok, system was never meant to be used by root. Whole thing should look like this
Code:
(none) login: root


MontaVista(R) Linux(R) Consumer Electronics Edition 3.1

No directory /root!
Logging in with home = "/".
#
1.4 Now when we are logged in issue ifconfig (on your phone) again. Notice there is no -a flag this time. This flag tells ifconfig to display all interfaces regardless of their state (up/down). This time we want ifconfig to show only active interfaces.
Code:
ifconfig
After hitting enter you should be presented with all the interfaces on your phone. In results you will find interface named gprsv0
Code:
gprsv0    Link encap:Point-to-Point Protocol  
          inet addr:172.17.253.196  P-t-P:10.112.112.112  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:50 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
Notice the IP address 172.17.253.196. That is THE address we are looking for. Write it down somewhere or copy/paste it.

1.5 Logout from your phone using exit command. (not necessary but we are just being polite )

1.6 Disconnect from GPRS network on your phone. This is important because if you don't dialer will later report that line is busy.



2. We are going to tell pppd to use IP address we found earlier.

2.1 Open /etc/ppp/options file by executing
Code:
gksu gedit /etc/ppp/options
from your terminal or run command dialog. In case you dont have/use gEdit you can change that part to your favourite editor. Please note that gksu command is same as sudo for terminal. Meaning if you want to edit file using console based editor (vi, nano, vim) you need to use sudo for other Gnome based applications use gksu.

2.2 Once file is opened scroll to its end and add following lines
Code:
novj
:172.17.253.196
Instead IP address I wrote, use one you found earlier.

2.3 Save file and close editor



3. Now we are going to create wvdial.conf file for wvdial in order to initialise our phone.

3.1 Before modifying anything you need to set your phone back to Modem mode. You can do this by going (on your phone) to Main Menu -> Setup -> USB mode

3.2 Create wvdial.conf file by executing
Code:
sudo touch /etc/wvdial.conf
3.3 Open file for editing
Code:
gksu gedit /etc/wvdial.conf
3.4 Paste the folowing lines
Code:
[Dialer Defaults]
Init1 = ATZ
Init2 = AT&FE0V1&C1S0=0
Init3 = AT+cgdcont=1,"IP","apn_name","",0,0
Modem Type = USB Modem
ISDN = 0
Phone = *99***2#
New PPPD = yes
Modem = /dev/ttyACM0
Username = apn_user
Password = apn_pass
Baud = 460800
Idle Seconds = 3000
Auto DNS = 1
Stupid Mode = 1
Dial Command = ATD
Ask Password = 0
FlowControl = NOFLOW
Before saving change apn_name and apn_user to settings from your GPRS connection. Since Ask Password = 0 you dont have to change apn_pass. In case you don't know how to find these settings go to Main Menu -> Setup -> Data network and edit your GPRS connection. There you will find apn_name and apn_user.

3.5 Save the file and close your editor.

Ok, this should be it as far as configuration goes. Now it's time to test your connection. Again, make sure you are disconnected from your GPRS connection on your phone.

Now, to connect type
Code:
sudo wvdial
This is the line you will need to type everytime you want to connect using your phone. Sadly I was unable to make it work through network manager but hey, better something than nothing. Anyway result should be something like this
Code:
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
ATQ0
OK
--> Re-Sending: ATZ
ATZ
OK
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT&FE0V1&C1S0=0
AT&FE0V1&C1S0=0
OK
--> Sending: AT+cgdcont=1,"IP","internet","",0,0
OK
--> Modem initialized.
--> Idle Seconds = 3000, disabling automatic reconnect.
--> Sending: ATD*99***2#
--> Waiting for carrier.
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed May  6 20:53:46 2009
--> Pid of pppd: 11794
--> Using interface ppp0
--> pppd: [10]�! 
--> pppd: [10]�! 
--> pppd: [10]�! 
--> pppd: [10]�! 
--> pppd: [10]�! 
--> local  IP address 172.17.32.205
--> pppd: [10]�! 
--> remote IP address 172.17.253.196
--> pppd: [10]�! 
--> primary   DNS address 217.65.192.1
--> pppd: [10]�! 
--> secondary DNS address 217.65.192.52
--> pppd: [10]�!
Once you see local IP address xxx.xxx.xxx.xxx it means you are connected. If you get dialer error 16, don't worry try few more times. For me it took few times for everything to work correctly. Network might be slow and at first it might look like it's not working (at least that's my expirience) but after few seconds everything started working like it should.

IMPORTANT: Closing terminal window or pressing CTRL+C in that window (where you typed sudo wvdial) will disconect you...

Hope this helped someone!

Edit: Recently I've found out that not all firmwares support or have telnet server started. I'll try to find a different way of finding IP...

Last edited by MeanEYE; 05-15-2009 at 06:30 PM. Reason: Aditional info about telnet abilities on some firmwares...
Reply With Quote
  #2  
Old 05-06-2009
swifty's Avatar
mostly harmless
 
Join Date: Jul 2005
Location: Franconia
Posts: 4,768
Thanks: 78
Thanked 197 Times in 173 Posts
Default

nice guide!

Last edited by swifty; 05-08-2009 at 08:41 PM.
Reply With Quote
  #3  
Old 05-15-2009
etherea's Avatar
MotoFans MODR
 
Join Date: Aug 2007
Location: Switzerland
Posts: 155
Thanks: 37
Thanked 11 Times in 8 Posts
Default

Really exhaustive, thanks!
Will have a try on Kubuntu and Sabayon (latest release).
__________________

< ethics only exists in the eyes of the beholder >

Reply With Quote
  #4  
Old 05-25-2009
xyepblra's Avatar
MotoFans JUNR
 
Join Date: Dec 2005
Location: Russia, Novosibirsk
Posts: 94
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via ICQ to xyepblra Send a message via MSN to xyepblra Send a message via Skype™ to xyepblra
Default

Guys, can you help setting the same thing for e680i? With Bluetooth maybe?
Will be greatly appreciated.
__________________
e680 -> e680i -> e680g
Alienware phone theme fan.
Reply With Quote
  #5  
Old 05-25-2009
MeanEYE's Avatar
MotoFans MODR
 
Join Date: Jun 2008
Posts: 124
Thanks: 4
Thanked 5 Times in 3 Posts
Default

Quote:
Originally Posted by xyepblra View Post
Guys, can you help setting the same thing for e680i? With Bluetooth maybe?
Will be greatly appreciated.
As far as I know there are number of threads here that deal with that matter. To be honest, I've never used e680...

Try this thread... It deals with SuSE linux and e680...

Last edited by MeanEYE; 05-25-2009 at 08:15 AM.
Reply With Quote
  #6  
Old 06-11-2009
MotoFans JUNR
 
Join Date: Jun 2008
Posts: 36
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Ir wont work for hardy on ubuntu 8.04? just those 2 versions
Reply With Quote
  #7  
Old 06-11-2009
MeanEYE's Avatar
MotoFans MODR
 
Join Date: Jun 2008
Posts: 124
Thanks: 4
Thanked 5 Times in 3 Posts
Default

Quote:
Originally Posted by baller005 View Post
Ir wont work for hardy on ubuntu 8.04? just those 2 versions
I tried only on 9.04, and I know for sure 8.10 has drivers for one. But I don't thing previous versions had any drivers. You might try (if you didn't already)...
Reply With Quote
  #8  
Old 09-18-2009
MotoFans NWBE
 
Join Date: Sep 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much for this...makes me like the phone so much more. FYI it's working for me on Linux Mint 7...I changed the "*9***2#" to "*9***1#" because that's what is usually used with AT&T...don't know if it makes any difference. It also connects for me even with my GPRS connected on my phone...

Thanks again,

MJ
Reply With Quote
  #9  
Old 09-19-2009
MotoFans MODR
 
Join Date: Sep 2008
Location: kolkata
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jackalex
Default

will this techniq work on windows..as i'm using e6...can anybody help on this issue...
__________________
Alexander
Reply With Quote
  #10  
Old 09-19-2009
Halftux's Avatar
EZX Parser
 
Join Date: Sep 2007
Location: Germany
Posts: 358
Thanks: 28
Thanked 81 Times in 52 Posts
Default

Quote:
Originally Posted by jackalex View Post
will this techniq work on windows..as i'm using e6...can anybody help on this issue...
Yes it works have a look here:
HowTo: Use the Motorola Ming A1200 as a USB Modem
__________________
-------------------------------------
In any apple is a worm. Through each window flies a bug.
That's why I take Linux, because what does not fly can not crash.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet over Motorola A1200 on Ubuntu 8.10 MeanEYE A1200 General Chat 12 05-06-2009 06:06 PM
Help With Internet on Mint 6 And Ubuntu 8.10 jetboss Linux 4 03-01-2009 01:42 AM
setting up motorokr E6 for Airtel GPRS using data cable in Ubuntu 8.04 rockinwdrockr E6 General Chat 5 09-13-2008 01:24 PM
Q: How can I use Ming as GPRS Modem in Ubuntu (Linux) sina_saeedi82 A1200 General Chat 3 03-03-2008 05:20 PM
Q: PC internet access thru A1200 with GPRS (AIRTEL) Kranthi518 A1200 General Chat 4 10-20-2007 05:31 PM

 
Advertisement

Partner Links





Web Analytics