How can I use my cell phone to establish a dial-up networking connection?

12,855

Cell phones sometimes expose their data connection as an old AT-style modem. I'd say on older cell phones this is going to work closer to how you'd expect, i.e. you put the phone into modem mode, you either connect A) an actual serial cable (or a proprietary cable that exposes the UART pins on the phone), B) a USB cable that's functioning as a COM port, or C) a Bluetooth virtual COM port, and use it just as you would a normal external serial modem.

So the AT conversation you are having, which is not working, is the AT command interface bolted on to the cell phones data connection. Presence of an AT command interface does not automatically mean you are talking to a device that does analog-style modulation/demodulation. Many phones used to do this. With most Android phones now supporting RNDIS/USB over Ethernet it's not very necessary anymore and I'm not sure if many do or the current state of this.

As an aside, I think there are extensions to the AT command set to specifically support cell phones sharing data via this interface, and even to support things like SMS.

No cellphone does the analog-style modulation/demodulation that an analog modem does natively that I've ever heard of. You might be able to get softmodem or similar working on an Android device if you cross-compile it for ARM, but I don't know if there is any application like that for Blackberry; I highly doubt one exists.

Share:
12,855
G-Wiz
Author by

G-Wiz

I enjoy creatively using information technology, exploring art, and learning from others. I believe challenges provide the greatest opportunities for growth. I strive to be a good listener, build useful things for society, and support social equality. Previously, I worked as a developer here at Stack Overflow. I also created Blocvox, a community opinion site and architected and instructed full-stack .NET and Node.js cohorts at Sabio coding bootcamp. Currently, I'm co-founding and CTO'ing Reasi, a blockchain-powered real estate startup.

Updated on September 18, 2022

Comments

  • G-Wiz
    G-Wiz almost 2 years

    I am using Windows 7 and have a BlackBerry with T-Mobile (U.S.). I have paired the phone with my computer over Bluetooth, which automatically creates a serial port for it. I am able to open the port in PuTTY and successfully issue AT commands to the modem, including dialing. However, while using Windows to create and establish a Dial-Up Networking connection, I get an error dialog stating "Error 678. The remote computer did not respond."

    In my testing, I also tried setting up a connection to dial a number connected to a phone. When attempting to connect over this connection, the phone does ring but the very moment I answer the call, my computer displays the above error dialog.

    What must be done to successfully establish such a PPP connection? Some special AT initialization string perhaps?

    To clarify, I'm not referring to the well-described and popular technique known as "tethering," in which the remote host of the data link is the mobile service provider. I am interested specifically in establishing direct data links with remote hosts other than my mobile service provider. Think old-school landline connection to your friend's computer or BBS.

    Edit 1 As grawity pointed out in comments, the missing piece of the puzzle is the actual modulator that is compatible with v-series protocols, which I expected to be built into the cellphone. So far the best only software alternative I could find is this experimental project.

    Edit 2 Found this forum discussion today. The participants state that there is no old-school modem in the BlackBerry.

    Edit 3 When I place a call in PuTTY with ATD, immediately after the call is answered (and the callee is initiating the handshake) the cellphone returns OK. This is not the expected behavior for establishing a data connection. The phone should reciprocate the handshake, and upon success return CONNECT. (Alternatively it should return BUSY or NO CARRIER, but never simply OK.) Windows DUN must be interpreting this as the "Error 678" I was seeing.

    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 12 years
      If you use ATDT to dial the number does it connect and stay connected? Also have you checked with your carrier to ensure they haven't disable tethering or "Phone as Modem", and/or that you have access to use it?
    • user1686
      user1686 over 12 years
      Wait, are you trying to answer a data call with a voice phone? That's just not going to work, unless you can sing the V.22 handshake.
    • G-Wiz
      G-Wiz over 12 years
      @techie007, if i use ATD it connects and stays connected. I am already able to do normal tethering, but I want to dial-up to a server that is not connected to the internet.
    • G-Wiz
      G-Wiz over 12 years
      @grawity, ah... that must be the missing piece of the puzzle. yes, i believe that is what i'm trying to do. i was hoping the phone used v.22 to create it's link with the carrier's internet gateway when tethering, and i could simply drop in my dial-up server's phone number and credentials. is this simply impossible? assuming i can connect my audio in/out jacks to the phone's jack with an adapter, are you aware of any network interface software that can emulate a modem?
    • Daniel R Hicks
      Daniel R Hicks over 12 years
      It's not clear what you're trying to do. At least some phones (those that maintain compatibility with old network protocols) have built-in modems that respond to AT commands. If you have one of these you should be able to connect to a modem elsewhere in the phone network. If your phone was responding to AT commands with "OK" over the serial link then one would presume it's got the capability. But connecting your audio jacks to the phone is not likely to do it. (Why would you even want to try that if you've got the serial link?)
    • G-Wiz
      G-Wiz over 12 years
      @DanH, I'm trying to establish a PPP link over my cellphone to a remote modem, using Windows Dial-Up Networking. When I use PuTTY to issue ATD<remote modem phone number>, the call is placed and I am able to hear the remote modem initiating the handshake, but my cell phone is not responding. And when I tell the cellphone to dial myself, issuing ATD<my office phone>, I can confirm that my cellphone is not initiating any audible handshake. There's only silence. Is there an AT command I must issue to turn this on?
    • Daniel R Hicks
      Daniel R Hicks over 12 years
      Generally the callee is responsible for initiating the handshake, but I believe there are variations of the protocol that work the opposite way, purportedly to keep people from random dialing to find modems. To talk to these I think you put an "R" after the dial command., (One thing you might want to try is to issue the I0 through I9 "info" commands to see how/if the phone responds with its ID info.)
    • G-Wiz
      G-Wiz over 12 years
      Doesn't help. The callee is initiating the handshake. But my cellphone is not responding to it. The ATD<number> command returns with OK immediately when the call is answered. It's supposed to complete the handshake and then return CONNECT.
    • pspahn
      pspahn over 10 years
      I have been curious about this for a few weeks now. Great question.
  • G-Wiz
    G-Wiz over 12 years
    thanks for the info. as grawity pointed out in comments, the problem is a lack of v.22/v.92-compatible signal modulation in the phone or computer. in other words, a modem = phoneline + signal modulator. a cell phone only has the phoneline part, and tethering apparently uses something else to establish the link.
  • G-Wiz
    G-Wiz over 12 years
    thanks for the info. as grawity pointed out, the problem is likely that there simply is nothing to do the data <-> audio modulation.
  • user1686
    user1686 over 12 years
    @gWiz: Many older (pre-smartphone) cell phones do have the necessary parts and can use dial-up internet connections over GSM, as well as function as a modem connected to a computer. (My comment was more about the kind of "answering"; is it done by the PPP software or by you manually?)
  • G-Wiz
    G-Wiz over 12 years
    The simple tests I've done so far were outbound connections; I'm dialing a server that is known to be functioning properly. I was attempting to use the Windows built-in Dial-Up Networking PPP software, as well as manual AT commandset control with a serial terminal. Also, I only have modern smartphones to attempt this on. (iPhone and BlackBerry.) Thanks for the great info so far, any other tips?