Making Internet Dialer  
Author Message
saden_paki





PostPosted: 2003-8-19 23:18:00 Top

java-programmer, Making Internet Dialer 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
 
Loic Minier





PostPosted: 2003-8-19 23:28:00 Top

java-programmer >> Making Internet Dialer * Farooq Karim <email***@***.com>,
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颿 Minier <email***@***.com>
 
Brad BARCLAY





PostPosted: 2003-8-20 10:18:00 Top

java-programmer >> Making Internet Dialer 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