Page 1 of 7 123 ... LastLast
Results 1 to 10 of 61

Thread: Using a GSM Cellphone as a GPRS Modem

  1. #1
    Join Date
    Mar 2006
    Location
    Midlands, England, United Kingdom
    Beans
    205
    Distro
    Ubuntu 5.10

    Using a GSM Cellphone as a GPRS Modem

    HOWTO: Use a GSM mobile phone as a GPRS modem, with wvdial, under Ubuntu 5.10 Breezy Badger

    Why would anyone _want_ to use a mobile phone as a modem? Call costs are expensive, connections are unreliable, and data transfer speeds are slow. In these days of high-speed wireless connections, what's the point?

    Well, costs aren't necessarily that high. True, voice calls can be pretty pricey, but I'm talking about using the phone as a GPRS modem, not regular dial-up. This means that, instead of using the usual voice circuit, we will be using the "always on" GPRS connection.

    "Always on"?!! That's even worse!!

    No. Although the terminology is "always on", cellphone service providers tend to charge for GPRS traffic in one of two ways: 1. per KB of data transferred; or 2. a fixed rate regardless of how much traffic there actually is.

    I think I'd better explain a few points before we go on.

    GSM cellphone networks use a protocol called GPRS (General Packet Radio Service) for transmission of data. This is used, for instance, for photo messaging or WAP browsing, though it can also be used to make a regular internet connection.

    If you use your cellphone's GPRS service to make an internet connection, your phone service provider is also your internet service provider. You dial a special number that gives you access to their GPRS network, you use their domain name servers, etc.

    At this point, I think it's simplest for me to describe what I did to use my mobile phone as a modem.

    Before you can do anything, you will need a means to link your phone to your computer, and a copy of wvdial.

    To make the connection, if your phone and PC are suitably equipped, you may be able to use Bluetooth or infrared. But my phone, a lowly Nokia 3220, has neither of these. So I used a third-party's USB-Serial data cable, which I believe is a copy of Nokia's DKU-5 cable. Ubuntu identifies it as:

    Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

    Now, connect your phone to your PC, making sure that the phone is on "stand by" (ie not using its WAP browser or making a call). Then give the command

    sudo wvdialconf /etc/wvdial.conf

    and you should get output along the lines of this:

    t0p@lapt0p:~$ sudo wvdialconf
    Password:
    Usage: wvdialconf <configfile-name>
    (create/update a wvdial.conf file automatically)
    t0p@lapt0p:~$ sudo wvdialconf /etc/wvdial.conf
    Scanning your serial ports for a modem.

    Port Scan<*1>: Scanning ttyLTM0 first, /dev/modem is a link to it.
    ttyLTM0<*1>: ATQ0 V1 E1 -- OK
    ttyLTM0<*1>: ATQ0 V1 E1 Z -- OK
    ttyLTM0<*1>: ATQ0 V1 E1 S0=0 -- OK
    ttyLTM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyLTM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyLTM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    ttyLTM0<*1>: Modem Identifier: ATI -- LT V.92 Data+Fax Modem Version 8.31
    ttyLTM0<*1>: Speed 4800: AT -- OK
    ttyLTM0<*1>: Speed 9600: AT -- OK
    ttyLTM0<*1>: Speed 19200: AT -- OK
    ttyLTM0<*1>: Speed 38400: AT -- OK
    ttyLTM0<*1>: Speed 57600: AT -- OK
    ttyLTM0<*1>: Speed 115200: AT -- OK
    ttyLTM0<*1>: Max speed is 115200; that should be safe.
    ttyLTM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    Port Scan<*1>: S1 S2 S3 S4 S5 S6 S7 S8
    Port Scan<*1>: S9 S10 S11 S12 S13 S14 S15 S16
    Port Scan<*1>: S17 S18 S19 S20 S21 S22 S23 S24
    Port Scan<*1>: S25 S26 S27 S28 S29 S30 S31 S32
    Port Scan<*1>: S33 S34 S35 S36 S37 S38 S39 S40
    Port Scan<*1>: S41 S42 S43 S44 S45 S46 S47 S48
    Port Scan<*1>: S49 S50 S51 S52 S53
    WvModem<*1>: Cannot get information for serial port.
    ttyUSB0<*1>: ATQ0 V1 E1 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
    ttyUSB0<*1>: Modem Identifier: ATI -- Nokia
    ttyUSB0<*1>: Speed 4800: AT -- OK
    ttyUSB0<*1>: Speed 9600: AT -- OK
    ttyUSB0<*1>: Speed 19200: AT -- OK
    ttyUSB0<*1>: Speed 38400: AT -- OK
    ttyUSB0<*1>: Speed 57600: AT -- OK
    ttyUSB0<*1>: Speed 115200: AT -- OK
    ttyUSB0<*1>: Speed 230400: AT -- OK
    ttyUSB0<*1>: Speed 460800: AT -- ~\uffff
    ttyUSB0<*1>: Speed 460800: AT -- [06]\uffff
    ttyUSB0<*1>: Speed 460800: AT -- ~\uffff
    ttyUSB0<*1>: Max speed is 230400; that should be safe.
    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

    Found a modem on /dev/ttyLTM0, using link /dev/modem in config.
    Modem configuration written to /etc/wvdial.conf.
    ttyLTM0<Info>: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
    ttyUSB0<Info>: Speed 230400; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
    t0p@lapt0p:~$

    Looking at this output, we can see wvdial found 2 modems: /dev/ttyLTM0 (also known as /dev/modem) and /dev/ttyUSB0. How do we know which (if either) is the phone? By the line:

    ttyUSB0<*1>: Modem Identifier: ATI -- Nokia

    Wvdial dumps its info to the file /etc/wvdial.conf. If we have a look at that fkile it says:

    [Dialer Defaults]
    Modem = /dev/modem
    Baud = 115200
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ISDN = 0
    Modem Type = Analog Modem
    ; Phone = <Target Phone Number>
    ; Username = <Your Login Name>
    ; Password = <Your Password>

    Hmm. Not much good to us, seeing as it's referring to /dev/ttyLTM0, which is my laptop's built-in Lucent winmodem. But wvdial will use this file when dialling out. So we need to edit it. Remember the last 2 lines of all that output from the wvdialconf command? Just kn case your photographic memory's playing up, here they are again:

    ttyLTM0<Info>: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
    ttyUSB0<Info>: Speed 230400; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

    You'll need to call your cell service provider and get some info from them, such as Username and Password. Then, by amalgamating what you learn from the wvdialconf input and what your friendly cellphone people tell you, you should be able to create an /etc/wvdial.conf file that looks similar to this:

    [Dialer Defaults]
    Modem = /dev/ttyUSB0
    Baud = 230400
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ISDN = 0
    Modem Type = Analog Modem
    Phone = *99#
    Username = A
    Password = B
    Stupid Mode = 1

    Your completed file is unlikely to be exactly the same as mine. For instance, for my mobile network (Orange UK) Username and Password are blank. But wvdial doesn't like that, you _must_ put something in there. Also, it will not connect unless you include that line

    Stupid Mode = 1

    As for that unusual phone number, *99# - that's what you need to make the GPRS connection. Different mobile networks, especially in other countries, will need different numbers. And another user of Orange UK (using a Sony Ericsson phone) reported having to use *99***4*. All I can suggest is: ask your network what to use. If it doesn't work, experiment.

    So, now you have a completed wvdial.conf file, and your phone is connected to your computer, all that's left is to try it. Open a console (Ctrl+Alt+F1) and type

    sudo wvdial

    With any luck, your output will resemble this:

    t0p@lapt0p:~$ sudo wvdial
    --> WvDial: Internet dialer version 1.54.0
    --> Cannot get information for serial port.
    --> Initializing modem.
    --> Sending: ATZ
    ATZ
    OK
    --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    OK
    --> Modem initialized.
    --> Sending: ATDT*99#
    --> Waiting for carrier.
    ATDT*99#
    CONNECT
    ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
    --> Carrier detected. Starting PPP immediately.
    --> Starting pppd at Wed Apr 26 23:11:44 2006
    --> pid of pppd: 11096
    --> Using interface ppp0
    --> local IP address 10.33.228.142
    --> remote IP address 10.6.6.6
    --> primary DNS address 193.35.133.10
    --> secondary DNS address 193.35.134.10

    Now, the output stops, and seems to "hang". But it's not doing nothing - it's holding the connection open and waiting for you to use it.

    To test it, change to another console (eg Ctrl+Alt+F2) and type

    ping -c1 80.84.72.25

    and if the connection's ok, you should get comething like this:

    t0p@lapt0p:~$ ping -c1 80.84.72.25
    PING 80.84.72.25 (80.84.72.25) 56(84) bytes of data.
    64 bytes from 80.84.72.25: icmp_seq=1 ttl=42 time=781 ms

    --- 80.84.72.25 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 781.703/781.703/781.703/0.000 ms
    t0p@lapt0p:~$

    So, now to do something _useful_ with this internet connection - like surfing the web. Swap to the graphical interface (Ctrl+Alt+F7), and launch Firefox (or whatever browser you have). If you're lucky, it's already configured for this... just type in the URL www.google.com, and it takes you there!

    Note: it very well be quite slow. But that's only to be expected. This isn't broadband, cable, not even 56K dialup. It's a cellular phone, dammit!

    Nevertheless, it's very useful. You can web-surf, use telnet and ssh. Downloading software probably isn't a very good idea as it's so slow. Plus a lot of cell plans charge per KB transferred, so you may need to watch your data usage. Then again, if like me you pay a fixed amount no matter how much data you transfer... go for it!!!

    When you've finished your session, return to the console where you initiated wvdial (Ctrl+Alt+F1 or whatever) and press Ctrl+C. That will break the connection/hang up.

    Well, I can't think of anything to add. If you want to ask me something - feel free!
    Current box: Viglen Genie, P3 800MHz, 128MB RAM, 20GB HDD. Dual booting Win2000 and Dapper

    Check out my blog at http://heretogo.wordpress.com

  2. #2
    Join Date
    Jun 2005
    Location
    South Africa
    Beans
    259
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Using a GSM Cellphone as a GPRS Modem

    Looks like a great guide, I will try and use it when I am on holliday in SA thanx

  3. #3
    Join Date
    Apr 2006
    Location
    Toronto, Canada
    Beans
    583
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Using a GSM Cellphone as a GPRS Modem

    gr8 guide dude.
    thanks

  4. #4
    Join Date
    Jan 2006
    Beans
    8

    Exclamation Re: Using a GSM Cellphone as a GPRS Modem

    OK great Guide. But that was NOKIA 3220. How do I connect my SAMSUNG SGH c-200 as modem for the DAPPER DRAKE??? I connect to internet using this phone and without any problems on my Windows XP system. I need the DAPPER DRAKE to do the same thing.

    SO overall I have two questions:
    1. How does ubuntu linux IDENTIFY a cable connected to it??? Ihad also tried to connect my mom's NOKIA 3220 but i did not get any prompt like windows XP which couls say of the device was identified or not. I know the rules are different for Linux but i need to know of UBUNTU is able to identify the deive. My phone is not a NOKIA 3220. It is a SAMSUNG SGH c200. Where do we get the info on what is connected to the system?? I mean to ask...how do I come to know if UBUNTU successfully identifies that something is connected to my USB ( exactly speakin com-5 port)?? I know my target phone number. I also have almost the same configuration as that seems to be of gr0kzer0. So I think I will be able to configure the rest but I am syuck in the first point:

    MAKING UBUNTU IDENTIFY MY DEVICE. HOW DO I COME TO KNOW THAT UBUNTU HAS IDENTIFIED THAT A DEVICE IS CONNECTED TO THE SYSTEM???

    the seond question is of course about configuring wvdial but then it can help only if I get the linux identify the USB connection.
    PLease help me.

    Vaibhav (*_*)
    Last edited by vaibhavkaushal123; August 19th, 2006 at 07:29 PM.

  5. #5
    Join Date
    Dec 2006
    Beans
    9
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Using a GSM Cellphone as a GPRS Modem

    Well across the pond in the States mobile phone data connections are actually faster than 56K dialup. My phone for example goes 230Kbps and an EVDO capable phone as fast as 700Kbps. I have unlimited usage for a few bucks a month. Not having to find a WiFi hotspot is well worth it.

    I don't know for other phones in the U.S., but for SprintPCS you put the number dialed #777 with the pound sign included.

    A couple QUESTIONS though. Will wvdial allow me to go 230Kbps? Or 700K if I upgrade my phone? Also my username and password are blank also, guess they authenticate by the cell phone you call from. Do I just put "A" for username and "B" for password for it to work?
    Also my phone is CDMA not GSM so I hope this works.

  6. #6
    Join Date
    Nov 2006
    Beans
    111
    Distro
    Ubuntu 6.10 Edgy

    Re: Using a GSM Cellphone as a GPRS Modem

    Hello , can you make Howto for edgy please ..
    Ubuntu 6.10 edgy user
    i love ubuntu.and i am learning it now.

  7. #7
    Join Date
    Mar 2006
    Location
    Midlands, England, United Kingdom
    Beans
    205
    Distro
    Ubuntu 5.10

    Re: Using a GSM Cellphone as a GPRS Modem

    Hi guys n gals. Sorry i havent been much help figuring how to use Wvdial with other set-ups. My discovery was down to trial n error, and as for doin it with other phones/networks, i got no clue at all. Eg, non-nokia 3220, non-orange uk? I'm sure some of you will get me right. And now _I_ need help: more network-specific info is an idea, i wana help good as can be. Help me? Plz? Or am i a waste?
    Current box: Viglen Genie, P3 800MHz, 128MB RAM, 20GB HDD. Dual booting Win2000 and Dapper

    Check out my blog at http://heretogo.wordpress.com

  8. #8
    Join Date
    Oct 2006
    Location
    A Konduru / Chennai
    Beans
    9
    Distro
    Ubuntu 6.10 Edgy

    Re: Using a GSM Cellphone as a GPRS Modem

    Thanx buddy,
    This work really fine.
    Good work, keet it up.

    I am using a Sony Ericsson K320i

  9. #9
    Join Date
    Nov 2006
    Beans
    9

    Re: Using a GSM Cellphone as a GPRS Modem

    hi, i'm using sony ericson phone, and i only have infrared connection. can you tell me how to do it?or link so that i can try..thx...

  10. #10
    Join Date
    Feb 2007
    Beans
    2

    Using a Fargo Maestro GSM Modem in Edgy

    wvdial can't automatically configure this modem, but i've managed to connect using the following wvdial.conf (for vodacom in South Africa - you might have to dial a different number, and you'll have to change the pin)

    Code:
    [Dialer Defaults]
    
    Phone = *99***1#
    #Phone = *99#
    Username = anything
    Password = anything
    Stupid Mode = 1
    Dial Command = ATDT
    
    [Dialer pin]
    
    Init1 = AT+CPIN=1234
    
    [Dialer gprs]
    Modem = /dev/ttyS0
    Baud = 115200
    Init2 = ATZ
    Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
    ISDN = 0
    Modem Type = Analog Modem
    then, connect with

    Code:
    sudo wvdial gprs
    --
    Melissa

Page 1 of 7 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •