Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    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...

  2. #2
    Join Date
    Jul 2005
    Location
    Franconia
    Posts
    4,866

    Default

    nice guide!
    Last edited by swifty; 05-08-2009 at 08:41 PM.

  3. #3
    Join Date
    Aug 2007
    Location
    Switzerland
    Posts
    183

    Default

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

    < ethics only exists in the eyes of the beholder >


  4. #4
    Join Date
    Dec 2005
    Location
    Russia, Novosibirsk
    Posts
    94

    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.

  5. #5

    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.

  6. #6

    Default

    Ir wont work for hardy on ubuntu 8.04? just those 2 versions

  7. #7

    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)...

  8. 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

  9. #9

    Default

    will this techniq work on windows..as i'm using e6...can anybody help on this issue...

  10. #10
    Join Date
    Sep 2007
    Location
    Germany
    Posts
    436

    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:
    http://www.motorolafans.com/forums/a...tml#post211585
    -------------------------------------
    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 to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Internet over Motorola A1200 on Ubuntu 8.10
    By MeanEYE in forum A1200 General Chat
    Replies: 13
    Last Post: 04-25-2010, 04:04 AM
  2. Replies: 4
    Last Post: 03-01-2009, 02:42 AM
  3. Replies: 5
    Last Post: 09-13-2008, 01:24 PM
  4. Q: How can I use Ming as GPRS Modem in Ubuntu (Linux)
    By sina_saeedi82 in forum A1200 General Chat
    Replies: 3
    Last Post: 03-03-2008, 06:20 PM
  5. Q: PC internet access thru A1200 with GPRS (AIRTEL)
    By Kranthi518 in forum A1200 General Chat
    Replies: 4
    Last Post: 10-20-2007, 05:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Optimization by vBSEO 3.6.0 RC 1