Making Internet Dialer

F

Farooq Karim

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
 
L

Loic Minier

* Farooq Karim said:
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.
 
R

Roedy Green

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

Roedy Green

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

Brad BARCLAY

Roedy said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top