Making Internet Dialer

Discussion in 'Java' started by Farooq Karim, Aug 19, 2003.

  1. Farooq Karim

    Farooq Karim Guest

    Greetings;

    I am trying to build a windows internet dialer... I have gained
    control of my modem through javax.comm API and I can dial a number
    through my modem... the problem is I can not figure out how to pass
    the username and password to my ISP.

    I want to know what steps are involved in getting connected to my
    isp... and also I want my windows O/S to know that i am connected.

    Any resource given will be helpful.

    I hope someone can help me in this regard.

    Thanks
    Farooq Karim, Aug 19, 2003
    #1
    1. Advertising

  2. Farooq Karim

    Loic Minier Guest

    * Farooq Karim <>,
    19 Aug 2003 08:18:02 -0700:
    >
    > I am trying to build a windows internet dialer... I have gained
    > control of my modem through javax.comm API and I can dial a number
    > through my modem... the problem is I can not figure out how to pass
    > the username and password to my ISP.


    Usually, ISP send a "Login:" or "Username:" line and expect you to send
    you rusername followed by « ^M » (carriage return, '\r').

    Then comes the password. Then comes a PPP connection. PPP is a complex
    protocol with subprotocol for authentification. Then comes the IP
    protocol.

    All of the above are not available in je JDK, you have to use the
    windows API to dial a number. It's called RAS, for Remote Access
    Service. Goto msdn.micorosoft.com to learn more, but believe me: it's
    awful.


    --
    Loïc Minier <>
    Loic Minier, Aug 19, 2003
    #2
    1. Advertising

  3. Farooq Karim

    Roedy Green Guest

    On 19 Aug 2003 08:18:02 -0700, (Farooq Karim)
    wrote or quoted :

    >I want to know what steps are involved in getting connected to my
    >isp... and also I want my windows O/S to know that i am connected.


    You are going to have to talk PPP protocol. This is built into your
    OS. If you want to do it manually, you have to learn that protocol
    and send those strings to your modem.

    If you can find a serial protocol sniffer, you can watch the OS do it.

    Even if you manage to write a PPP protocol stack, Windows is not going
    to use it. I suspect what you really want to do is just set up dialup
    access. Go into network and dial up connections and set up a new
    dial up service.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Aug 19, 2003
    #3
  4. Farooq Karim

    Roedy Green Guest

    On 19 Aug 2003 08:18:02 -0700, (Farooq Karim)
    wrote or quoted :

    >
    >I am trying to build a windows internet dialer.


    I'm trying to figure out what you are really doing.
    Would this be a fair description?

    You have a pure Java app that uses the Internet. However when people
    run it on their machines who don't have 24-7 Internet access it fails
    unless they remember to dial up the internet first.

    You want a platform-independent way of establishing the dialup
    connection if they forget.

    I don't know the answer to that problem. Unfortunately most of the
    people with the technical smarts to do it don't use dialup so are not
    that interested in the problem.

    Dialing up is a considered a security risk. Machines without 24-7
    access often don't have it for a good reason. It may be that is why
    Java does not establish the dial up connection for you automatically.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Aug 19, 2003
    #4
  5. Farooq Karim

    Brad BARCLAY Guest

    Roedy Green wrote:

    > You want a platform-independent way of establishing the dialup
    > connection if they forget.


    Don't dismiss this too quickly -- it _is_ possible.

    The best way to "implement" this is to use a dial-up package that will
    automatically connect to the net whenever a network request is made. I
    thought that recent Windows versions had something like this built-in
    (dial on demand), but it's available for other OSs as well.

    It's obviously a native solution, but you can take advantage of it in
    Java. If you can't determine the local IP address (or if the only
    available one is 127.x.x.x), then you can try repeatibly connecting to a
    known host for a given amount of time. If you're not connected, the
    dial-on-demand will connect you, and your Java program can be made to
    "wakeup" wheneverthe known host connection is established.

    Now if the OP wants to create their own dialler /interface/, they're
    going to need to either use JNI, or they're going to have to make calls
    to command-line driven dialup applications (such as the ones available
    on Linux/UNIX/*BSD and OS/2) using one of Java's process launching routines.

    Brad BARCLAY

    --
    =-=-=-=-=-=-=-=-=
    From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
    The jSyncManager Project: http://www.jsyncmanager.org
    Brad BARCLAY, Aug 20, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mv

    dialer api

    mv, Mar 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    997
    Scott Allen
    Mar 18, 2005
  2. JNU
    Replies:
    1
    Views:
    1,098
    Roedy Green
    Jul 22, 2003
  3. Jander

    Java Dialer

    Jander, Sep 26, 2003, in forum: Java
    Replies:
    2
    Views:
    2,508
    Roedy Green
    Sep 26, 2003
  4. joshfeingold

    Java Applet Phone Dialer

    joshfeingold, Feb 4, 2005, in forum: Java
    Replies:
    1
    Views:
    2,882
  5. Jenna
    Replies:
    1
    Views:
    110
    Ray at
    Jul 22, 2003
Loading...

Share This Page